{"id":13546353,"url":"https://github.com/Shopify/shopify-api-ruby","last_synced_at":"2025-04-02T18:30:44.954Z","repository":{"id":591056,"uuid":"225463","full_name":"Shopify/shopify-api-ruby","owner":"Shopify","description":"ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.","archived":false,"fork":false,"pushed_at":"2025-04-01T18:05:39.000Z","size":6933,"stargazers_count":1071,"open_issues_count":21,"forks_count":479,"subscribers_count":531,"default_branch":"main","last_synced_at":"2025-04-01T19:23:50.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shopify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2009-06-12T15:54:26.000Z","updated_at":"2025-04-01T15:21:41.000Z","dependencies_parsed_at":"2023-12-19T00:48:12.449Z","dependency_job_id":"1492a3ba-9000-4474-ab6b-5d86db813314","html_url":"https://github.com/Shopify/shopify-api-ruby","commit_stats":{"total_commits":1254,"total_committers":213,"mean_commits":5.887323943661972,"dds":0.9346092503987241,"last_synced_commit":"b55db47e3b97962b17f65a91c935cebf4895491e"},"previous_names":["shopify/shopify_api"],"tags_count":136,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fshopify-api-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fshopify-api-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fshopify-api-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fshopify-api-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shopify","download_url":"https://codeload.github.com/Shopify/shopify-api-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246869632,"owners_count":20847166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:00:35.789Z","updated_at":"2025-04-02T18:30:39.944Z","avatar_url":"https://github.com/Shopify.png","language":"Ruby","readme":"# Shopify API Library for Ruby\n\n\u003c!-- ![Build Status]() --\u003e\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n![Build Status](https://github.com/Shopify/shopify-api-ruby/workflows/CI/badge.svg?branch=main)\n\nThis library provides support for Ruby [Shopify apps](https://apps.shopify.com/) to access the [Shopify Admin API](https://shopify.dev/docs/api/admin), by making it easier to perform the following actions:\n\n- Creating [online](https://shopify.dev/docs/apps/auth/oauth/access-modes#online-access) or [offline](https://shopify.dev/docs/apps/auth/oauth/access-modes#offline-access) access tokens for the Admin API via OAuth\n- Making requests to the [REST API](https://shopify.dev/docs/api/admin-rest)\n- Making requests to the [GraphQL API](https://shopify.dev/docs/api/admin-graphql)\n- Registering/processing webhooks\n\nIn addition to the Admin API, this library also allows querying the [Storefront API](https://shopify.dev/docs/api/storefront).\n\nYou can use this library in any application that has a Ruby backend, since it doesn't rely on any specific framework — you can include it alongside your preferred stack and use the features that you need to build your app.\n\n**Note**: These instructions apply to v10 or later of this package. If you're running v9 in your app, you can find the documentation [in this branch](https://github.com/Shopify/shopify-api-ruby/tree/v9).\n\n## Use with Rails\nIf using in the Rails framework, we highly recommend you use the [shopify_app](https://github.com/Shopify/shopify_app) gem to interact with this gem. Authentication, session storage, webhook registration, and other frequently implemented paths are managed in that gem with easy to use configurations.\n\n## Requirements\n\nTo follow these usage guides, you will need to:\n\n- have a working knowledge of ruby and a web framework such as Rails or Sinatra\n- have a Shopify Partner account and development store\n- have an app already set up in your test store or partner account\n- add the URL and the appropriate redirect for your OAuth callback route to your app settings\n\n## Installation\n\nAdd the following to your Gemfile:\n\n```sh\ngem \"shopify_api\"\n```\n\nor use [bundler](https://bundler.io):\n\n```sh\nbundle add shopify_api\n```\n\n## Steps to use the Gem\n\n### Setup Shopify Context\n\nStart by initializing the `ShopifyAPI::Context` with the parameters of your app by calling `ShopifyAPI::Context.setup` (example below) when your app starts (e.g `application.rb` in a Rails app).\n\n```ruby\nShopifyAPI::Context.setup(\n  api_key: \"\u003capi-key\u003e\",\n  api_secret_key: \"\u003capi-secret-key\u003e\",\n  host: \"\u003chttps://application-host-name.com\u003e\",\n  scope: \"read_orders,read_products,etc\",\n  is_embedded: true, # Set to true if you are building an embedded app\n  api_version: \"2022-01\", # The version of the API you would like to use\n  is_private: false, # Set to true if you have an existing private app\n)\n```\n\n### Performing OAuth\n\nYou need to go through OAuth as described [here](https://shopify.dev/docs/apps/auth/oauth) to create sessions for shops using your app.\nThe Shopify API gem tries to make this easy by providing functions to begin and complete the OAuth process. See the [Oauth doc](docs/usage/oauth.md) for instructions on how to use these.\n\n### Register Webhooks and a Webhook Handler\n\nIf you intend to use webhooks in your application follow the steps in the [Webhooks doc](docs/usage/webhooks.md) for instructions on registering and handling webhooks.\n\n### Start Making Authenticated Shopify API Requests\n\nOnce your app can perform OAuth, it can now make authenticated Shopify API calls, see docs for:\n* Making [Admin REST API](docs/usage/rest.md) requests\n* Making [Admin GraphQL API](docs/usage/graphql.md) requests\n* Making [Storefront GraphQL API](docs/usage/graphql_storefront.md) requests\n\n## Breaking Change Notices\n\n### Breaking change notice for version 15.0.0\nSee [BREAKING_CHANGES_FOR_V15](BREAKING_CHANGES_FOR_V15.md)\n\n### Breaking change notice for version 10.0.0\nSee [BREAKING_CHANGES_FOR_V10](BREAKING_CHANGES_FOR_V10.md)\n\n### Breaking changes for older versions\n\nSee [BREAKING_CHANGES_FOR_OLDER_VERSIONS](BREAKING_CHANGES_FOR_OLDER_VERSIONS.md)\n\n## Developing this gem\n\nAfter cloning the repository, you can install the dependencies with bundler:\n\n```bash\nbundle install\n```\n\nTo run the automated tests:\n\n```bash\nbundle exec rake test\n```\n\nWe use [rubocop](https://rubocop.org) to lint/format the code. You can run it with the following command:\n\n```bash\nbundle exec rubocop\n```\n","funding_links":[],"categories":["Libraries","Ruby"],"sub_categories":["Ruby"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShopify%2Fshopify-api-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShopify%2Fshopify-api-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShopify%2Fshopify-api-ruby/lists"}