Project

authentise

0.0
No commit activity in last 3 years
No release in over 3 years
Access Authentise's 3D-Printing streaming API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Ruby gem to access Authentise API v3

See http://docs.authentise.com/model/reference.html

Install

Add the following lines to your Gemfile:

# Stream 3D files through Authentise's API
gem "authentise"

Configuration

Set your secret partner key:

Authentise.configure do |c|
  c.secret_partner_key = "ZSBzaG9y-dCB2ZWhl-bWVuY2Ug-b2YgYW55-IGNhcm5h-bCB=="
end

Usage

Authentication

# Create a user
user = Authentise::User.new(
  email: 'you@example.com',
  name: 'You',
  username: 'you',
  password: 'p4ssw0rd;99'
)
user.create

# Create a session
session = Authentise::Session.new(
  username: 'you',
  password: 'p4ssw0rd;99'
)
session.create

Model Warehouse

# Create a model
model = Authentise::Model.new(name: "My model")
model.create(session_token: session.token)
model.send_file(path: 'example.stl')
model.url # => "https://models.authentise.com/model/42424…"

# Get a model
model = Authentise::Model.find_by_url(
  url: "https://models.authentise.com/model/42424…",
  session_token: session.token
)
model.name # => "My model"
model.status # => "processing"
model.content_url # => ""https://prod-hoth-models.s3.amazonaws.com:443/07c74a…"

Streaming iframe

# Create a print
print = Authentise::Print.new(
  model_url: "https://models.authentise.com/model/42424…"
)

# Show an iframe to this URL to the user
print.url
# => "https://widget.sendshapes.com/?token=33b41d6e80d4918cfff768185d1d31a6"


Development
-----------

For local development, please install the `bundler` gem then:

```sh
$ bundle

To launch specs:

$ rake

List other tasks:

$ rake -T

License

Created by Sunny Ripert for Cults., licensed under the MIT License.