Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunny/treatstock
Ruby gem to send 3D files to the Treastock API
https://github.com/sunny/treatstock
Last synced: 3 months ago
JSON representation
Ruby gem to send 3D files to the Treastock API
- Host: GitHub
- URL: https://github.com/sunny/treatstock
- Owner: sunny
- License: mit
- Created: 2017-12-30T10:57:34.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T19:54:19.000Z (about 2 years ago)
- Last Synced: 2023-04-10T21:39:37.639Z (over 1 year ago)
- Language: Ruby
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Treatstock
Ruby gem to send 3D files to the Treastock API.
## Installation
Add these lines to your application's Gemfile:
```ruby
# Send 3D files to the Treastock API.
gem "treatstock", git: "https://github.com/sunny/treatstock"
```And then execute:
$ bundle
## Usage
```rb
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=…"
```## Development
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.## Release
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](https://rubygems.org).## Contributing
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](http://contributor-covenant.org) code of conduct.## 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](https://github.com/sunny/treatstock/blob/master/CODE_OF_CONDUCT.md).## License
Licensed under the MIT License.