class PutIO::Transfer
- PutIO::Transfer
- Reference
- Object
Included Modules
- JSON::Serializable
- PutIO::Util
Defined in:
put-io-transfer.crConstructors
- .new(pull : JSON::PullParser)
- .new(obj : Hash(String, JSON::Any))
- .new(*, availability : Int32 | Nil, callback_url : Nil | String = nil, client_ip : String, completion_percent : Int32, created_at : Time, created_torrent : Bool, current_ratio : Float64, downloaded : Int64, download_id : Int64, down_speed : Int32, error_message : Nil | String = nil, estimated_time : Int32 | Nil = nil, file_id : Int64 | Nil, finished_at : Time | Nil = nil, hash : String, id : Int64, is_private : Bool, name : String, peers : Int32 | Nil, peers_connected : Int32, peers_getting_from_us : Int32, peers_sending_to_us : Int32, percent_done : Int32, save_parent_id : Int64, seconds_seeding : Int32 | Nil = nil, simulated : Bool | Nil = nil, size : Int64, source : String, started_at : Time | Nil = nil, status : PutIO::Transfer::Status, status_message : String, subscription_id : Int32 | Nil = nil, torrent_link : String, tracker : String, tracker_message : Nil | String = nil, type : PutIO::Transfer::TransferType, updated_at : Time | Nil = nil, uploaded : Int64, up_speed : Int32)
Class Method Summary
- .[](id : Int64)
- .[]=(id : Int64, entry : self)
- .[]?(id : Int64)
- .entries : Hash(Int64, self)
- .entries=(entries : Hash(Int64, self))
- .register(entry : self)
Instance Method Summary
- #availability : Int32 | Nil
- #availability=(availability : Int32 | Nil)
- #callback_url : String | Nil
- #callback_url=(callback_url : String | Nil)
- #client_ip : String
- #client_ip=(client_ip : String)
- #completed?
- #completion_percent : Int32
- #completion_percent=(completion_percent : Int32)
- #created_at : Time
- #created_at=(created_at : Time)
- #created_torrent : Bool
- #created_torrent=(created_torrent : Bool)
- #current_ratio : Float64
- #current_ratio=(current_ratio : Float64)
- #done?
- #down_speed : Int32
- #down_speed=(down_speed : Int32)
- #download_id : Int64
- #download_id=(download_id : Int64)
- #downloaded : Int64
- #downloaded=(downloaded : Int64)
- #downloading?
- #error?
- #error_message : String | Nil
- #error_message=(error_message : String | Nil)
- #estimated_time : Int32 | Nil
- #estimated_time=(estimated_time : Int32 | Nil)
- #file_id : Int64 | Nil
- #file_id=(file_id : Int64 | Nil)
- #finished_at : Time | Nil
- #finished_at=(finished_at : Time | Nil)
-
#hash : String
Generates an
UInt64
hash value for this object. - #hash=(hash : String)
- #id : Int64
- #id=(id : Int64)
- #is_private : Bool
- #is_private=(is_private : Bool)
- #name : String
- #name=(name : String)
- #peers : Int32 | Nil
- #peers=(peers : Int32 | Nil)
- #peers_connected : Int32
- #peers_connected=(peers_connected : Int32)
- #peers_getting_from_us : Int32
- #peers_getting_from_us=(peers_getting_from_us : Int32)
- #peers_sending_to_us : Int32
- #peers_sending_to_us=(peers_sending_to_us : Int32)
- #percent_complete : Int32
- #percent_done : Int32
- #percent_done=(percent_done : Int32)
- #queued?
- #running?
- #save_parent_id : Int64
- #save_parent_id=(save_parent_id : Int64)
- #seconds_seeding : Int32 | Nil
- #seconds_seeding=(seconds_seeding : Int32 | Nil)
- #seeding?
- #simulated : Bool | Nil
- #simulated=(simulated : Bool | Nil)
- #size : Int64
- #size=(size : Int64)
- #source : String
- #source=(source : String)
- #started_at : Time | Nil
- #started_at=(started_at : Time | Nil)
- #status : Status
- #status=(status : Status)
- #status_message : String
- #status_message=(status_message : String)
- #subscription_id : Int32 | Nil
- #subscription_id=(subscription_id : Int32 | Nil)
- #to_ansi(io : IO)
- #to_ascii(io : IO)
- #torrent_link : String
- #torrent_link=(torrent_link : String)
- #tracker : String
- #tracker=(tracker : String)
- #tracker_message : String | Nil
- #tracker_message=(tracker_message : String | Nil)
- #type : TransferType
- #type=(type : TransferType)
- #up_speed : Int32
- #up_speed=(up_speed : Int32)
- #updated_at : Time | Nil
- #updated_at=(updated_at : Time | Nil)
- #uploaded : Int64
- #uploaded=(uploaded : Int64)
- #waiting?
Instance methods inherited from module PutIO::Util
time_ago(at : Time::Span, short : Bool = false)time_ago(at : Time, short : Bool = false) time_ago
Constructor Detail
def self.new(*, availability : Int32 | Nil, callback_url : Nil | String = nil, client_ip : String, completion_percent : Int32, created_at : Time, created_torrent : Bool, current_ratio : Float64, downloaded : Int64, download_id : Int64, down_speed : Int32, error_message : Nil | String = nil, estimated_time : Int32 | Nil = nil, file_id : Int64 | Nil, finished_at : Time | Nil = nil, hash : String, id : Int64, is_private : Bool, name : String, peers : Int32 | Nil, peers_connected : Int32, peers_getting_from_us : Int32, peers_sending_to_us : Int32, percent_done : Int32, save_parent_id : Int64, seconds_seeding : Int32 | Nil = nil, simulated : Bool | Nil = nil, size : Int64, source : String, started_at : Time | Nil = nil, status : PutIO::Transfer::Status, status_message : String, subscription_id : Int32 | Nil = nil, torrent_link : String, tracker : String, tracker_message : Nil | String = nil, type : PutIO::Transfer::TransferType, updated_at : Time | Nil = nil, uploaded : Int64, up_speed : Int32)
#
Class Method Detail
Instance Method Detail
def hash : String
#
Description copied from class Object
Generates an UInt64
hash value for this object.
This method must have the property that a == b
implies a.hash == b.hash
.
The hash value is used along with ==
by the Hash
class to determine if two objects
reference the same hash key.
Subclasses must not override this method. Instead, they must define hash(hasher)
,
though usually the macro def_hash
can be used to generate this method.