Class: NftmakerApi::Client::Nfts
- Inherits:
-
Object
- Object
- NftmakerApi::Client::Nfts
- Defined in:
- lib/nftmaker_api/client/nfts.rb
Instance Method Summary collapse
- #free ⇒ Object
-
#initialize(client, project_id: nil) ⇒ Nfts
constructor
A new instance of Nfts.
- #list(state: :all) ⇒ Object (also: #all)
- #reserved ⇒ Object
- #sold ⇒ Object
Constructor Details
#initialize(client, project_id: nil) ⇒ Nfts
Returns a new instance of Nfts.
3 4 5 6 |
# File 'lib/nftmaker_api/client/nfts.rb', line 3 def initialize(client, project_id: nil) @client = client @project_id = project_id end |
Instance Method Details
#free ⇒ Object
13 14 15 |
# File 'lib/nftmaker_api/client/nfts.rb', line 13 def free list(state: :free) end |
#list(state: :all) ⇒ Object Also known as: all
8 9 10 |
# File 'lib/nftmaker_api/client/nfts.rb', line 8 def list(state: :all) @client.get "GetNfts/#{@client.api_key}/#{@project_id}/#{state}" end |
#reserved ⇒ Object
17 18 19 |
# File 'lib/nftmaker_api/client/nfts.rb', line 17 def reserved list(state: :reserved) end |
#sold ⇒ Object
21 22 23 |
# File 'lib/nftmaker_api/client/nfts.rb', line 21 def sold list(state: :sold) end |