- Notifications
You must be signed in to change notification settings - Fork0
Example application written in Ruby for API documentation.
License
n00bdevel/example-ruby-app
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository is home to the code examples highlighted in variousShopify API tutorials. They are designed solely for the purpose of introducing new developers to the Shopify API. The example apps are written inSinatra, but the concepts presented will also apply to developers building applications in other languages such as Python, Node.js and PHP.
1 Getting Started: Building a public Shopify application (tutorial)
2 Charging For Your App: Adding billing to your app (tutorial)
- Ruby (sample apps were written with Ruby 2.2.1)
- Bundler for Ruby, a dependency manager
- Shopify Partners account
Followthis guide to obtain your public app credentials from your Shopify Partners account.
This example app uses a.env
file to store app credentials. After cloning the repository, create a.env
file in the root folder (/example-ruby-app
) using the code snippet below. Then, copy the values of theAPI Key andAPI Secret from your partner dashboard, and use them as the values in.env
.
API_KEY=YOUR_API_KEYAPI_SECRET=YOUR_SECRET_KEY
YOUR_API_KEY
andYOUR_SECRET_KEY
are the values you must replace.
This tutorial series usesngrok to create a secure tunnel from the internet to your local machine. For each installment in the series, you will need to copy theAPP_URL
generated by ngrok to yourapp.rb
file. Additionally, theAPP_URL
needs to be added to theApp URLs section of your public app settings. These procedures are covered in theBuilding a public Shopify application tutorial.
bundleinstallruby01\Getting\Started/app.rb
About
Example application written in Ruby for API documentation.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- Ruby100.0%