WebService::Toggl::Role::Base - Common behavior for all WebService::Toggl objects
This role provide behavior common to all WebService::Toggl::API:: and WebService::Toggl::Report:: objects.
WebService::Toggl::API::
WebService::Toggl::Report::
The API token used to identify the authorized user. If you don't provide this, you'll need to supply the _request attribute.
_request
The base URL for the Toggl API server. Defaults to 'https://www.toggl.com'.
The object that sets the headers and makes the requests. Defaults to a WebService::Toggl::Request object that uses Role::REST::Client.
These are proxy methods to the get, post, put, and delete methods available on the _request object via Role::REST::Client.
get
post
put
delete
Creates a new object of type WebService::Toggl::API::$class. The new object receives the _request attribute of the calling object, and so does not need the api_key attribute to be set. \%args will be passed through to the constructor of the new object.
WebService::Toggl::API::$class
api_key
\%args
Similar to new_item() but sets the new object's raw attribute to the \%raw argument. This obviates the need for querying the API to get the object.
new_item()
raw
\%raw
Same as new_item(), but creates an object of type WebService::Toggl::Report::$class.
WebService::Toggl::Report::$class
Proxies to new_item(). If API Items and Sets are split into different classes, this may change.
Proxies to new_item_from_raw(). If API Items and Sets are split into different classes, this may change.
new_item_from_raw()
Copyright (C) Fitz Elliott.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Fitz Elliott <felliott@fiskur.org>
To install WebService::Toggl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Toggl
CPAN shell
perl -MCPAN -e shell install WebService::Toggl
For more information on module installation, please visit the detailed CPAN module installation guide.