shopify.cr

Shopify API Wrapper in Crystal

shopify.cr

Crystal client for the Shopify API.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      shopify:
        github: the-business-factory/shopify.cr
    
  2. Run shards install

Usage

require "shopify"
  1. Create App via Shopify Partners

  2. 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
    
  3. Use Store helper to get Store object, used later Example

  4. See Resource docs:

Development

  1. Clone this repository
  2. script/setup
  3. crystal spec
  4. To use VCR to record new shopify requests, run script/get_access_token to get exports for shopify access tokens to pass into the Shopify::Store

Contributing

  1. Fork it (https://github.com/the-business-factory/shopify/fork)
  2. Create your feature branch (git checkout -b the-funnier-the-better)
  3. Commit your changes (git commit -am 'Great commit message here')
  4. Push to the branch (git push origin the-funnier-the-better)
  5. Create a new Pull Request

Contributors

Repository

shopify.cr

Owner
Statistic
  • 4
  • 0
  • 6
  • 0
  • 4
  • 7 months ago
  • February 13, 2022
License

MIT License

Links
Synced at

Thu, 18 Apr 2024 10:07:02 GMT

Languages