Ruby gem to send 3D files to the Treastock API.
Add these lines to your application's Gemfile:
# Send 3D files to the Treastock API.
gem "treatstock", git: "https://github.com/sunny/treatstock"
And then execute:
$ bundle
client = Treatstock.new(private_key: "your-private-key")
result = client.create_printable_pack(
affiliate_price: 12,
affiliate_currency: "USD",
files: ["http://example.com/file.stl"],
)
result["redir"]
# => "https://sandbox.treatstock.com/api/v2/printable-packs?packPublicToken=…"
After checking out the repo, run bin/setup
to install dependencies. Then,
run rake spec
to run the tests. You can also run bin/console
for an
interactive prompt that will allow you to experiment.
To release a new version, update the version number in version.rb
, and then
run bundle exec rake release
, which will create a git tag for the version,
push git commits and tags, and push the .gem
file to
rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/sunny/treatstock. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Everyone interacting in the Treatstock project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Licensed under the MIT License.