Skip to content

Getting started with the Viewer in Ruby: Demonstrates how to use the OAuth, Data Management and Model Derivative Forge APIs, as well as the Forge Viewer JavaScript library

License

Notifications You must be signed in to change notification settings

Autodesk-Forge/forge-ruby-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forge Ruby Sample App

OAuth2 Data-Management Viewer

Overview

This sample app demonstrates how to use the OAuth, Data Management and Model Derivative Forge APIs, as well as the Forge Viewer JavaScript library. It shows the following typical workflow:

  • Create a 2-legged authentication token
  • Create a bucket (an arbitrary space to store objects)
  • Upload a file to the bucket
  • Prepare the file for displaying in the Viewer (translate the file into SVF format)
  • Show the translated file in the Viewer

Requirements

Ruby version 2.0 and above.

Installation

$ sudo gem install rest-client

Create an App

Create an app on the Forge Developer portal, and ensure that you select the Data Management and Model Derivative APIs. Note the client ID and client secret.

Configure the Parameters

Open the config.rb file, and replace CLIENT_ID and CLIENT_SECRET with the client ID and client secret generated when creating the app.

Run the App

$ ruby app.rb

thumbnail

Support

forge.help@autodesk.com

About

Getting started with the Viewer in Ruby: Demonstrates how to use the OAuth, Data Management and Model Derivative Forge APIs, as well as the Forge Viewer JavaScript library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages