module Rmega

Constants

HOMEPAGE
VERSION

Public Class Methods

default_options() click to toggle source
# File lib/rmega/options.rb, line 2
def self.default_options
  {
    thread_pool_size:     4,
    max_retries:          10,
    retry_interval:       3,
    http_open_timeout:    180,
    http_read_timeout:    180,
    # http_proxy_address:   '127.0.0.1',
    # http_proxy_port:      8080,
    show_progress:        false,
    file_integrity_check: true,
    api_url:              'https://eu.api.mega.co.nz/cs'
  }
end
download(public_url, path = Dir.pwd) click to toggle source
# File lib/rmega.rb, line 39
def self.download(public_url, path = Dir.pwd)
  node = Nodes::Factory.build_from_url(public_url)
  return node.download(path)
end
logger() click to toggle source
# File lib/rmega/loggable.rb, line 2
def self.logger
  @logger ||= begin
    logger = Logger.new($stdout)
    logger.level = Logger::ERROR
    logger
  end
end
login(email, password) click to toggle source
# File lib/rmega.rb, line 35
def self.login(email, password)
  Session.new.login(email, password).storage
end
options() click to toggle source
# File lib/rmega/options.rb, line 17
def self.options
  @options ||= OpenStruct.new(default_options)
end