| 1 | package WWW::TypePad::Conversations; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | # Install an accessor into WWW::TypePad to access an instance of this class | ||
| 7 | # bound to the WWW::TypePad instance. | ||
| 8 | sub WWW::TypePad::conversations { __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::Conversations - Conversations API methods | ||
| 19 | |||
| 20 | =head1 METHODS | ||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | use strict; | ||
| 25 | use Any::Moose; | ||
| 26 | extends 'WWW::TypePad::Noun'; | ||
| 27 | |||
| 28 | use Carp (); | ||
| 29 | |||
| 30 | |||
| 31 | =pod | ||
| 32 | |||
| 33 | =over 4 | ||
| 34 | |||
| 35 | |||
| 36 | =item add_external_response | ||
| 37 | |||
| 38 | my $res = $tp->conversations->add_external_response($id); | ||
| 39 | |||
| 40 | Record a response to a conversation originating from somewhere other than a TypePad blog. | ||
| 41 | |||
| 42 | Returns hash reference which contains following properties. | ||
| 43 | |||
| 44 | =over 8 | ||
| 45 | |||
| 46 | =item response | ||
| 47 | |||
| 48 | (ConversationResponse) A ConversationResponse object representing the created response. | ||
| 49 | |||
| 50 | |||
| 51 | =back | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | sub add_external_response { | ||
| 56 | my $api = shift; | ||
| 57 | my @args; | ||
| 58 | push @args, shift; # id | ||
| 59 | my $uri = sprintf '/conversations/%s/add-external-response.json', @args; | ||
| 60 | $api->base->call("POST", $uri, @_); | ||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | =pod | ||
| 65 | |||
| 66 | |||
| 67 | |||
| 68 | =item add_poll_response | ||
| 69 | |||
| 70 | my $res = $tp->conversations->add_poll_response($id); | ||
| 71 | |||
| 72 | Record a response choosing one of the polling options for this conversation. | ||
| 73 | |||
| 74 | Returns hash reference which contains following properties. | ||
| 75 | |||
| 76 | =over 8 | ||
| 77 | |||
| 78 | =item responseToken | ||
| 79 | |||
| 80 | (string) A secret token associated with the responseId. | ||
| 81 | |||
| 82 | =item responseId | ||
| 83 | |||
| 84 | (string) An identifier for the poll response. | ||
| 85 | |||
| 86 | |||
| 87 | =back | ||
| 88 | |||
| 89 | =cut | ||
| 90 | |||
| 91 | sub add_poll_response { | ||
| 92 | my $api = shift; | ||
| 93 | my @args; | ||
| 94 | push @args, shift; # id | ||
| 95 | my $uri = sprintf '/conversations/%s/add-poll-response.json', @args; | ||
| 96 | $api->base->call("POST", $uri, @_); | ||
| 97 | } | ||
| 98 | |||
| 99 | |||
| 100 | =pod | ||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | =item get_responses | ||
| 105 | |||
| 106 | my $res = $tp->conversations->get_responses($id); | ||
| 107 | |||
| 108 | Retrieve a list of responses for the selected conversation. | ||
| 109 | |||
| 110 | Returns StreamE<lt>ConversationResponseE<gt> which contains following properties. | ||
| 111 | |||
| 112 | =over 8 | ||
| 113 | |||
| 114 | =item totalResults | ||
| 115 | |||
| 116 | (integer) The total number of items in the whole stream of which this response contains a subset. CE<lt>nullE<gt> if an exact count cannot be determined. | ||
| 117 | |||
| 118 | =item estimatedTotalResults | ||
| 119 | |||
| 120 | (integer) An estimate of the total number of items in the whole list of which this response contains a subset. CE<lt>nullE<gt> if a count cannot be determined at all, or if an exact count is returned in CE<lt>totalResultsE<gt>. | ||
| 121 | |||
| 122 | =item moreResultsToken | ||
| 123 | |||
| 124 | (string) An opaque token that can be used as the CE<lt>start-tokenE<gt> parameter of a followup request to retrieve additional results. CE<lt>nullE<gt> if there are no more results to retrieve, but the presence of this token does not guarantee that the response to a followup request will actually contain results. | ||
| 125 | |||
| 126 | =item entries | ||
| 127 | |||
| 128 | (arrayE<lt>ConversationResponseE<gt>) A selection of items from the underlying stream. | ||
| 129 | |||
| 130 | |||
| 131 | =back | ||
| 132 | |||
| 133 | =cut | ||
| 134 | |||
| 135 | sub get_responses { | ||
| 136 | my $api = shift; | ||
| 137 | my @args; | ||
| 138 | push @args, shift; # id | ||
| 139 | my $uri = sprintf '/conversations/%s/responses.json', @args; | ||
| 140 | $api->base->call("GET", $uri, @_); | ||
| 141 | } | ||
| 142 | |||
| 143 | |||
| 144 | sub responses { | ||
| 145 | my $self = shift; | ||
| 146 | Carp::carp("'responses' is deprecated. Use 'get_responses' instead."); | ||
| 147 | $self->get_responses(@_); | ||
| 148 | } | ||
| 149 | |||
| 150 | =pod | ||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | =item get_featured_responses | ||
| 155 | |||
| 156 | my $res = $tp->conversations->get_featured_responses($id); | ||
| 157 | |||
| 158 | Retrieve a list of featured responses for the selected conversation. | ||
| 159 | |||
| 160 | Returns StreamE<lt>ConversationResponseE<gt> which contains following properties. | ||
| 161 | |||
| 162 | =over 8 | ||
| 163 | |||
| 164 | =item totalResults | ||
| 165 | |||
| 166 | (integer) The total number of items in the whole stream of which this response contains a subset. CE<lt>nullE<gt> if an exact count cannot be determined. | ||
| 167 | |||
| 168 | =item estimatedTotalResults | ||
| 169 | |||
| 170 | (integer) An estimate of the total number of items in the whole list of which this response contains a subset. CE<lt>nullE<gt> if a count cannot be determined at all, or if an exact count is returned in CE<lt>totalResultsE<gt>. | ||
| 171 | |||
| 172 | =item moreResultsToken | ||
| 173 | |||
| 174 | (string) An opaque token that can be used as the CE<lt>start-tokenE<gt> parameter of a followup request to retrieve additional results. CE<lt>nullE<gt> if there are no more results to retrieve, but the presence of this token does not guarantee that the response to a followup request will actually contain results. | ||
| 175 | |||
| 176 | =item entries | ||
| 177 | |||
| 178 | (arrayE<lt>ConversationResponseE<gt>) A selection of items from the underlying stream. | ||
| 179 | |||
| 180 | |||
| 181 | =back | ||
| 182 | |||
| 183 | =cut | ||
| 184 | |||
| 185 | sub get_featured_responses { | ||
| 186 | my $api = shift; | ||
| 187 | my @args; | ||
| 188 | push @args, shift; # id | ||
| 189 | my $uri = sprintf '/conversations/%s/responses/@featured.json', @args; | ||
| 190 | $api->base->call("GET", $uri, @_); | ||
| 191 | } | ||
| 192 | |||
| 193 | |||
| 194 | sub featured_responses { | ||
| 195 | my $self = shift; | ||
| 196 | Carp::carp("'featured_responses' is deprecated. Use 'get_featured_responses' instead."); | ||
| 197 | $self->get_featured_responses(@_); | ||
| 198 | } | ||
| 199 | |||
| 200 | =pod | ||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | =item get_from_voices_responses | ||
| 205 | |||
| 206 | my $res = $tp->conversations->get_from_voices_responses($id); | ||
| 207 | |||
| 208 | Retrieve a list of responses from invited participants for the selected conversation. | ||
| 209 | |||
| 210 | Returns StreamE<lt>ConversationResponseE<gt> which contains following properties. | ||
| 211 | |||
| 212 | =over 8 | ||
| 213 | |||
| 214 | =item totalResults | ||
| 215 | |||
| 216 | (integer) The total number of items in the whole stream of which this response contains a subset. CE<lt>nullE<gt> if an exact count cannot be determined. | ||
| 217 | |||
| 218 | =item estimatedTotalResults | ||
| 219 | |||
| 220 | (integer) An estimate of the total number of items in the whole list of which this response contains a subset. CE<lt>nullE<gt> if a count cannot be determined at all, or if an exact count is returned in CE<lt>totalResultsE<gt>. | ||
| 221 | |||
| 222 | =item moreResultsToken | ||
| 223 | |||
| 224 | (string) An opaque token that can be used as the CE<lt>start-tokenE<gt> parameter of a followup request to retrieve additional results. CE<lt>nullE<gt> if there are no more results to retrieve, but the presence of this token does not guarantee that the response to a followup request will actually contain results. | ||
| 225 | |||
| 226 | =item entries | ||
| 227 | |||
| 228 | (arrayE<lt>ConversationResponseE<gt>) A selection of items from the underlying stream. | ||
| 229 | |||
| 230 | |||
| 231 | =back | ||
| 232 | |||
| 233 | =cut | ||
| 234 | |||
| 235 | sub get_from_voices_responses { | ||
| 236 | my $api = shift; | ||
| 237 | my @args; | ||
| 238 | push @args, shift; # id | ||
| 239 | my $uri = sprintf '/conversations/%s/responses/@from-voices.json', @args; | ||
| 240 | $api->base->call("GET", $uri, @_); | ||
| 241 | } | ||
| 242 | |||
| 243 | |||
| 244 | sub from_voices_responses { | ||
| 245 | my $self = shift; | ||
| 246 | Carp::carp("'from_voices_responses' is deprecated. Use 'get_from_voices_responses' instead."); | ||
| 247 | $self->get_from_voices_responses(@_); | ||
| 248 | } | ||
| 249 | |||
| 250 | =pod | ||
| 251 | |||
| 252 | =back | ||
| 253 | |||
| 254 | =cut | ||
| 255 | |||
| 256 | ### END auto-generated | ||
| 257 | |||
| 258 | 1; |