Module: MixinBot::API::Snapshot
- Included in:
- MixinBot::API
- Defined in:
- lib/mixin_bot/api/snapshot.rb
Instance Method Summary collapse
- #create_safe_snapshot_notification(**kwargs) ⇒ Object
- #safe_snapshot(snapshot_id, access_token: nil) ⇒ Object (also: #safe_snapshot_by_id)
- #safe_snapshots(**options) ⇒ Object
Instance Method Details
#create_safe_snapshot_notification(**kwargs) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mixin_bot/api/snapshot.rb', line 26 def create_safe_snapshot_notification(**kwargs) path = '/safe/snapshots/notifications' payload = { transaction_hash: kwargs[:transaction_hash], output_index: kwargs[:output_index], receiver_id: kwargs[:receiver_id] } client.post path, **payload, access_token: kwargs[:access_token] end |
#safe_snapshot(snapshot_id, access_token: nil) ⇒ Object Also known as: safe_snapshot_by_id
20 21 22 23 |
# File 'lib/mixin_bot/api/snapshot.rb', line 20 def safe_snapshot(snapshot_id, access_token: nil) path = format('/safe/snapshots/%<snapshot_id>s', snapshot_id:) client.get path, access_token: end |
#safe_snapshots(**options) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mixin_bot/api/snapshot.rb', line 6 def safe_snapshots(**) path = '/safe/snapshots' params = { limit: [:limit], offset: [:offset], asset: [:asset], opponent: [:opponent], app: [:app_id], order: [:order] } client.get path, **params end |