-
Notifications
You must be signed in to change notification settings - Fork 3
File API
Shane Barbetta edited this page Jul 25, 2018
·
9 revisions
Methods for uploading and managing data files (technically a subset of the Scripting API).
List all files in account
Retrieve file info
Delete a file
Upload a file
list()
List all files in account
Example:
c.file().list()retrieve()
Retrieve file info
Example:
c.file('file_id').retrieve()delete()
Delete a file
Example:
c.file('file_id').delete()upload(string file_path, string mime_type)
Upload a file
Arguments:
file_path - Path to the file on the system making the request
(optional) mime_type - The file's MIME type. The client will guess if not specified
Example:
c.file().upload('~/myfile.txt', 'text/plain')