class NftmakerApi::Client::Projects
Public Class Methods
new(client)
click to toggle source
# File lib/nftmaker_api/client/projects.rb, line 3 def initialize(client) @client = client end
Public Instance Methods
create(name:, policy_expires: true, policy_locks_at: Time.now.advance(months: 6), address_expires_in: 10)
click to toggle source
# File lib/nftmaker_api/client/projects.rb, line 7 def create(name:, policy_expires: true, policy_locks_at: Time.now.advance(months: 6), address_expires_in: 10) body = {projectname: name, maxNftSupply: 1, policyExpires: policy_expires, addressExpiretime: address_expires_in} body.merge!({ policyLocksDateTime: policy_locks_at.iso8601 }) if policy_expires @client.post "/CreateProject/#{@client.api_key}", body.to_json end
list()
click to toggle source
# File lib/nftmaker_api/client/projects.rb, line 14 def list @client.get "ListProjects/#{@client.api_key}" end