Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

WebService::30Boxes::API::Response
Response from 30Boxes REST API

WebService::30Boxes::API::Response - Response from 30Boxes REST API


NAME

WebService::30Boxes::API::Response - Response from 30Boxes REST API


SYNOPSIS


  use WebService::30Boxes::API;

  # You always have to provide your api_key

  my $boxes  = WebService::30Boxes::API->(api_key => 'your_api_key');

  # Then you might want to lookup a user and print some info

  my $result = $boxes->call('user.FindById', { id => 47 });

  if($result->{'success'}) {

     my $user   = $result->reply->{'user'};

  

     print $user->{'firstName'}, " ",

           $user->{'lastName'}, " joined 30Boxes at ",

           $user->{'createDate'},"\n";

  } else {

     print "An error occured ($result->{'error_code'}: ".

           "$result->{'error_msg'})";

  }


DESCRIPTION

WebService::30Boxes::API::Response- Response from 30Boxes API

The response object is basically a the HTTP::Request manpage class, with a few things added. These keys can be queried:

success
Was the call succesful?

error_code
If not succesful, what error code did we get?

error_msg
And the error message

METHODS

reply

reply returns the result of the XML::Simple manpage's parsing of the 30Boxes reply. See the example above.


SEE ALSO

the WebService::30Boxes::API manpage, the HTTP::Request manpage, the XML::Simple manpage


BUGS

Please report any bugs to http://rt.cpan.org/Ticket/Create.html


AUTHOR

M. Blom, <blom@cpan.org>, http://menno.b10m.net/perl/


COPYRIGHT AND LICENSE

Copyright (C) 2006 by M. Blom

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy