Module: Nis::Endpoint::Account::Mosaic

Included in:
Nis
Defined in:
lib/nis/endpoint/account/mosaic.rb

Instance Method Summary collapse

Instance Method Details

#account_mosaic_definition_page(address:, parent: nil, id: nil) ⇒ Array <Nis::Struct::MosaicDefinition>


8
9
10
11
12
13
14
15
16
# File 'lib/nis/endpoint/account/mosaic.rb', line 8

def (address:, parent: nil, id: nil)
  request!(:get, '/account/mosaic/definition/page',
    address: address,
    parent: parent,
    id: id,
  ) do |res|
    res[:data].map { |md| Nis::Struct::MosaicDefinition.build(md) }
  end
end

#account_mosaic_owned(address:) ⇒ Array <Nis::Struct::AccountMetaDataPair>


21
22
23
24
25
# File 'lib/nis/endpoint/account/mosaic.rb', line 21

def (address:)
  request!(:get, '/account/mosaic/owned', address: address) do |res|
    res[:data].map { |mo| Nis::Struct::Mosaic.build(mo) }
  end
end