NAME

Net::API::Gett::User - Gett User object

PURPOSE

This class encapsulates Gett service user functions. You normally shouldn't instanstiate this class on its own as the library will create and return this object when appropriate.

ATTRIBUTES

Here are the attributes of this class. They are read only.

api_key

Scalar string. has_api_key predicate.

email

Scalar string. has_email predicate.

password

Scalar string. has_password predicate.

access_token

Scalar string. Populated by login call. has_access_token() predicate.

access_token_expiration

Scalar integer. Unix epoch seconds until an access token is no longer valid which is currently 24 hours (86400 seconds) from token acquisition. This value is suitable for use in a call to localtime().

refresh_token

Scalar string. Populated by login call. Can be used to generate a new valid access token without reusing an email/password login method. has_refresh_token() predicate.

request

This is a Net::API::Gett::Request object. Defaults to a new instance of that class.

userid

Scalar string.

fullname

Scalar string.

email

Scalar string.

storage_used

Scalar integer. In bytes.

storage_limit

Scalar integer. In bytes.

METHODS

login()

This method populates the access_token, refresh_token and user attributes. It usually doesn't need to be explicitly called since methods which require an access token will automatically (and lazily) attempt to log in to the API and get one.

Returns a perl hash representation of the JSON output for https://open.ge.tt/1/users/login.

refresh()

Refreshes user data.

SEE ALSO

Net::API::Gett