44uk/nis-ruby

View on GitHub
lib/nis/endpoint/namespace/mosaic.rb

Summary

Maintainability
A
25 mins
Test Coverage
module Nis::Endpoint
  module Namespace::Mosaic
    # @return [Array <Nis::Struct::MosaicDefinitionMetaDataPair>]
    # @see https://nemproject.github.io/#retrieving-mosaic-definitions
    def namespace_mosaic_definition_page(namespace:, id: nil, page_size: nil)
      request!(:get, '/namespace/mosaic/definition/page',
        namespace: namespace,
        id: id,
        pageSize: page_size
      ) do |res|
        res[:data].map { |mdmdp| Nis::Struct::MosaicDefinitionMetaDataPair.build(mdmdp) }
      end
    end
  end
end