File Coverage

blib/lib/WWW/TypePad/Events.pm
Criterion Covered Total %
statement 15 21 71.4
branch n/a
condition n/a
subroutine 5 7 71.4
pod 1 2 50.0
total 21 30 70.0


line stmt bran cond sub pod time code
1             package WWW::TypePad::Events;
2              
3 1     1   433 use strict;
  1         3  
  1         298  
4 1     1   7 use warnings;
  1         2  
  1         79  
5              
6             # Install an accessor into WWW::TypePad to access an instance of this class
7             # bound to the WWW::TypePad instance.
8 0     0 0   sub WWW::TypePad::events { __PACKAGE__->new( base => $_[0] ) }
9              
10             ### BEGIN auto-generated
11             ### This is an automatically generated code, do not edit!
12             ### Scroll down to look for END to add additional methods
13              
14             =pod
15              
16             =head1 NAME
17              
18             WWW::TypePad::Events - Events API methods
19              
20             =head1 METHODS
21              
22             =cut
23              
24 1     1   5 use strict;
  1         2  
  1         26  
25 1     1   5 use Any::Moose;
  1         3  
  1         10  
26             extends 'WWW::TypePad::Noun';
27              
28 1     1   1005 use Carp ();
  1         2  
  1         231  
29              
30              
31             =pod
32              
33             =over 4
34              
35              
36             =item get
37              
38             my $res = $tp->events->get($id);
39              
40             Get basic information about the selected event.
41              
42             Returns Event which contains following properties.
43              
44             =over 8
45              
46             =item id
47              
48             (string) A URI that serves as a globally unique identifier for the event.
49              
50             =item urlId
51              
52             (string) A string containing the canonical identifier that can be used to identify this object in URLs. This can be used to recognise where the same event is returned in response to different requests, and as a mapping key for an application's local data store.
53              
54             =item verb
55              
56             (string) A keyword identifying the type of event this is.
57              
58             =item verbs
59              
60             (setEstringE) BEDeprecatedE An array of verb identifier URIs. This set will contain one verb identifier URI.
61              
62             =item actor
63              
64             (Entity) The user who performed the action described by this event.
65              
66             =item object
67              
68             (Base) The object to which the action described by this event was performed.
69              
70             =item published
71              
72             (datetime) The time at which the event was performed, as a W3CDTF timestamp.
73              
74              
75             =back
76              
77             =cut
78              
79             sub get {
80 0     0 1   my $api = shift;
81 0           my @args;
82 0           push @args, shift; # id
83 0           my $uri = sprintf '/events/%s.json', @args;
84 0           $api->base->call("GET", $uri, @_);
85             }
86              
87              
88             =pod
89              
90             =back
91              
92             =cut
93              
94             ### END auto-generated
95              
96             1;