WebService::MyGengo::RequestFactory - A factory for creating myGengo API requests
Returns various WebService::MyGengo::Request objects to be sent to the API.
# Note: Requests are usually created automatically by WebService::MyGengo::Client my $req_factory = new WebService::MyGengo::RequestFactory({ public_key => $pubkey , private_key => $privkey , root_uri => $api_uri }); my $req = $req_factory->new_request( $method, $endpoint, \%params ); # Alternate constructor syntax my $req_factory = new WebService::MyGengo::RequestFactory( $pubkey , $privkey , $api_uri );
All attributes are read-only. If, for some reason, you need to generate requests for a different keypair or root_uri, just make a new RequestFactory.
Your public API key.
Your private API key
The URI to be used as the base for all API endpoints.
eg, 'http://api.sandbox.mygengo.com/v1.1'
Returns an HTTP::Request object for the given API endpoint.
Nathaniel Heinrichs
Copyright (c) 2011, Nathaniel Heinrichs <nheinric-at-cpan.org>. All rights reserved.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
To install WebService::MyGengo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::MyGengo
CPAN shell
perl -MCPAN -e shell install WebService::MyGengo
For more information on module installation, please visit the detailed CPAN module installation guide.