Net::API::Gett::File - Gett file object
Encapsulate Gett files. You normally shouldn't instantiate this class on its own, as the library will create and return this object as appropriate.
These are read only attributes unless otherwise noted.
Scalar string.
Scalar integer. The number of times this particular file has been downloaded
Scalar string. Signifies the state a particular file is in. See the Gett developer docs for more information.
Scalar string. The URL to use in a browser to access a file.
Scalar string. The URL to use to get the file contents.
Scalar integer. The size in bytes of this file.
Scalar integer. The Unix epoch time when this file was created in Gett. This value is suitable for use in localtime().
localtime()
Scalar string. The share in which this file lives inside.
Scalar string. The url to use to upload the contents of this file using the PUT method. (This attribute is only populated during certain times.)
Scalar string. This url to use to upload the contents of this file using the POST method. (This attribute is only populated during certain times.)
Scalar integer. This is the chunk size to use for file uploads. It defaults to 1,048,576 bytes (1 MB). This attribute is read-only.
Net::API::Gett::User object. has_user() predicate.
has_user()
Net::API::Gett::Request object.
This method actually uploads the file to the Gett service. This method is normally invoked by the upload_file() method, but it might be useful in combination with get_upload_url(). It takes the following parameters:
upload_file()
get_upload_url()
a Gett put upload url
data
a scalar representing the file contents which can be one of: a buffer, an IO::Handle object, or a file pathname.
encoding
an encoding scheme. By default, it uses :raw.
:raw
chunk_size
The maximum chunksize to load into to memory at one time. If the file to transmit is larger than this size, it will be dynamically streamed.
Returns a true value on success.
This method returns a scalar PUT upload URL for the specified sharename/fileid parameters. Potentially useful in combination with send_file().
send_file()
This method destroys the file represented by the object. Returns a true value on success.
This method retrieves the contents of a this file in the Gett service. You are responsible for outputting the file (if desired) with any appropriate encoding. Does not require an access token.
This method returns a thumbnail if the file in Gett is an image. Does not require an access token, but is really only meaningful if the data is a valid image format file.
Net::API::Gett
To install Net::API::Gett, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::API::Gett
CPAN shell
perl -MCPAN -e shell install Net::API::Gett
For more information on module installation, please visit the detailed CPAN module installation guide.