Sha256: 3ff90c1a48e47fabf0bb91a9b022984fba344194f596c32e26afc16612381bad
Contents?: true
Size: 495 Bytes
Versions: 1
Compression:
Stored size: 495 Bytes
Contents
# frozen_string_literal: true module All3DP # A "Configuration" is a set of items uploaded on All3DP. class Configuration attr_reader :id def initialize(id:) @id = id end def url "https://app.craftcloud3d.com/configuration/#{id}" end def self.create(model_urls:) items = model_urls.map { |url| { modelUrl: url } } result = All3DP::API.new.create_configuration(items: items) new(id: result.fetch("configurationId")) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
all3dp-1.0.1 | lib/all3dp/configuration.rb |