| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::GData::YouTube::Feed::Friend; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
12
|
use WebService::GData; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
13
|
|
|
4
|
2
|
|
|
2
|
|
13
|
use base 'WebService::GData::Feed::Entry'; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
178
|
|
|
5
|
2
|
|
|
2
|
|
20
|
use WebService::GData::Constants qw(:all); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
2229
|
|
|
6
|
2
|
|
|
2
|
|
13
|
use WebService::GData::YouTube::Constants qw(:all); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
708
|
|
|
7
|
2
|
|
|
2
|
|
1624
|
use WebService::GData::YouTube::YT::Username (); |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
42
|
|
|
8
|
2
|
|
|
2
|
|
1337
|
use WebService::GData::YouTube::YT::Status (); |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
46
|
|
|
9
|
2
|
|
|
2
|
|
15
|
use WebService::GData::YouTube::StagingServer (); |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
1136
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 0.01_01; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $BASE_URI = BASE_URI . PROJECTION . '/users/'; |
|
14
|
|
|
|
|
|
|
our $WRITE_BASE_URI = $BASE_URI; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $SCHEME ='http://gdata.youtube.com/schemas/2007/contact.cat'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
if(WebService::GData::YouTube::StagingServer->is_on){ |
|
19
|
|
|
|
|
|
|
$WRITE_BASE_URI = STAGING_BASE_URI . PROJECTION . '/users/'; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub __init { |
|
23
|
0
|
|
|
0
|
|
|
my ( $this, $feed, $req ) = @_; |
|
24
|
|
|
|
|
|
|
|
|
25
|
0
|
0
|
|
|
|
|
if ( ref($feed) eq 'HASH' ) { |
|
26
|
0
|
|
|
|
|
|
$this->SUPER::__init( $feed, $req ); |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
else { |
|
29
|
0
|
|
|
|
|
|
$this->SUPER::__init( {}, $feed );#$feed ==$req here |
|
30
|
|
|
|
|
|
|
} |
|
31
|
0
|
|
|
|
|
|
$this->{_username}= new WebService::GData::YouTube::YT::Username($this->{_feed}->{'yt$username'}); |
|
32
|
0
|
|
|
|
|
|
$this->{_status}= new WebService::GData::YouTube::YT::Status($this->{_feed}->{'yt$status'}); |
|
33
|
0
|
|
|
|
|
|
$this->_entity->child($this->{_username})->child($this->{_status}); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub delete { |
|
38
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
|
39
|
0
|
|
|
|
|
|
my $uri = |
|
40
|
0
|
0
|
|
|
|
|
@{ $this->links->rel('edit') } > 0 |
|
41
|
|
|
|
|
|
|
? $this->links->rel('edit')->[0]->href |
|
42
|
|
|
|
|
|
|
: $WRITE_BASE_URI . 'default/contacts/'.$this->username; |
|
43
|
0
|
|
|
|
|
|
$this->{_request}->delete( $uri ); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub update { |
|
47
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
0
|
|
|
|
|
if ( $this->username ) { |
|
50
|
0
|
|
|
|
|
|
my $content= XML_HEADER . $this->serialize(); |
|
51
|
0
|
|
|
|
|
|
my $ret =$this->{_request}->insert( $WRITE_BASE_URI . 'default/contacts/'.$this->username, $content ); |
|
52
|
0
|
|
|
|
|
|
return $ret; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub save { |
|
57
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
|
58
|
|
|
|
|
|
|
|
|
59
|
0
|
0
|
|
|
|
|
if ( $this->username ) { |
|
60
|
0
|
|
|
|
|
|
my $content= XML_HEADER . $this->serialize(); |
|
61
|
0
|
|
|
|
|
|
my $ret =$this->{_request}->insert( $WRITE_BASE_URI . 'default/contacts/', $content ); |
|
62
|
0
|
|
|
|
|
|
return $ret; |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
"The earth is blue like an orange."; |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |