This repo contains a bare-bones example that demonstrates how to create a custom app in Gist, including connecting with OAuth and handling initialize and submit endpoints. You can use this project as a base starter to quickly build custom apps with Gist.
Note: This app uses gist-api-ruby to interact with the Gist REST API
To install this starter app on your local environment, clone the repository and install dependencies.
git clone https://github.com/gistplatform/sdk-starter-ruby.git
cd sdk-starter-ruby
bundle install
Replace the GIST_CLIENT_ID
, GIST_CLIENT_SECRET
and GIST_REDIRECT_URI
values in /app/models/app_datum.rb
appropriately after enabling OAuth in your app detail page in your Developer Hub.
Start the server.
rails s
To test this app, we recommend using ngrok service to make your localhost accessible publicly and configure the initialize
, submit
and redirect_uri
endpoints in your Gist app.
Now that the app is setup, you can change what the app does by updating the code under the initialize_path
and submit_path
methods in /app/controllers/app_data_controller.rb
For more details, visit our developer documentation