yaq/daemons/gdrive


Upload files to a specified google drive folder

bugtracker
source

installation

The gdrive daemon can be installed using the following package managers:

PyPI

traits

The gdrive daemon is composed of the following traits:

is-daemon

configuration

authorization_url (string) default: https://accounts.google.com/o/oauth2/v2/auth

client_id (string)

client_secret (string)

create_file_url (string) default: https://www.googleapis.com/upload/drive/v3/files

download_url (string) default: https://drive.google.com/uc?id={file_id}

generate_ids_url (string) default: https://www.googleapis.com/drive/v3/files/generateIds

make (['null', 'string']) default: None

model (['null', 'string']) default: None

open_url (string) default: https://drive.google.com/open?id={file_id}

port (int)
TCP port for daemon to occupy.

root_folder_id (string)

scopes (array) default: ['https://www.googleapis.com/auth/drive.file']

serial (['null', 'string']) default: None
Serial number for the particular device represented by the daemon

token_url (string) default: https://www.googleapis.com/oauth2/v4/token

update_file_url (string) default: https://www.googleapis.com/upload/drive/v3/files/{file_id}

state

The gdrive daemon will provide the following state information:

access_token (['null', 'string'])

copy_queue (array)

id_mapping (map)

refresh_token (['null', 'string'])

upload_queue (array)

messages

The gdrive daemon will expose the following public messages:

busy ➜ boolean
Returns true if daemon is currently busy.

create_file ➜ null
Create a new file on the remote drive
parameters:

path (string)

parent_id (['null', 'string']) default: None

id (['null', 'string']) default: None

create_folder ➜ null
Create a new folder in the remote drive
parameters:

path (string)

parent_id (['null', 'string']) default: None

id (['null', 'string']) default: None

get_config ➜ string
Full configuration for the individual daemon as defined in the TOML file. This includes defaults and shared settings not directly specified in the daemon-specific TOML table.

get_config_filepath ➜ string
String representing the absolute filepath of the configuration file on the host machine.

get_state ➜ string
Get version of the running daemon

id ➜ {'type': 'map', 'values': ['null', 'string']}
JSON object with information to identify the daemon, including name, kind, make, model, serial.

id_to_download_url ➜ string
Format an id in a url suitable to download the file.
parameters:

id (string)

id_to_open_url ➜ string
Format an id in a url suitable to open the file.
parameters:

id (string)

is_uploaded ➜ boolean
Check if a particular file has been procesed and uploaded
parameters:

id (string)

reserve_id ➜ string
Insert an id mapping into the state
parameters:

client_id (string)

drive_id (['null', 'string']) default: None
If not given use an existing id if possible or retrieve a new one.

shutdown ➜ null
Cleanly shutdown (or restart) daemon.
parameters:

restart (boolean) default: False

update_file ➜ null
Update the contents of an existing file
parameters:

path (string)

parent_id (['null', 'string']) default: None

id (['null', 'string']) default: None

upload_folder ➜ null
Upload a folder and its contents, recursively, to the remote drive
parameters:

path (string)

parent_id (['null', 'string']) default: None

id (['null', 'string']) default: None


built 2020-10-27 13:47:08                                      CC0: no copyright