class PutIO::Transfer

Included Modules

Defined in:

put-io-transfer.cr

Constructors

Class Method Summary

Instance Method Summary

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(pull : JSON::PullParser) #

[View source]
def self.new(obj : Hash(String, JSON::Any)) #

[View source]
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) #

[View source]

Class Method Detail

def self.[](id : Int64) #

[View source]
def self.[]=(id : Int64, entry : self) #

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

[View source]
def self.entries : Hash(Int64, self) #

[View source]
def self.entries=(entries : Hash(Int64, self)) #

[View source]
def self.register(entry : self) #

[View source]

Instance Method Detail

def availability : Int32 | Nil #

[View source]
def availability=(availability : Int32 | Nil) #

[View source]
def callback_url : String | Nil #

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

[View source]
def client_ip : String #

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

[View source]
def completed? #

[View source]
def completion_percent : Int32 #

[View source]
def completion_percent=(completion_percent : Int32) #

[View source]
def created_at : Time #

[View source]
def created_at=(created_at : Time) #

[View source]
def created_torrent : Bool #

[View source]
def created_torrent=(created_torrent : Bool) #

[View source]
def current_ratio : Float64 #

[View source]
def current_ratio=(current_ratio : Float64) #

[View source]
def done? #

[View source]
def down_speed : Int32 #

[View source]
def down_speed=(down_speed : Int32) #

[View source]
def download_id : Int64 #

[View source]
def download_id=(download_id : Int64) #

[View source]
def downloaded : Int64 #

[View source]
def downloaded=(downloaded : Int64) #

[View source]
def downloading? #

[View source]
def error? #

[View source]
def error_message : String | Nil #

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

[View source]
def estimated_time : Int32 | Nil #

[View source]
def estimated_time=(estimated_time : Int32 | Nil) #

[View source]
def file_id : Int64 | Nil #

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

[View source]
def finished_at : Time | Nil #

[View source]
def finished_at=(finished_at : Time | Nil) #

[View source]
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.


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

[View source]
def id : Int64 #

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

[View source]
def is_private : Bool #

[View source]
def is_private=(is_private : Bool) #

[View source]
def name : String #

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

[View source]
def peers : Int32 | Nil #

[View source]
def peers=(peers : Int32 | Nil) #

[View source]
def peers_connected : Int32 #

[View source]
def peers_connected=(peers_connected : Int32) #

[View source]
def peers_getting_from_us : Int32 #

[View source]
def peers_getting_from_us=(peers_getting_from_us : Int32) #

[View source]
def peers_sending_to_us : Int32 #

[View source]
def peers_sending_to_us=(peers_sending_to_us : Int32) #

[View source]
def percent_complete : Int32 #

[View source]
def percent_done : Int32 #

[View source]
def percent_done=(percent_done : Int32) #

[View source]
def queued? #

[View source]
def running? #

[View source]
def save_parent_id : Int64 #

[View source]
def save_parent_id=(save_parent_id : Int64) #

[View source]
def seconds_seeding : Int32 | Nil #

[View source]
def seconds_seeding=(seconds_seeding : Int32 | Nil) #

[View source]
def seeding? #

[View source]
def simulated : Bool | Nil #

[View source]
def simulated=(simulated : Bool | Nil) #

[View source]
def size : Int64 #

[View source]
def size=(size : Int64) #

[View source]
def source : String #

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

[View source]
def started_at : Time | Nil #

[View source]
def started_at=(started_at : Time | Nil) #

[View source]
def status : Status #

[View source]
def status=(status : Status) #

[View source]
def status_message : String #

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

[View source]
def subscription_id : Int32 | Nil #

[View source]
def subscription_id=(subscription_id : Int32 | Nil) #

[View source]
def to_ansi(io : IO) #

[View source]
def to_ascii(io : IO) #

[View source]
def torrent_link : String #

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

[View source]
def tracker : String #

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

[View source]
def tracker_message : String | Nil #

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

[View source]
def type : TransferType #

[View source]
def type=(type : TransferType) #

[View source]
def up_speed : Int32 #

[View source]
def up_speed=(up_speed : Int32) #

[View source]
def updated_at : Time | Nil #

[View source]
def updated_at=(updated_at : Time | Nil) #

[View source]
def uploaded : Int64 #

[View source]
def uploaded=(uploaded : Int64) #

[View source]
def waiting? #

[View source]