Codebase list libnet-twitter-perl / b0694a9
New upstream version 4.01042 Florian Schlichting 6 years ago
41 changed file(s) with 452 addition(s) and 210 deletion(s). Raw diff Collapse all Expand all
+0
-109
Build.PL less more
0
1 # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.043.
2 use strict;
3 use warnings;
4
5 use Module::Build 0.28;
6
7
8 my %module_build_args = (
9 "build_requires" => {
10 "Module::Build" => "0.28"
11 },
12 "configure_requires" => {
13 "Module::Build" => "0.28"
14 },
15 "dist_abstract" => "A perl interface to the Twitter API",
16 "dist_author" => [
17 "Marc Mims <mmims\@cpan.org>"
18 ],
19 "dist_name" => "Net-Twitter",
20 "dist_version" => "4.01041",
21 "license" => "perl",
22 "module_name" => "Net::Twitter",
23 "recursive_test_files" => 1,
24 "requires" => {
25 "Carp::Clan" => 0,
26 "Class::Load" => 0,
27 "Data::Visitor::Callback" => 0,
28 "DateTime" => 0,
29 "DateTime::Format::Strptime" => 0,
30 "Devel::StackTrace" => 0,
31 "Digest::SHA" => 0,
32 "Encode" => 0,
33 "HTML::Entities" => 0,
34 "HTTP::Request::Common" => 0,
35 "IO::Socket::SSL" => "2.005",
36 "JSON::MaybeXS" => 0,
37 "LWP::Protocol::https" => 0,
38 "List::Util" => 0,
39 "Moose" => 0,
40 "Moose::Exporter" => 0,
41 "Moose::Meta::Method" => 0,
42 "Moose::Role" => 0,
43 "MooseX::Role::Parameterized" => 0,
44 "Net::HTTP" => ">= 0, != 6.04, != 6.05",
45 "Net::Netrc" => 0,
46 "Net::OAuth" => 0,
47 "Scalar::Util" => 0,
48 "Time::HiRes" => 0,
49 "Try::Tiny" => 0,
50 "URI" => 0,
51 "URI::Escape" => 0,
52 "namespace::autoclean" => 0,
53 "overload" => 0,
54 "perl" => "5.008001"
55 },
56 "test_requires" => {
57 "Carp" => 0,
58 "File::Spec" => 0,
59 "HTTP::Response" => 0,
60 "IO::Handle" => 0,
61 "IPC::Open3" => 0,
62 "LWP::UserAgent" => "5.819",
63 "Net::OAuth::Message" => 0,
64 "Test::Fatal" => 0,
65 "Test::More" => "0.88",
66 "Test::Simple" => "0.98",
67 "Test::Warn" => 0,
68 "base" => 0,
69 "blib" => "1.01",
70 "lib" => 0,
71 "strict" => 0,
72 "utf8" => 0,
73 "warnings" => 0
74 }
75 );
76
77
78 my %fallback_build_requires = (
79 "Carp" => 0,
80 "File::Spec" => 0,
81 "HTTP::Response" => 0,
82 "IO::Handle" => 0,
83 "IPC::Open3" => 0,
84 "LWP::UserAgent" => "5.819",
85 "Module::Build" => "0.28",
86 "Net::OAuth::Message" => 0,
87 "Test::Fatal" => 0,
88 "Test::More" => "0.88",
89 "Test::Simple" => "0.98",
90 "Test::Warn" => 0,
91 "base" => 0,
92 "blib" => "1.01",
93 "lib" => 0,
94 "strict" => 0,
95 "utf8" => 0,
96 "warnings" => 0
97 );
98
99
100 unless ( eval { Module::Build->VERSION(0.4004) } ) {
101 delete $module_build_args{test_requires};
102 $module_build_args{build_requires} = \%fallback_build_requires;
103 }
104
105 my $build = Module::Build->new(%module_build_args);
106
107
108 $build->create_build_script;
0 4.01042 2017-02-06
1 - deprecated contributors/contributees
2 - Fixed: follow_suggestions and follow_suggestions_for were reversed
3 - fix "overwriting a accessor" warnings under Moose 2.2004 #70
4 - build changes: keep dist.ini, create Makefile.PL (ether)
5
06 4.01041 2016-11-19
17 - hack dist.ini to get POD and README back into the distribution O_o
28
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.043.
1 Build.PL
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008.
21 Changes
32 LICENSE
43 MANIFEST
54 META.yml
5 Makefile.PL
66 README
7 dist.ini
78 examples/oauth_desktop.pl
89 examples/oauth_webapp.pl
910 lib/Net/Identica.pm
3334 lib/Net/Twitter/Role/WrapError.pm
3435 lib/Net/Twitter/Role/WrapResult.pm
3536 lib/Net/Twitter/Search.pm
37 lib/Net/Twitter/Types.pm
3638 lib/Net/Twitter/WrappedResult.pm
3739 t/00-compile.t
3840 t/00_load.t
7274 t/stringent-encoding.t
7375 t/twitter_error.t
7476 t/unicode.t
77 t/url-attributes.t
88 IO::Handle: '0'
99 IPC::Open3: '0'
1010 LWP::UserAgent: '5.819'
11 Module::Build: '0.28'
1211 Net::OAuth::Message: '0'
1312 Test::Fatal: '0'
14 Test::More: '0.88'
15 Test::Simple: '0.98'
13 Test::More: '0.98'
1614 Test::Warn: '0'
1715 base: '0'
1816 blib: '1.01'
2119 utf8: '0'
2220 warnings: '0'
2321 configure_requires:
24 Module::Build: '0.28'
22 ExtUtils::MakeMaker: '7.1101'
2523 dynamic_config: 0
26 generated_by: 'Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150001'
24 generated_by: 'Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150001'
2725 license: perl
2826 meta-spec:
2927 url: http://module-build.sourceforge.net/META-spec-v1.4.html
5250 Moose::Exporter: '0'
5351 Moose::Meta::Method: '0'
5452 Moose::Role: '0'
53 Moose::Util::TypeConstraints: '0'
5554 MooseX::Role::Parameterized: '0'
5655 Net::HTTP: '>= 0, != 6.04, != 6.05'
5756 Net::Netrc: '0'
6867 bugtracker: http://github.com/semifor/Net-Twitter/issues
6968 homepage: https://github.com/semifor/Net-Twitter
7069 repository: https://github.com/semifor/Net-Twitter.git
71 version: '4.01041'
70 version: '4.01042'
71 x_serialization_backend: 'YAML::Tiny version 1.69'
0 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.008.
1 use strict;
2 use warnings;
3
4 use 5.008001;
5
6 use ExtUtils::MakeMaker 7.1101;
7
8 my %WriteMakefileArgs = (
9 "ABSTRACT" => "A perl interface to the Twitter API",
10 "AUTHOR" => "Marc Mims <mmims\@cpan.org>",
11 "CONFIGURE_REQUIRES" => {
12 "ExtUtils::MakeMaker" => "7.1101"
13 },
14 "DISTNAME" => "Net-Twitter",
15 "LICENSE" => "perl",
16 "MIN_PERL_VERSION" => "5.008001",
17 "NAME" => "Net::Twitter",
18 "PREREQ_PM" => {
19 "Carp::Clan" => 0,
20 "Class::Load" => 0,
21 "Data::Visitor::Callback" => 0,
22 "DateTime" => 0,
23 "DateTime::Format::Strptime" => 0,
24 "Devel::StackTrace" => 0,
25 "Digest::SHA" => 0,
26 "Encode" => 0,
27 "HTML::Entities" => 0,
28 "HTTP::Request::Common" => 0,
29 "IO::Socket::SSL" => "2.005",
30 "JSON::MaybeXS" => 0,
31 "LWP::Protocol::https" => 0,
32 "List::Util" => 0,
33 "Moose" => 0,
34 "Moose::Exporter" => 0,
35 "Moose::Meta::Method" => 0,
36 "Moose::Role" => 0,
37 "Moose::Util::TypeConstraints" => 0,
38 "MooseX::Role::Parameterized" => 0,
39 "Net::HTTP" => ">= 0, != 6.04, != 6.05",
40 "Net::Netrc" => 0,
41 "Net::OAuth" => 0,
42 "Scalar::Util" => 0,
43 "Time::HiRes" => 0,
44 "Try::Tiny" => 0,
45 "URI" => 0,
46 "URI::Escape" => 0,
47 "namespace::autoclean" => 0,
48 "overload" => 0
49 },
50 "TEST_REQUIRES" => {
51 "Carp" => 0,
52 "File::Spec" => 0,
53 "HTTP::Response" => 0,
54 "IO::Handle" => 0,
55 "IPC::Open3" => 0,
56 "LWP::UserAgent" => "5.819",
57 "Net::OAuth::Message" => 0,
58 "Test::Fatal" => 0,
59 "Test::More" => "0.98",
60 "Test::Warn" => 0,
61 "base" => 0,
62 "blib" => "1.01",
63 "lib" => 0,
64 "strict" => 0,
65 "utf8" => 0,
66 "warnings" => 0
67 },
68 "VERSION" => "4.01042",
69 "test" => {
70 "TESTS" => "t/*.t"
71 }
72 );
73
74
75 my %FallbackPrereqs = (
76 "Carp" => 0,
77 "Carp::Clan" => 0,
78 "Class::Load" => 0,
79 "Data::Visitor::Callback" => 0,
80 "DateTime" => 0,
81 "DateTime::Format::Strptime" => 0,
82 "Devel::StackTrace" => 0,
83 "Digest::SHA" => 0,
84 "Encode" => 0,
85 "File::Spec" => 0,
86 "HTML::Entities" => 0,
87 "HTTP::Request::Common" => 0,
88 "HTTP::Response" => 0,
89 "IO::Handle" => 0,
90 "IO::Socket::SSL" => "2.005",
91 "IPC::Open3" => 0,
92 "JSON::MaybeXS" => 0,
93 "LWP::Protocol::https" => 0,
94 "LWP::UserAgent" => "5.819",
95 "List::Util" => 0,
96 "Moose" => 0,
97 "Moose::Exporter" => 0,
98 "Moose::Meta::Method" => 0,
99 "Moose::Role" => 0,
100 "Moose::Util::TypeConstraints" => 0,
101 "MooseX::Role::Parameterized" => 0,
102 "Net::HTTP" => ">= 0, != 6.04, != 6.05",
103 "Net::Netrc" => 0,
104 "Net::OAuth" => 0,
105 "Net::OAuth::Message" => 0,
106 "Scalar::Util" => 0,
107 "Test::Fatal" => 0,
108 "Test::More" => "0.98",
109 "Test::Warn" => 0,
110 "Time::HiRes" => 0,
111 "Try::Tiny" => 0,
112 "URI" => 0,
113 "URI::Escape" => 0,
114 "base" => 0,
115 "blib" => "1.01",
116 "lib" => 0,
117 "namespace::autoclean" => 0,
118 "overload" => 0,
119 "strict" => 0,
120 "utf8" => 0,
121 "warnings" => 0
122 );
123
124
125 unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
126 delete $WriteMakefileArgs{TEST_REQUIRES};
127 delete $WriteMakefileArgs{BUILD_REQUIRES};
128 $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
129 }
130
131 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
132 unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
133
134 WriteMakefile(%WriteMakefileArgs);
278278
279279 useragent
280280 The value for "User-Agent" HTTP header. It defaults to
281 "Net::Twitter/4.01041 (Perl)".
281 "Net::Twitter/4.01042 (Perl)".
282282
283283 source
284284 Twitter on longer uses the "source" parameter. Support for it
646646 Twitter API documentation: GET blocks/ids
647647 <https://dev.twitter.com/rest/reference/get/blocks/ids>
648648
649 contributees
649 contributees DEPRECATED
650650
651651 Parameters: user_id, screen_name, include_entities, skip_satus
652652 Required: *none*
655655
656656 Returns: ArrayRef[User]
657657
658 Twitter API documentation: GET users/contributees
659 <https://dev.twitter.com/rest/reference/get/users/contributees>
660
661 contributors
658 contributors DEPRECATED
662659
663660 Parameters: user_id, screen_name, include_entities, skip_satus
664661 Required: *none*
667664 account.
668665
669666 Returns: ArrayRef[User]
670
671 Twitter API documentation: GET users/contributors
672 <https://dev.twitter.com/rest/reference/get/users/contributors>
673667
674668 create_block
675669 create_block(id)
24602454
24612455 user_suggestions
24622456 user_suggestions(slug)
2463 alias: follow_suggestions_for
2457 alias: follow_suggestions
24642458
24652459 Parameters: slug, lang
24662460 Required: slug
24792473
24802474 user_suggestions_for
24812475 user_suggestions_for(slug)
2482 alias: follow_suggestions
2476 alias: follow_suggestions_for
24832477
24842478 Parameters: slug, lang
24852479 Required: slug
0 name = Net-Twitter
1 version = 4.01042
2 author = Marc Mims <mmims@cpan.org>
3 license = Perl_5
4 copyright_holder = Marc Mims
5 copyright_year = 2016
6
7 [GithubMeta]
8 [MetaResources]
9 bugtracker = http://github.com/semifor/Net-Twitter/issues
10
11 [PkgVersion]
12 [PodVersion]
13 [GatherDir]
14 [PruneCruft]
15 [ManifestSkip]
16 [MetaYAML]
17 [License]
18 [ExtraTests]
19 [MakeMaker]
20 eumm_version = 7.1101
21 [Manifest]
22 [TestRelease]
23 [ConfirmRelease]
24 [UploadToCPAN]
25
26 [Run::BeforeBuild]
27 run = NET_TWITTER_NO_TRENDS_WARNING=1 %x -Ilib src/build.pl %v 'src/net-twitter-pod.tt2' 'lib/Net/Twitter.pod'
28 run = pod2text 'lib/Net/Twitter.pod' 'README'
29
30 [Run::AfterBuild]
31 run = rm lib/Net/Twitter.pod README
32
33 [MetaNoIndex]
34 directory = src
35 directory = examples
36
37 [PruneFiles]
38 filename = README.md
39 match = ^nytprof.*
40 match = ^perl5
41 match = ^cpan.*
42 match = ^src/
43
44 [AutoPrereqs]
45 skip = ^API::
46 skip = ^(Legacy|OAuth|WrapError)$
47
48 [Prereqs]
49 Net::HTTP = >=0,!=6.04,!=6.05
50 LWP::Protocol::https = 0
51 IO::Socket::SSL = >=2.005
52
53 [Prereqs / TestRequires]
54 Test::More = 0.98
55 Test::Fatal = 0
56
57 [PodSyntaxTests]
58 [PodCoverageTests]
59 ; authordep Pod::Coverage::TrustPod
60 ; authordep Test::Pod::Coverage
61
62 [Test::Compile]
63
64 ;[@Git]
65 ;changelog = Changes
66 ;allow_dirty = dist.ini
67 ;allow_dirty = Changes
68 ;commit_msg = v%v%n%n%c
69 ;tag_format = %v
70 ;tag_message = %v
71 ;push_to = origin
72 ;
73 ;[Git::NextVersion]
74 ;version_regexp = ^(\d+\.\d{2})$
75
76 ; authordep Template
00 package Net::Identica;
1 $Net::Identica::VERSION = '4.01041';
1 $Net::Identica::VERSION = '4.01042';
22 use Moose;
33
44 extends 'Net::Twitter::Core';
2121
2222 =head1 VERSION
2323
24 version 4.01041
24 version 4.01042
2525
2626 =head1 SYNOPSIS
2727
00 package Net::Twitter::API;
1 $Net::Twitter::API::VERSION = '4.01041';
1 $Net::Twitter::API::VERSION = '4.01042';
22 use Moose ();
33 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
44 use Moose::Exporter;
116116 }
117117
118118 package Net::Twitter::Meta::Method;
119 $Net::Twitter::Meta::Method::VERSION = '4.01041';
119 $Net::Twitter::Meta::Method::VERSION = '4.01042';
120120 use Moose;
121121 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
122122 extends 'Moose::Meta::Method';
163163
164164 =head1 VERSION
165165
166 version 4.01041
166 version 4.01042
167167
168168 =head1 SYNOPSIS
169169
00 package Net::Twitter::Core;
1 $Net::Twitter::Core::VERSION = '4.01041';
1 $Net::Twitter::Core::VERSION = '4.01042';
22 # ABSTRACT: A perl interface to the Twitter API
33
44 use 5.008001;
369369
370370 =head1 VERSION
371371
372 version 4.01041
372 version 4.01042
373373
374374 =head1 SYNOPSIS
375375
00 package Net::Twitter::Error;
1 $Net::Twitter::Error::VERSION = '4.01041';
1 $Net::Twitter::Error::VERSION = '4.01042';
22 use Moose;
33 use Try::Tiny;
44 use Devel::StackTrace;
115115
116116 =head1 VERSION
117117
118 version 4.01041
118 version 4.01042
119119
120120 =head1 SYNOPSIS
121121
33
44 =head1 VERSION
55
6 version 4.01041
6 version 4.01042
77
88 =head1 SYNOPSIS
99
00 package Net::Twitter::OAuth;
1 $Net::Twitter::OAuth::VERSION = '4.01041';
1 $Net::Twitter::OAuth::VERSION = '4.01042';
22 use Moose;
33
44 extends 'Net::Twitter::Core';
1818
1919 =head1 VERSION
2020
21 version 4.01041
21 version 4.01042
2222
2323 =head1 SYNOPSIS
2424
00 package Net::Twitter::Role::API::Lists;
1 $Net::Twitter::Role::API::Lists::VERSION = '4.01041';
1 $Net::Twitter::Role::API::Lists::VERSION = '4.01042';
22 use Moose::Role;
33 use Net::Twitter::API;
44 use DateTime::Format::Strptime;
1212
1313 =head1 VERSION
1414
15 version 4.01041
15 version 4.01042
1616
1717 =head1 SYNOPSIS
1818
00 package Net::Twitter::Role::API::REST;
1 $Net::Twitter::Role::API::REST::VERSION = '4.01041';
1 $Net::Twitter::Role::API::REST::VERSION = '4.01042';
22 use Moose::Role;
33 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
44 use Net::Twitter::API;
17361736
17371737 =head1 VERSION
17381738
1739 version 4.01041
1739 version 4.01042
17401740
17411741 =head1 SYNOPSIS
17421742
00 package Net::Twitter::Role::API::RESTv1_1;
1 $Net::Twitter::Role::API::RESTv1_1::VERSION = '4.01041';
1 $Net::Twitter::Role::API::RESTv1_1::VERSION = '4.01042';
22 use Moose::Role;
33 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
44 use Net::Twitter::API;
947947 );
948948
949949 twitter_api_method contributees => (
950 deprecated => 1,
950951 path => 'users/contributees',
951952 method => 'GET',
952953 params => [qw/user_id screen_name include_entities skip_satus/],
959960 );
960961
961962 twitter_api_method contributors => (
963 deprecated => 1,
962964 path => 'users/contributors',
963965 method => 'GET',
964966 params => [qw/user_id screen_name include_entities skip_satus/],
984986 );
985987
986988 twitter_api_method user_suggestions_for => (
987 aliases => [qw/follow_suggestions/],
989 aliases => [qw/follow_suggestions_for/],
988990 path => 'users/suggestions/:slug',
989991 method => 'GET',
990992 params => [qw/slug lang/],
996998 );
997999
9981000 twitter_api_method user_suggestions => (
999 aliases => [qw/follow_suggestions_for/],
1001 aliases => [qw/follow_suggestions/],
10001002 path => 'users/suggestions/:slug/members',
10011003 method => 'GET',
10021004 params => [qw/slug lang/],
21822184
21832185 =head1 VERSION
21842186
2185 version 4.01041
2187 version 4.01042
21862188
21872189 =head1 SYNOPSIS
21882190
00 package Net::Twitter::Role::API::Search::Trends;
1 $Net::Twitter::Role::API::Search::Trends::VERSION = '4.01041';
1 $Net::Twitter::Role::API::Search::Trends::VERSION = '4.01042';
22 use Moose::Role;
33
44 after BUILD => sub {
2525
2626 =head1 VERSION
2727
28 version 4.01041
28 version 4.01042
2929
3030 =head1 SYNOPSIS
3131
00 package Net::Twitter::Role::API::Search;
1 $Net::Twitter::Role::API::Search::VERSION = '4.01041';
1 $Net::Twitter::Role::API::Search::VERSION = '4.01042';
22 use Moose::Role;
33 use Net::Twitter::API;
44 use DateTime::Format::Strptime;
5151
5252 =head1 VERSION
5353
54 version 4.01041
54 version 4.01042
5555
5656 =head1 SYNOPSIS
5757
00 package Net::Twitter::Role::API::TwitterVision;
1 $Net::Twitter::Role::API::TwitterVision::VERSION = '4.01041';
1 $Net::Twitter::Role::API::TwitterVision::VERSION = '4.01042';
22 use Moose::Role;
33
44 requires qw/credentials/;
4646
4747 =head1 VERSION
4848
49 version 4.01041
49 version 4.01042
5050
5151 =head1 SYNOPSIS
5252
00 package Net::Twitter::Role::API::Upload;
1 $Net::Twitter::Role::API::Upload::VERSION = '4.01041';
1 $Net::Twitter::Role::API::Upload::VERSION = '4.01042';
22 use Moose::Role;
33 use Net::Twitter::API;
44 use DateTime::Format::Strptime;
6464
6565 =head1 VERSION
6666
67 version 4.01041
67 version 4.01042
6868
6969 =head1 SYNOPSIS
7070
00 package Net::Twitter::Role::API::UploadMedia;
1 $Net::Twitter::Role::API::UploadMedia::VERSION = '4.01041';
1 $Net::Twitter::Role::API::UploadMedia::VERSION = '4.01042';
22 use Moose::Role;
33 use Net::Twitter::API;
44 use DateTime::Format::Strptime;
4545
4646 =head1 VERSION
4747
48 version 4.01041
48 version 4.01042
4949
5050 =head1 SYNOPSIS
5151
00 package Net::Twitter::Role::AppAuth;
1 $Net::Twitter::Role::AppAuth::VERSION = '4.01041';
1 $Net::Twitter::Role::AppAuth::VERSION = '4.01042';
22 use Moose::Role;
33 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
44 use HTTP::Request::Common qw/POST/;
5 use Net::Twitter::Types;
56
67 requires qw/_add_authorization_header ua from_json/;
78
2930
3031 # url attributes
3132 has [ qw/request_token_url invalidate_token_url/ ] => (
32 isa => 'Str',
33 is => 'rw',
33 isa => 'Net::Twitter::Types::URI',
34 is => 'ro',
3435 required => 1,
36 coerce => 1,
3537 );
3638
3739 has access_token => (
116118
117119 =head1 VERSION
118120
119 version 4.01041
121 version 4.01042
120122
121123 =head1 SYNOPSIS
122124
00 package Net::Twitter::Role::AutoCursor;
1 $Net::Twitter::Role::AutoCursor::VERSION = '4.01041';
1 $Net::Twitter::Role::AutoCursor::VERSION = '4.01042';
22 use MooseX::Role::Parameterized;
33
44 parameter max_calls => isa => 'Int', default => 16;
6767
6868 =head1 VERSION
6969
70 version 4.01041
70 version 4.01042
7171
7272 =head1 SYNOPSIS
7373
00 package Net::Twitter::Role::InflateObjects;
1 $Net::Twitter::Role::InflateObjects::VERSION = '4.01041';
1 $Net::Twitter::Role::InflateObjects::VERSION = '4.01042';
22 use Moose::Role;
33 use namespace::autoclean;
44 use Data::Visitor::Callback;
1010
1111 =head1 VERSION
1212
13 version 4.01041
13 version 4.01042
1414
1515 =cut
1616
00 package Net::Twitter::Role::Legacy;
1 $Net::Twitter::Role::Legacy::VERSION = '4.01041';
1 $Net::Twitter::Role::Legacy::VERSION = '4.01042';
22 use Moose::Role;
33
44 use namespace::autoclean;
4646
4747 =head1 VERSION
4848
49 version 4.01041
49 version 4.01042
5050
5151 =head1 SYNOPSIS
5252
00 package Net::Twitter::Role::OAuth;
1 $Net::Twitter::Role::OAuth::VERSION = '4.01041';
1 $Net::Twitter::Role::OAuth::VERSION = '4.01042';
22 use Moose::Role;
33 use HTTP::Request::Common;
44 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
55 use URI;
66 use Digest::SHA;
77 use List::Util qw/first/;
8 use Net::Twitter::Types;
89
910 requires qw/_add_authorization_header ua/;
1011
3334 has consumer_key => ( isa => 'Str', is => 'ro', required => 1 );
3435 has consumer_secret => ( isa => 'Str', is => 'ro', required => 1 );
3536
36 # url attributes
37 for my $attribute ( qw/authentication_url authorization_url request_token_url access_token_url xauth_url/ ) {
38 has $attribute => (
39 isa => 'Str', is => 'rw', required => 1,
40 # inflate urls to URI objects when read
41 reader => { $attribute => sub { URI->new(shift->{$attribute}) } },
42 );
43 }
37 # URI attributes
38 has [ qw/authentication_url authorization_url request_token_url
39 access_token_url xauth_url/ ] => (
40 isa => 'Net::Twitter::Types::URI',
41 is => 'ro',
42 required => 1,
43 coerce => 1,
44 );
4445
4546 # token attributes
4647 for my $attribute ( qw/access_token access_token_secret request_token request_token_secret/ ) {
265266
266267 =head1 VERSION
267268
268 version 4.01041
269 version 4.01042
269270
270271 =head1 SYNOPSIS
271272
00 package Net::Twitter::Role::RateLimit;
1 $Net::Twitter::Role::RateLimit::VERSION = '4.01041';
1 $Net::Twitter::Role::RateLimit::VERSION = '4.01042';
22 use Moose::Role;
33 use namespace::autoclean;
44 use Try::Tiny;
1010
1111 =head1 VERSION
1212
13 version 4.01041
13 version 4.01042
1414
1515 =head1 SYNOPSIS
1616
00 package Net::Twitter::Role::RetryOnError;
1 $Net::Twitter::Role::RetryOnError::VERSION = '4.01041';
1 $Net::Twitter::Role::RetryOnError::VERSION = '4.01042';
22 use Moose::Role;
33 use namespace::autoclean;
44 use Time::HiRes;
1111
1212 =head1 VERSION
1313
14 version 4.01041
14 version 4.01042
1515
1616 =head1 SYNOPSIS
1717
00 package Net::Twitter::Role::SimulateCursors;
1 $Net::Twitter::Role::SimulateCursors::VERSION = '4.01041';
1 $Net::Twitter::Role::SimulateCursors::VERSION = '4.01042';
22 use Moose::Role;
33 use namespace::autoclean;
44
4040
4141 =head1 VERSION
4242
43 version 4.01041
43 version 4.01042
4444
4545 =head1 SYNOPSIS
4646
00 package Net::Twitter::Role::WrapError;
1 $Net::Twitter::Role::WrapError::VERSION = '4.01041';
1 $Net::Twitter::Role::WrapError::VERSION = '4.01042';
22 use Moose::Role;
33 use Try::Tiny;
44 use Scalar::Util qw/blessed/;
6363
6464 =head1 VERSION
6565
66 version 4.01041
66 version 4.01042
6767
6868 =head1 SYNOPSIS
6969
00 package Net::Twitter::Role::WrapResult;
1 $Net::Twitter::Role::WrapResult::VERSION = '4.01041';
1 $Net::Twitter::Role::WrapResult::VERSION = '4.01042';
22 use Moose::Role;
33 use Net::Twitter::WrappedResult;
44
2828
2929 =head1 VERSION
3030
31 version 4.01041
31 version 4.01042
3232
3333 =head1 SYNOPSIS
3434
00 package Net::Twitter::Search;
1 $Net::Twitter::Search::VERSION = '4.01041';
1 $Net::Twitter::Search::VERSION = '4.01042';
22 use Moose;
33
44 extends 'Net::Twitter::Core';
1818
1919 =head1 VERSION
2020
21 version 4.01041
21 version 4.01042
2222
2323 =head1 SYNOPSIS
2424
0 package Net::Twitter::Types;
1 $Net::Twitter::Types::VERSION = '4.01042';
2 use Moose::Util::TypeConstraints;
3 use URI;
4
5 class_type 'Net::Twitter::Types::URI', { class => 'URI' };
6
7 coerce 'Net::Twitter::Types::URI' => from 'Str' => via { URI->new($_) };
8
9 1;
10
11 __END__
12
13 =pod
14
15 =head1 NAME
16
17 Net::Twitter::Types - types and coercions for Net::Twitter
18
19 =head1 VERSION
20
21 version 4.01042
22
23 =cut
00 package Net::Twitter::WrappedResult;
1 $Net::Twitter::WrappedResult::VERSION = '4.01041';
1 $Net::Twitter::WrappedResult::VERSION = '4.01042';
22 use Moose;
33
44 # decoded JSON Twitter API response
4242
4343 =head1 VERSION
4444
45 version 4.01041
45 version 4.01042
4646
4747 =head1 SYNOPSIS
4848
00 package Net::Twitter;
1 $Net::Twitter::VERSION = '4.01041';
1 $Net::Twitter::VERSION = '4.01042';
22 use Moose;
33 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
44 use JSON::MaybeXS;
159159
160160 =head1 VERSION
161161
162 version 4.01041
162 version 4.01042
163163
164164 =head1 DESCRIPTION
165165
33
44 =head1 VERSION
55
6 version 4.01041
6 version 4.01042
77
88 =head1 SYNOPSIS
99
303303 =item useragent
304304
305305 The value for C<User-Agent> HTTP header. It defaults to
306 "Net::Twitter/4.01041 (Perl)".
306 "Net::Twitter/4.01042 (Perl)".
307307
308308 =item source
309309
746746
747747 Twitter API documentation: L<GET blocks/ids|https://dev.twitter.com/rest/reference/get/blocks/ids>
748748
749 =item B<contributees>
749 =item B<contributees> B<DEPRECATED>
750750
751751
752752
763763
764764 Returns: ArrayRef[User]
765765
766 Twitter API documentation: L<GET users/contributees|https://dev.twitter.com/rest/reference/get/users/contributees>
767
768 =item B<contributors>
766 =item B<contributors> B<DEPRECATED>
769767
770768
771769
781779
782780
783781 Returns: ArrayRef[User]
784
785 Twitter API documentation: L<GET users/contributors|https://dev.twitter.com/rest/reference/get/users/contributors>
786782
787783 =item B<create_block>
788784
33283324 =item B<user_suggestions(slug)>
33293325
33303326
3331 =item alias: follow_suggestions_for
3327 =item alias: follow_suggestions
33323328
33333329
33343330 =over 4
33543350 =item B<user_suggestions_for(slug)>
33553351
33563352
3357 =item alias: follow_suggestions
3353 =item alias: follow_suggestions_for
33583354
33593355
33603356 =over 4
55
66 use Test::More;
77
8 plan tests => 26 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
8 plan tests => 27 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
99
1010 my @module_files = (
1111 'Net/Identica.pm',
3333 'Net/Twitter/Role/WrapError.pm',
3434 'Net/Twitter/Role/WrapResult.pm',
3535 'Net/Twitter/Search.pm',
36 'Net/Twitter/Types.pm',
3637 'Net/Twitter/WrappedResult.pm'
3738 );
3839
11
22 BEGIN {
33 unless ($ENV{AUTHOR_TESTING}) {
4 require Test::More;
5 Test::More::plan(skip_all => 'these tests are for testing by the author');
4 print qq{1..0 # SKIP these tests are for testing by the author\n};
5 exit
66 }
77 }
88
11
22 BEGIN {
33 unless ($ENV{AUTHOR_TESTING}) {
4 require Test::More;
5 Test::More::plan(skip_all => 'these tests are for testing by the author');
4 print qq{1..0 # SKIP these tests are for testing by the author\n};
5 exit
66 }
77 }
88
3535 $nt->new_direct_message({ screen_name => 'perl_api', text => $text });
3636
3737 my $encoded_text = Net::OAuth::Message::encode($text);
38 like $req->content, qr/\E$encoded_text/, 'properly encoded';
38 like $req->content, qr/\Q$encoded_text/, 'properly encoded';
3939
4040 my $uri = URI->new($req->uri);
4141 $uri->query($req->content);
0 use Test::More;
1 use Net::Twitter;
2 use URI;
3
4 sub test_uris {
5 my ( $nt, $urls ) = @_;
6
7 for my $attr ( keys %$urls ) {
8 my $uri = $nt->$attr;
9 ok $uri->isa('URI'), "$attr isa URI";
10 is "$uri", $urls->{$attr}, "$attr is expected url";
11 }
12 };
13
14 subtest 'default URL attributes' => sub {
15
16 my %urls = (
17 authentication_url => 'https://api.twitter.com/oauth/authenticate',
18 authorization_url => 'https://api.twitter.com/oauth/authorize',
19 request_token_url => 'https://api.twitter.com/oauth/request_token',
20 access_token_url => 'https://api.twitter.com/oauth/access_token',
21 xauth_url => 'https://api.twitter.com/oauth/access_token',
22 );
23
24 my $nt = Net::Twitter->new(
25 traits => [ qw/API::RESTv1_1 OAuth/ ],
26 consumer_key => 'key',
27 consumer_secret => 'secret',
28 );
29
30 test_uris($nt, \%urls);
31 };
32
33 subtest 'explicit URL attributes' => sub {
34
35 my %urls = (
36 authentication_url => 'https://example.com/authenticate',
37 authorization_url => 'https://example.com/authorize',
38 request_token_url => 'https://example.com/request',
39 access_token_url => 'https://example.com/access',
40 xauth_url => 'https://example.com/xauth',
41 );
42
43 my $nt = Net::Twitter->new(
44 traits => [ qw/API::RESTv1_1 OAuth/ ],
45 consumer_key => 'key',
46 consumer_secret => 'secret',
47 %urls,
48 );
49
50 test_uris($nt, \%urls);
51 };
52
53 subtest 'with URIs' => sub {
54
55 my %urls = (
56 authentication_url => URI->new('https://example.com/authenticate'),
57 authorization_url => URI->new('https://example.com/authorize'),
58 request_token_url => URI->new('https://example.com/request'),
59 access_token_url => URI->new('https://example.com/access'),
60 xauth_url => URI->new('https://example.com/xauth'),
61 );
62
63 my $nt = Net::Twitter->new(
64 traits => [ qw/API::RESTv1_1 OAuth/ ],
65 consumer_key => 'key',
66 consumer_secret => 'secret',
67 %urls,
68 );
69
70 test_uris($nt, \%urls);
71 };
72
73 subtest 'oauth_urls pseudo attribute' => sub {
74
75 my %urls = (
76 authentication_url => 'https://example.com/authenticate',
77 authorization_url => 'https://example.com/authorize',
78 request_token_url => 'https://example.com/request',
79 access_token_url => 'https://example.com/access',
80 xauth_url => 'https://example.com/xauth',
81 );
82
83 my $nt = Net::Twitter->new(
84 traits => [ qw/API::RESTv1_1 OAuth/ ],
85 consumer_key => 'key',
86 consumer_secret => 'secret',
87 oauth_urls => \%urls,
88 );
89
90 test_uris($nt, \%urls);
91 };
92
93 subtest 'AppAuth URLs' => sub {
94
95 my %urls = (
96 request_token_url => "https://api.twitter.com/oauth2/token",
97 invalidate_token_url => "https://api.twitter.com/oauth2/invalidate_token",
98 );
99
100 my $nt = Net::Twitter->new(
101 traits => [ qw/API::RESTv1_1 AppAuth/ ],
102 consumer_key => 'key',
103 consumer_secret => 'secret',
104 );
105
106 test_uris($nt, \%urls);
107 };
108
109 done_testing;