Skip to content

Commit

Permalink
Document delegations to the response object.
Browse files Browse the repository at this point in the history
These are really useful for error handling and debugging.
  • Loading branch information
schwern committed Nov 4, 2014
1 parent 9a17ded commit 3dfbd30
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/Pithub/Result.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ has 'content' => (
lazy => 1,
);

=method raw_content
Returns the content of the API response as a string, it will probably
be JSON.
=attr first_page_uri
The extracted value from the C<< Link >> header for the first page.
Expand Down Expand Up @@ -141,6 +146,20 @@ has 'response' => (
required => 1,
);

=method request
Returns the L<HTTP::Request> object used to make the API call.
=method code
Returns the HTTP code from the API call.
=method success
Returns whether the API call was successful.
=cut

# required for next_page etc
has '_request' => (
is => 'ro',
Expand Down

0 comments on commit 3dfbd30

Please sign in to comment.