File Coverage

blib/lib/WebService/LiveJournal/Tag.pm
Criterion Covered Total %
statement 9 18 50.0
branch n/a
condition 0 3 0.0
subroutine 3 9 33.3
pod 5 6 83.3
total 17 36 47.2


line stmt bran cond sub pod time code
1             package WebService::LiveJournal::Tag;
2              
3 12     12   86 use strict;
  12         25  
  12         423  
4 12     12   65 use warnings;
  12         34  
  12         329  
5 12     12   74 use WebService::LiveJournal::Thingie;
  12         59  
  12         2876  
6             our @ISA = qw/ WebService::LiveJournal::Thingie /;
7              
8             # ABSTRACT: (Deprecated) A LiveJournal tag
9             our $VERSION = '0.09'; # VERSION
10              
11              
12             sub new
13             {
14 0     0 0   my $ob = shift;
15 0   0       my $class = ref($ob) || $ob;
16 0           my $self = bless { payload => shift }, $class;
17 0           return $self;
18             }
19              
20              
21 0     0 1   sub name { shift->{payload}->{name} }
22              
23              
24 0     0 1   sub display { shift->{payload}->{display} }
25              
26              
27 0     0 1   sub security_level { shift->{payload}->{security_level} }
28              
29              
30 0     0 1   sub uses { shift->{payload}->{uses} }
31              
32              
33 0     0 1   sub security { shift->{payload}->{security} }
34              
35              
36             1;
37              
38             __END__
39              
40             =pod
41              
42             =encoding UTF-8
43              
44             =head1 NAME
45              
46             WebService::LiveJournal::Tag - (Deprecated) A LiveJournal tag
47              
48             =head1 VERSION
49              
50             version 0.09
51              
52             =head1 SYNOPSIS
53              
54             use WebService::LiveJournal;
55             my $client = WebService::LiveJournal->new( ... );
56             my @tags = $client->get_user_tags;
57            
58             # print out each tag name, one per line
59             say $_->name for @tags;
60              
61             =head1 DESCRIPTION
62              
63             B<NOTE>: This distribution is deprecated. It uses the outmoded XML-RPC protocol.
64             LiveJournal has also been compromised. I recommend using DreamWidth instead
65             (L<https://www.dreamwidth.org/>) which is in keeping with the original philosophy
66             LiveJournal regarding advertising.
67              
68             Instances of this class represent LiveJournal tags. They can
69             be fetched from the LiveJournal server using the C<get_user_tags>
70             client method. That method takes one optional argument, which
71             is the journal to use. If the journal name is not specified
72             then it will use the logged in user's journal.
73              
74             =head1 ATTRIBUTES
75              
76             =head2 name
77              
78             The tag name.
79              
80             =head2 display
81              
82             If present and on, indicates that this tag is visible to the S2 style system. Tags with
83             this value set to off are still usable, they're just not exposed to S2.
84              
85             =head2 security_level
86              
87             The security (visibility) of the tag being returned. This can be one of 'public',
88             'private', 'friends', or 'group'.
89              
90             =head2 uses
91              
92             Number of times the tag has been used.
93              
94             =head2 security
95              
96             Shows the breakdown of use by security category.
97              
98             =over 4
99              
100             =item $tag-E<gt>security-E<gt>{public}
101              
102             The number of times this tag has been used on a public post.
103              
104             =item $tag-E<gt>security-E<gt>{private}
105              
106             The number of times this tag has been used on a private post.
107              
108             =item $tag-E<gt>security-E<gt>{friends}
109              
110             The number of times this tag has been used on a Friends-only post.
111              
112             =item $tag-E<gt>security-E<gt>{groups}
113              
114             Hash containing the breakdown by group, keys are the group name and values are the counts.
115              
116             =back
117              
118             =head1 AUTHOR
119              
120             Graham Ollis <plicease@cpan.org>
121              
122             =head1 COPYRIGHT AND LICENSE
123              
124             This software is copyright (c) 2013 by Graham Ollis.
125              
126             This is free software; you can redistribute it and/or modify it under
127             the same terms as the Perl 5 programming language system itself.
128              
129             =cut