WebService::Buxfer::Response - WebService::Buxfer::Response documentation


WebService-Buxfer documentation  | view source Contained in the WebService-Buxfer distribution.

Index


NAME

Top

WebService::Buxfer::Response

SYNOPSIS

Top

    my $response = WebService::Buxfer::Response->new(
        $lwp_ua->request(
            GET 'https://www.buxfer.com/transactions.json?token=XXX'
        )
        );

    exit 1 unless $response->ok;

    foreach ( $response->content->{response}->{transactions} ) {
        print "Result: ".Data::Dumper::Dumper($_)."\n";
    }

DESCRIPTION

Top

This is a simple class to encapsulate responses from the Buxfer webservice.

ACCESSORS

Top

* raw_response - the raw HTTP::Response object.
* content - a hashref of deserialized JSON data from the response.

METHODS

Top

new( $response )

Given an HTTP::Response object, it will parse the returned data as required.

buxfer_status( )

Returns the status string from Buxfer.

ok( )

Parses buxfer_status() and checks the HTTP::Response status to determine if the request was successful.

TODO

Top

Move some of the logic out of WebService::Buxfer into here.

Add a pager for flipping through transactions based on 25 results per page and numTransactions in the response.

ACKNOWLEDGEMENTS

Top

Portions of this package borrowed/adapted from the WebService::Solr::Response code.

Thanks to Brian Cassidy and Kirk Beers for that package.

AUTHORS

Top

Nathaniel Heinrichs <nheinric@cpan.org>

COPYRIGHT AND LICENSE

Top


WebService-Buxfer documentation  | view source Contained in the WebService-Buxfer distribution.