Module: NftmakerApi

Defined in:
lib/nftmaker_api/error.rb,
lib/nftmaker_api/client.rb,
lib/nftmaker_api/version.rb,
lib/nftmaker_api/response.rb,
lib/nftmaker_api/client/nfts.rb,
lib/nftmaker_api/configuration.rb,
lib/nftmaker_api/client/project.rb,
lib/nftmaker_api/client/projects.rb,
lib/nftmaker_api/client/reservation.rb,
lib/nftmaker_api/client/reservations.rb

Defined Under Namespace

Classes: Client, Error, Response

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.configurationObject



3
4
5
# File 'lib/nftmaker_api/configuration.rb', line 3

def configuration
  @configuration ||= OpenStruct.new(configuration_defaults)
end

.configuration_defaultsObject



7
8
9
10
11
12
13
# File 'lib/nftmaker_api/configuration.rb', line 7

def configuration_defaults
  {
    api_key: nil,
    host: "https://api.nft-maker.io",
    http_adapter: Faraday.default_adapter
  }
end

.configure {|configuration| ... } ⇒ Object

Yields:



15
16
17
# File 'lib/nftmaker_api/configuration.rb', line 15

def configure
  yield(configuration)
end

.new(options = {}) ⇒ Object



19
20
21
# File 'lib/nftmaker_api/configuration.rb', line 19

def new(options = {})
  Client.new(options)
end