class PutIO

Defined in:

put-io-accountinfo.cr
put-io-cli.cr
put-io-entry.cr
put-io.cr

Constant Summary

PER_PAGE = 1000
VERSION = "0.1.0"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(token : String, app_id : Int64 | Nil = nil, application_secret : Nil | String = nil, client : Halite::Client | Nil = nil) #

[View source]

Class Method Detail

def self.auth_oob(app_id, *, client_name : String | Nil = nil, prompt : String | Nil = "Go to https://put.io/link and enter the code: %s", io : IO = STDERR) #

[View source]
def self.auth_oob_check(code : String) #

[View source]
def self.auth_oob_check(code : String, &) #

[View source]
def self.auth_oob_code(*, app_id, client_name : String | Nil = nil) #

[View source]
def self.auth_oob_code(*, app_id, client_name : String | Nil = nil, &) #

yield version


[View source]
def self.file_types : Array(String) #

[View source]
def self.file_types=(file_types : Array(String)) #

[View source]
def self.get(path : String, *, params : QueryParamsType = QueryParamsType.new, client : Halite::Client | Nil = nil) #

[View source]
def self.post(path : String, *, form : Hash(String, String), client : Halite::Client | Nil = nil) #

[View source]
def self.sort_keys : Array(String) #

[View source]
def self.sort_keys=(sort_keys : Array(String)) #

[View source]
def self.verbose(value : Bool) #

[View source]
def self.verbose #

[View source]
def self.verbose=(verbose : Bool) #

[View source]

Instance Method Detail

def account_info #

[View source]
def account_settings #

[View source]
def app_id : Int64 | Nil #

[View source]
def app_id=(app_id : Int64 | Nil) #

[View source]
def application_secret : String | Nil #

[View source]
def application_secret=(application_secret : String | Nil) #

[View source]
def by_id(id : Int64) #

[View source]
def by_id?(id : Int64) #

[View source]
def by_path(path : String) #

[View source]
def by_path?(path : String) #

[View source]
def children(id : Int64) #

[View source]
def client : Halite::Client #

property dbfile : Path


[View source]
def client=(client : Halite::Client) #

property dbfile : Path


[View source]
def find_child_by_name(parent_id : Int64, name : String) #

[View source]
def find_child_by_name?(parent_id : Int64, name : String) #

[View source]
def get(path : String, *, params : QueryParamsType = QueryParamsType.new) #

[View source]
def list(parent_id : Int32 = -1, *, per_page : Int32 = PutIO::PER_PAGE, sort_by : String | Nil = nil, file_types : Array(String) | Nil = nil, stream_url : Bool = false, stream_url_parent : Bool = false, mp4_stream_url : Bool = false, mp4_stream_url_parent : Bool = false, hidden : Bool = false, mp4_status : Bool = false) #

[View source]
def list(parent_id : Int32 = -1, *, per_page : Int32 = PutIO::PER_PAGE, sort_by : String | Nil = nil, file_types : Array(String) | Nil = nil, stream_url : Bool = false, stream_url_parent : Bool = false, mp4_stream_url : Bool = false, mp4_stream_url_parent : Bool = false, hidden : Bool = false, mp4_status : Bool = false, &) #

[View source]
def post(path : String, *, form : Hash(String, String) = {} of String => String) #

[View source]
def root #

[View source]
def token : String #

[View source]
def token=(token : String) #

[View source]
def tree(parent_id : Int32 = -1, *, per_page : Int32 = PutIO::PER_PAGE, sort_by : String | Nil = nil, file_types : Array(String) | Nil = nil, stream_url : Bool = false, stream_url_parent : Bool = false, mp4_stream_url : Bool = false, mp4_stream_url_parent : Bool = false, hidden : Bool = false, mp4_status : Bool = false) #

[View source]