@@ -11,32 +11,32 @@ version 0.0100
11
11
### Common usage ###
12
12
13
13
use Twitter::API;
14
- my $api = Twitter::API->new_with_traits(
14
+ my $client = Twitter::API->new_with_traits(
15
15
traits => 'Enchilada',
16
16
consumer_key => $YOUR_CONSUMER_KEY,
17
17
consumer_secret => $YOUR_CONSUMER_SECRET,
18
18
access_token => $YOUR_ACCESS_TOKEN
19
19
access_token_secret => $YOUR_ACCESS_TOKEN_SECRET,
20
20
);
21
21
22
- my $me = $api ->verify_credentials;
23
- my $user = $api ->show_user('twitter');
22
+ my $me = $client ->verify_credentials;
23
+ my $user = $client ->show_user('twitter');
24
24
25
25
# In list context, both the Twitter API result and a Twitter::API::Context
26
26
# object are returned.
27
- my ($r, $context) = $api ->home_timeline({ count => 200, trim_user => 1 });
27
+ my ($r, $context) = $client ->home_timeline({ count => 200, trim_user => 1 });
28
28
my $remaning = $context->rate_limit_remaining;
29
29
my $until = $context->rate_limit_reset;
30
30
31
31
32
32
### No frills ###
33
33
34
- my $api = Twitter::API->new(
34
+ my $client = Twitter::API->new(
35
35
consumer_key => $YOUR_CONSUMER_KEY,
36
36
consumer_secret => $YOUR_CONSUMER_SECRET,
37
37
);
38
38
39
- my $r = $api ->get('account/verify_credentials', {
39
+ my $r = $client ->get('account/verify_credentials', {
40
40
-token => $an_access_token,
41
41
-token_secret => $an_access_token_secret,
42
42
});
@@ -47,7 +47,7 @@ version 0.0100
47
47
use Try::Tiny;
48
48
49
49
try {
50
- my $r = $api ->verify_credentials;
50
+ my $r = $client ->verify_credentials;
51
51
}
52
52
catch {
53
53
die $_ unless is_twitter_api_error($_);
0 commit comments