Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for the Dropbox API interactions
func DefaultClient ¶
DefaultClient returns the client with the default config
func (Client) CreateLink ¶
CreateLink handles the filename and returns the Link object
type Config ¶
type Config struct { DropboxPath string `json:"dropbox_path"` GifDir string `json:"dropbox_gif_dir"` APIToken string `json:"dropbox_api_token"` Path string Loaded bool }
Config is the object to be used when working with Client
func (Config) DatabasePath ¶
DatabasePath provides the full path to the database file
func (Config) Environment ¶
Environment returns the environment for the Config
func (Config) LoadedPath ¶
LoadedPath provides the full path to the loaded config file
type Link ¶
type Link struct { Tag string `json:".tag"` URL string `json:"url"` ID string `json:"id"` Name string `json:"name"` Path string `json:"path_lower"` Permissions LinkPermissions `json:"link_permissions"` ClientModified string `json:"client_modified"` ServerModified string `json:"server_modified"` Revision string `json:"rev"` FileSize int `json:"size"` GifsDir string }
Link is the data that is provided from the Dropbox API
func (Link) DirectLink ¶
DirectLink returns the embeddable string From: https://www.dropbox.com/s/eqoo012hoa0wq7k/taylor%20bat%20focused.gif?dl=0 To: https://dl.dropboxusercontent.com/s/eqoo012hoa0wq7k/taylor%20bat%20focused.gif
type LinkPermissions ¶
type LinkPermissions struct { ResolvedVisibility LinkTag `json:"resolved_visibility"` RequestedVisibility LinkTag `json:"requested_visibility"` CanRevoke bool `json:"can_revoke"` }
LinkPermissions are the permissions that Dropbox as assigned