warp-drive
WarpDrive는 야심찬 웹 앱을 위한 가벼운 데이터 라이브러리
ShopifyAPI는 Shopify 관리자 REST와 GraphQL 서비스를 간편하게 이용할 수 있는 경량 gem이다
ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.
개발 도구RubyGitHub @Shopify직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗This library provides support for Ruby Shopify apps to access the Shopify Admin API, by making it easier to perform the following actions:
In addition to the Admin API, this library also allows querying the Storefront API.
You 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.
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.
If using in the Rails framework, we highly recommend you use the 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.
To follow these usage guides, you will need to:
Add the following to your Gemfile:
gem "shopify_api"
or use bundler:
bundle add shopify_api
Start 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).
ShopifyAPI::Context.setup(
api_key: "<api-key>",
api_secret_key: "<api-secret-key>",
host: "<https://application-host-name.com>",
scope: "read_orders,read_products,etc",
is_embedded: true, # Set to true if you are building an embedded app
api_version: "2022-01", # The version of the API you would like to use
is_private: false, # Set to true if you have an existing private app
)
You need to go through OAuth as described here to create sessions for shops using your app. The Shopify API gem tries to make this easy by providing functions to begin and complete the OAuth process. See the Oauth doc for instructions on how to use these.
If you intend to use webhooks in your application follow the steps in the Webhooks doc for instructions on registering and handling webhooks.
Once your app can perform OAuth, it can now make authenticated Shopify API calls, see docs for:
See BREAKING_CHANGES_FOR_OLDER_VERSIONS
After cloning the repository, you can install the dependencies with bundler:
bundle install
To run the automated tests:
bundle exec rake test
We use rubocop to lint/format the code. You can run it with the following command:
bundle exec rubocop