module MixinBot::API::Snapshot
Public Instance Methods
network_snapshot(snapshot_id, **options)
click to toggle source
# File lib/mixin_bot/api/snapshot.rb, line 36 def network_snapshot(snapshot_id, **options) path = format('/network/snapshots/%<snapshot_id>s', snapshot_id: snapshot_id) access_token = options[:access_token] || access_token('GET', path) authorization = format('Bearer %<access_token>s', access_token: access_token) client.get(path, headers: { 'Authorization': authorization }) end
Also aliased as: read_network_snapshot
network_snapshots(**options)
click to toggle source
# File lib/mixin_bot/api/snapshot.rb, line 6 def network_snapshots(**options) path = format( '/network/snapshots?limit=%<limit>s&offset=%<offset>s&asset=%<asset>s&order=%<order>s', limit: options[:limit], offset: options[:offset], asset: options[:asset], order: options[:order] ) access_token = options[:access_token] || access_token('GET', path) authorization = format('Bearer %<access_token>s', access_token: access_token) client.get(path, headers: { 'Authorization': authorization }) end
Also aliased as: read_network_snapshots
snapshots(**options)
click to toggle source
# File lib/mixin_bot/api/snapshot.rb, line 21 def snapshots(**options) path = format( '/snapshots?limit=%<limit>s&offset=%<offset>s&asset=%<asset>s&opponent=%<opponent>s', limit: options[:limit], offset: options[:offset], asset: options[:asset], opponent: options[:opponent] ) access_token = options[:access_token] || access_token('GET', path) authorization = format('Bearer %<access_token>s', access_token: access_token) client.get(path, headers: { 'Authorization': authorization }) end
Also aliased as: read_snapshots