| 1 | package WWW::TypePad::RequestProperties; | ||
| 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::request_properties { __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::RequestProperties - RequestProperties 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 get | ||
| 37 | |||
| 38 | my $res = $tp->request_properties->get(); | ||
| 39 | |||
| 40 | Retrieve some request properties. This can be useful for debugging authentication issues. | ||
| 41 | |||
| 42 | Returns RequestProperties which contains following properties. | ||
| 43 | |||
| 44 | =over 8 | ||
| 45 | |||
| 46 | =item userId | ||
| 47 | |||
| 48 | (string) The ME<lt>urlIdE<gt> of the authenticated user for this request. Ommitted if there is no authenticated user. | ||
| 49 | |||
| 50 | =item applicationId | ||
| 51 | |||
| 52 | (string) The ME<lt>urlIdE<gt> of the authenticated application for this request. Ommitted if there is no authenticated application. | ||
| 53 | |||
| 54 | =item apiKey | ||
| 55 | |||
| 56 | (string) The API key that was used for this request, if the request is using OAuth. Ommitted if the request is not using OAuth. | ||
| 57 | |||
| 58 | =item canModifyApplicationContent | ||
| 59 | |||
| 60 | (boolean) True if the caller for this request could modify content connected to the authenticated application, or false otherwise. | ||
| 61 | |||
| 62 | =item canModifyTypepadContent | ||
| 63 | |||
| 64 | (boolean) True if the caller for this request could modify content that is part of the main TypePad application, or false otherwise. | ||
| 65 | |||
| 66 | =item clientIsInternal | ||
| 67 | |||
| 68 | (boolean) True if this request came in on a channel that has access to internal-only API features. | ||
| 69 | |||
| 70 | =item remoteIpAddress | ||
| 71 | |||
| 72 | (string) The IP address of the requesting client, expressed in dotted-decimal notation. | ||
| 73 | |||
| 74 | |||
| 75 | =back | ||
| 76 | |||
| 77 | =cut | ||
| 78 | |||
| 79 | sub get { | ||
| 80 | my $api = shift; | ||
| 81 | my @args; | ||
| 82 | my $uri = sprintf '/request-properties.json', @args; | ||
| 83 | $api->base->call("GET", $uri, @_); | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | =pod | ||
| 88 | |||
| 89 | =back | ||
| 90 | |||
| 91 | =cut | ||
| 92 | |||
| 93 | ### END auto-generated | ||
| 94 | |||
| 95 | 1; |