class PutIO
- PutIO
- Reference
- Object
Defined in:
put-io-accountinfo.crput-io-cli.cr
put-io-entry.cr
put-io.cr
Constant Summary
-
PER_PAGE =
1000
-
VERSION =
"0.1.0"
Constructors
Class Method Summary
- .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)
- .auth_oob_check(code : String)
- .auth_oob_check(code : String, &)
- .auth_oob_code(*, app_id, client_name : String | Nil = nil)
-
.auth_oob_code(*, app_id, client_name : String | Nil = nil, &)
yield version
- .file_types : Array(String)
- .file_types=(file_types : Array(String))
- .get(path : String, *, params : QueryParamsType = QueryParamsType.new, client : Halite::Client | Nil = nil)
- .post(path : String, *, form : Hash(String, String), client : Halite::Client | Nil = nil)
- .sort_keys : Array(String)
- .sort_keys=(sort_keys : Array(String))
- .verbose(value : Bool)
- .verbose
- .verbose=(verbose : Bool)
Instance Method Summary
- #account_info
- #account_settings
- #app_id : Int64 | Nil
- #app_id=(app_id : Int64 | Nil)
- #application_secret : String | Nil
- #application_secret=(application_secret : String | Nil)
- #by_id(id : Int64)
- #by_id?(id : Int64)
- #by_path(path : String)
- #by_path?(path : String)
- #children(id : Int64)
-
#client : Halite::Client
property dbfile : Path
-
#client=(client : Halite::Client)
property dbfile : Path
- #find_child_by_name(parent_id : Int64, name : String)
- #find_child_by_name?(parent_id : Int64, name : String)
- #get(path : String, *, params : QueryParamsType = QueryParamsType.new)
- #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)
- #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, &)
- #post(path : String, *, form : Hash(String, String) = {} of String => String)
- #root
- #token : String
- #token=(token : String)
- #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)
Constructor Detail
def self.new(token : String, app_id : Int64 | Nil = nil, application_secret : Nil | String = nil, client : Halite::Client | Nil = nil)
#
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)
#
def self.get(path : String, *, params : QueryParamsType = QueryParamsType.new, client : Halite::Client | Nil = nil)
#
def self.post(path : String, *, form : Hash(String, String), client : Halite::Client | Nil = nil)
#