Sha256: b7a1988c4f26d24521ab54119e4010b2bf6afedac3e89ca15c377612d880449e
Contents?: true
Size: 491 Bytes
Versions: 6
Compression:
Stored size: 491 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://print.all3dp.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
6 entries across 6 versions & 1 rubygems