shopify.cr
Crystal client for the Shopify API.
Installation
-
Add the dependency to your
shard.yml:dependencies: shopify: github: the-business-factory/shopify.cr -
Run
shards install
Usage
require "shopify"
-
Create App via Shopify Partners
-
Configure (defaults shown)
# config/shopify.cr Shopify.configure do |config| config.api_key = ENV["SHOPIFY_API_KEY"] config.secret = ENV["SHOPIFY_SECRET"] config.scope = "read_customers,write_customers,read_orders,write_orders,read_products,write_products" config.redirect_uri = "" # Required, String end -
Use Store helper to get Store object, used later Example
-
See Resource docs:
Development
- Clone this repository
script/setupcrystal spec- To use VCR to record new shopify requests, run
script/get_access_tokento get exports for shopify access tokens to pass into theShopify::Store
Contributing
- Fork it (https://github.com/the-business-factory/shopify/fork)
- Create your feature branch (
git checkout -b the-funnier-the-better) - Commit your changes (
git commit -am 'Great commit message here') - Push to the branch (
git push origin the-funnier-the-better) - Create a new Pull Request
Contributors
- Alex Piechowski - creator and maintainer
- Rob Cole - maintainer