Class: Bytom::Client
Overview
The entry point to the SDK. API endpoint categories are accessed through this object’s readable attributes.
Constant Summary
Constants included from Constants
Instance Attribute Summary collapse
- #access_token ⇒ AccessToken readonly
- #accounts ⇒ Accounts readonly
- #address ⇒ Address readonly
- #asset ⇒ Asset readonly
- #balances ⇒ Balances readonly
- #block ⇒ Block readonly
- #client ⇒ Client readonly
- #coinbase ⇒ Coinbase readonly
- #core_config ⇒ CoreConfig readonly
- #keys ⇒ Keys readonly
- #message ⇒ Message readonly
- #other ⇒ Other readonly
- #peer ⇒ Peer readonly
- #transactions ⇒ Transactions readonly
- #wallet ⇒ Wallet readonly
- #work ⇒ Work readonly
Instance Method Summary collapse
- #build_categories ⇒ Object
-
#initialize(base_url: API_URL, token: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Attribute Details
#access_token ⇒ AccessToken (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#accounts ⇒ Accounts (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#address ⇒ Address (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#asset ⇒ Asset (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#balances ⇒ Balances (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#block ⇒ Block (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#client ⇒ Client (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#coinbase ⇒ Coinbase (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#core_config ⇒ CoreConfig (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#keys ⇒ Keys (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#message ⇒ Message (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#other ⇒ Other (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#peer ⇒ Peer (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#transactions ⇒ Transactions (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#wallet ⇒ Wallet (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
#work ⇒ Work (readonly)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bytom/client.rb', line 57 class Client include Bytom::Constants attr_reader :client, :keys, :accounts, :address, :coinbase, :asset, :balances, :access_token, :transactions, :block, :core_config, :peer, :wallet, :message, :work, :other def initialize( base_url: API_URL, token: nil ) @client = Request.new(base_url: base_url, token: token) build_categories end def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end end |
Instance Method Details
#build_categories ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/bytom/client.rb', line 70 def build_categories @keys = Keys.new(client) @accounts = Accounts.new(client) @address = Address.new(client) @coinbase = Coinbase.new(client) @asset = Asset.new(client) @balances = Balances.new(client) @access_token = AccessToken.new(client) @transactions = Transactions.new(client) @block = Block.new(client) @core_config = CoreConfig.new(client) @peer = Peer.new(client) @wallet = Wallet.new(client) @message = Message.new(client) @work = Work.new(client) @other = Other.new(client) end |