Class: Decommas::Api
Constant Summary collapse
- PAGINATION_LIMIT =
100
Class Method Summary collapse
- .all_coins_metadata ⇒ Object
- .all_tokens_metadata ⇒ Object
- .coins(address:, options: {}) ⇒ Object
- .nfts(address:, options: {}) ⇒ Object
- .protocols(address:, options: {}) ⇒ Object
- .response_class ⇒ Object
- .token_metadata(chain_name:, contract_address:) ⇒ Object
- .tokens(address:, options: {}) ⇒ Object
- .transaction_erc20_transfers(chain_name:, tx:) ⇒ Object
- .transactions(address:, limit: nil, offset: nil) ⇒ Object
- .transfers_erc20(address:, limit: nil, offset: nil) ⇒ Object
- .transfers_nft(address:, options: {}) ⇒ Object
Methods inherited from Base
Class Method Details
.all_coins_metadata ⇒ Object
52 53 54 |
# File 'lib/decommas/api.rb', line 52 def wget("/all_coins_metadata") end |
.all_tokens_metadata ⇒ Object
48 49 50 |
# File 'lib/decommas/api.rb', line 48 def wget("/all_tokens_metadata") end |
.coins(address:, options: {}) ⇒ Object
8 9 10 |
# File 'lib/decommas/api.rb', line 8 def coins(address:, options: {}) wget("/coins/#{address}", query: ) end |
.nfts(address:, options: {}) ⇒ Object
16 17 18 |
# File 'lib/decommas/api.rb', line 16 def nfts(address:, options: {}) wget("/nfts/#{address}", query: ) end |
.protocols(address:, options: {}) ⇒ Object
40 41 42 |
# File 'lib/decommas/api.rb', line 40 def protocols(address:, options: {}) wget("/protocols/#{address}", query: ) end |
.response_class ⇒ Object
60 61 62 |
# File 'lib/decommas/api.rb', line 60 def response_class Decommas::Response::Api end |
.token_metadata(chain_name:, contract_address:) ⇒ Object
56 57 58 |
# File 'lib/decommas/api.rb', line 56 def (chain_name:, contract_address:) wget("/token_metadata/#{chain_name}/#{contract_address}") end |
.tokens(address:, options: {}) ⇒ Object
12 13 14 |
# File 'lib/decommas/api.rb', line 12 def tokens(address:, options: {}) wget("/tokens/#{address}", query: ) end |
.transaction_erc20_transfers(chain_name:, tx:) ⇒ Object
44 45 46 |
# File 'lib/decommas/api.rb', line 44 def transaction_erc20_transfers(chain_name:, tx:) wget("/transaction_erc20_transfers/#{chain_name}/#{tx}") end |
.transactions(address:, limit: nil, offset: nil) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/decommas/api.rb', line 20 def transactions(address:, limit: nil, offset: nil) query_params = { "limit" => limit || PAGINATION_LIMIT, "offset" => (offset if offset) }.compact wget("/transactions/#{address}", query: query_params) end |
.transfers_erc20(address:, limit: nil, offset: nil) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/decommas/api.rb', line 28 def transfers_erc20(address:, limit: nil, offset: nil) query_params = { "limit" => limit || PAGINATION_LIMIT, "offset" => (offset if offset) }.compact wget("/transfers_erc20/#{address}", query: query_params) end |
.transfers_nft(address:, options: {}) ⇒ Object
36 37 38 |
# File 'lib/decommas/api.rb', line 36 def transfers_nft(address:, options: {}) wget("/transfers_nft/#{address}", query: ) end |