{"id":21878276,"url":"https://github.com/pepabo/colormeshop-ruby","last_synced_at":"2025-04-15T03:04:33.202Z","repository":{"id":47258766,"uuid":"134372784","full_name":"pepabo/colormeshop-ruby","owner":"pepabo","description":"カラーミーショップAPI Rubyクライアント","archived":false,"fork":false,"pushed_at":"2023-12-01T10:16:47.000Z","size":351,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":87,"default_branch":"master","last_synced_at":"2025-04-11T18:21:33.304Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pepabo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-22T06:49:34.000Z","updated_at":"2023-04-18T11:34:04.000Z","dependencies_parsed_at":"2023-12-01T12:00:14.838Z","dependency_job_id":null,"html_url":"https://github.com/pepabo/colormeshop-ruby","commit_stats":{"total_commits":23,"total_committers":6,"mean_commits":"3.8333333333333335","dds":0.5652173913043479,"last_synced_commit":"183e14e6e94e9eb34563f70019381525e315f732"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcolormeshop-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcolormeshop-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcolormeshop-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcolormeshop-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepabo","download_url":"https://codeload.github.com/pepabo/colormeshop-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456388,"owners_count":21106607,"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-11-28T08:12:09.435Z","updated_at":"2025-04-15T03:04:33.174Z","avatar_url":"https://github.com/pepabo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# color_me_shop\n\nColorMeShop - the Ruby gem for the カラーミーショップ API\n\n# カラーミーショップ API\n\n[カラーミーショップ](https://shop-pro.jp) APIでは、受注の検索や商品情報の更新を行うことができます。\n\n## 利用手順\n\nはじめに、カラーミーデベロッパーアカウントを用意します。[デベロッパー登録ページ](https://api.shop-pro.jp/developers/sign_up)から登録してください。\n\n次に、[登録ページ](https://api.shop-pro.jp/oauth/applications/new)からアプリケーション登録を行ってください。\nスマートフォンのWebViewを利用する場合は、リダイレクトURLに`urn:ietf:wg:oauth:2.0:oob`を入力してください。\n\nその後、カラーミーショップアカウントの認証ページを開きます。認証ページのURLは、`https://api.shop-pro.jp/oauth/authorize`に必要なパラメータをつけたものです。\n\n|パラメータ名|値|\n|---|---|\n|`client_id`|アプリケーション詳細画面で確認できるクライアントID|\n|`response_type`|\\\"code\\\"という文字列|\n|`scope`| 別表参照|\n|`redirect_url`|アプリケーション登録時に入力したリダイレクトURL|\n\n`scope`は、以下のうち、アプリケーションが利用したい機能をスペース区切りで指定してください。\n\n|スコープ|機能|\n|---|---|\n|`read_products`|商品データの参照|\n|`write_products`|在庫データの更新|\n|`read_sales`|受注・顧客データの参照|\n|`write_sales`|受注データの更新|\n\n以下のようなURLとなります。\n\n```\nhttps://api.shop-pro.jp/oauth/authorize?client_id=CLIENT_ID\u0026redirect_uri=REDIRECT_URL\u0026response_type=code\u0026scope=read_products%20write_products\n```\n\n初めてこのページを訪れる場合は、カラーミーショップアカウントのIDとパスワードの入力を求められます。\n承認ボタンを押すと、このアプリケーションがショップのデータにアクセスすることが許可され、リダイレクトURLへリダイレクトされます。\n\n承認された場合は、`code`というクエリパラメータに認可コードが付与されます。承認がキャンセルされた、またはエラーが起きた場合は、\n`error`パラメータにエラーの内容を表す文字列が与えられます。\n\nアプリケーション登録時のリダイレクトURLに`urn:ietf:wg:oauth:2.0:oob`を指定した場合は、以下のようなURLにリダイレクトされます。\n末尾のパスが認可コードになっています。\n\n```\nhttps://api.shop-pro.jp/oauth/authorize/AUTH_CODE\n```\n\n認可コードの有効期限は発行から10分間です。\n\n最後に、認可コードとアクセストークンを交換します。以下のパラメータを付けて、`https://api.shop-pro.jp/oauth/token`へリクエストを送ります。\n\n|パラメータ名|値|\n|---|---|\n|`client_id`|アプリケーション詳細画面に表示されているクライアントID|\n|`client_secret`|アプリケーション詳細画面に表示されているクライアントシークレット|\n|`code`|取得した認可コード|\n|`grant_type`|\\\"authorization_code\\\"という文字列|\n|`redirect_uri`|アプリケーション登録時に入力したリダイレクトURL|\n\n```console\n# curl での例\n\n$ curl -X POST \\\\\n  -d'client_id=CLIENT_ID' \\\\\n  -d'client_secret=CLIENT_SECRET' \\\\\n  -d'code=CODE' \\\\\n  -d'grant_type=authorization_code'   \\\\\n  -d'redirect_uri=REDIRECT_URI'  \\\\\n  'https://api.shop-pro.jp/oauth/token'\n```\n\nリクエストが成功すると、以下のようなJSONが返ってきます。\n\n```json\n{\n  \\\"access_token\\\": \\\"d461ab8XXXXXXXXXXXXXXXXXXXXXXXXX\\\",\n  \\\"token_type\\\": \\\"bearer\\\",\n  \\\"scope\\\": \\\"read_products write_products\\\"\n}\n```\n\nアクセストークンに有効期限はありませんが、許可済みアプリケーション一覧画面から失効させることができます。なお、同じ認可コードをアクセストークンに交換できるのは1度だけです。\n\n取得したアクセストークンは、Authorizationヘッダに入れて使用します。以下にショップ情報を取得する際の例を示します。\n\n```console\n# curlの例\n\n$ curl -H 'Authorization: Bearer d461ab8XXXXXXXXXXXXXXXXXXXXXXXXX' https://api.shop-pro.jp/v1/shop.json\n```\n\n## エラー\n\nカラーミーショップAPI v1では\n\n- エラーコード\n- エラーメッセージ\n- ステータスコード\n\nの配列でエラーを表現します。以下に例を示します。\n\n```json\n{\n  \\\"errors\\\": [\n    {\n      \\\"code\\\": 404100,\n      \\\"message\\\": \\\"レコードが見つかりませんでした。\\\",\n      \\\"status\\\": 404\n    }\n  ]\n}\n```\n\n\nThis SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 1.0.0\n- Package version: 1.1.0\n- Build package: org.openapitools.codegen.languages.RubyClientCodegen\nFor more information, please visit [https://shop-pro.jp/?mode=inq](https://shop-pro.jp/?mode=inq)\n\n## Installation\n\n### Build a gem\n\nTo build the Ruby code into a gem:\n\n```shell\ngem build color_me_shop.gemspec\n```\n\nThen either install the gem locally:\n\n```shell\ngem install ./color_me_shop-1.1.0.gem\n```\n(for development, run `gem install --dev ./color_me_shop-1.1.0.gem` to install the development dependencies)\n\nor publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).\n\nFinally add this to the Gemfile:\n\n    gem 'color_me_shop', '~\u003e 1.1.0'\n\n### Install from Git\n\nIf the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:\n\n    gem 'color_me_shop', :git =\u003e 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'\n\n### Include the Ruby code directly\n\nInclude the Ruby code directly using `-I` as follows:\n\n```shell\nruby -Ilib script.rb\n```\n\n## Getting Started\n\nPlease follow the [installation](#installation) procedure and then run the following code:\n```ruby\n# Load the gem\nrequire 'color_me_shop'\n\n# Setup authorization\nColorMeShop.configure do |config|\n  # Configure OAuth2 access token for authorization: OAuth2\n  config.access_token = 'YOUR ACCESS TOKEN'\nend\n\napi_instance = ColorMeShop::CategoryApi.new\n\nbegin\n  #商品カテゴリー一覧を取得\n  result = api_instance.get_product_categories\n  p result\nrescue ColorMeShop::ApiError =\u003e e\n  puts \"Exception when calling CategoryApi-\u003eget_product_categories: #{e}\"\nend\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://api.shop-pro.jp*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*ColorMeShop::CategoryApi* | [**get_product_categories**](docs/CategoryApi.md#get_product_categories) | **GET** /v1/categories.json | 商品カテゴリー一覧を取得\n*ColorMeShop::ChargeApi* | [**activate_application_charge**](docs/ChargeApi.md#activate_application_charge) | **POST** /v1/application_charges/{applicationChargeId}/activate.json | スポット課金データをアクティベートする\n*ColorMeShop::ChargeApi* | [**activate_recurring_application_charge**](docs/ChargeApi.md#activate_recurring_application_charge) | **POST** /v1/recurring_application_charges/{recurringApplicationChargeId}/activate.json | 月額課金データをアクティベートする\n*ColorMeShop::ChargeApi* | [**cancel_recurring_application_charge**](docs/ChargeApi.md#cancel_recurring_application_charge) | **POST** /v1/recurring_application_charges/{recurringApplicationChargeId}/cancel.json | 月額課金データをキャンセルする\n*ColorMeShop::ChargeApi* | [**get_application_charge**](docs/ChargeApi.md#get_application_charge) | **GET** /v1/application_charges/{applicationChargeId}.json | スポット課金データの取得\n*ColorMeShop::ChargeApi* | [**get_application_charges**](docs/ChargeApi.md#get_application_charges) | **GET** /v1/application_charges.json | スポット課金一覧の取得\n*ColorMeShop::ChargeApi* | [**get_recurring_application_charge**](docs/ChargeApi.md#get_recurring_application_charge) | **GET** /v1/recurring_application_charges/{recurringApplicationChargeId}.json | 月額課金データの取得\n*ColorMeShop::ChargeApi* | [**get_recurring_application_charges**](docs/ChargeApi.md#get_recurring_application_charges) | **GET** /v1/recurring_application_charges.json | 月額課金一覧の取得\n*ColorMeShop::ChargeApi* | [**post_application_charge**](docs/ChargeApi.md#post_application_charge) | **POST** /v1/application_charges.json | スポット課金データの作成\n*ColorMeShop::ChargeApi* | [**post_recurring_application_charge**](docs/ChargeApi.md#post_recurring_application_charge) | **POST** /v1/recurring_application_charges.json | 月額課金データの作成\n*ColorMeShop::CustomerApi* | [**get_customer**](docs/CustomerApi.md#get_customer) | **GET** /v1/customers/{customerId}.json | 顧客データの取得\n*ColorMeShop::CustomerApi* | [**get_customers**](docs/CustomerApi.md#get_customers) | **GET** /v1/customers.json | 顧客データのリストを取得\n*ColorMeShop::CustomerApi* | [**post_customers**](docs/CustomerApi.md#post_customers) | **POST** /v1/customers.json | 顧客データを追加\n*ColorMeShop::DeliveryApi* | [**get_deliveries**](docs/DeliveryApi.md#get_deliveries) | **GET** /v1/deliveries.json | 配送方法一覧を取得\n*ColorMeShop::DeliveryApi* | [**get_delivery_date_setting**](docs/DeliveryApi.md#get_delivery_date_setting) | **GET** /v1/deliveries/date.json | 配送日時設定を取得\n*ColorMeShop::EtcApi* | [**delete_device_token**](docs/EtcApi.md#delete_device_token) | **DELETE** /v1/device_tokens/{token}.json | デバイストークンの削除\n*ColorMeShop::GiftApi* | [**get_gift**](docs/GiftApi.md#get_gift) | **GET** /v1/gift.json | ギフト設定を取得\n*ColorMeShop::GroupApi* | [**get_product_groups**](docs/GroupApi.md#get_product_groups) | **GET** /v1/groups.json | 商品グループ一覧を取得\n*ColorMeShop::PaymentApi* | [**get_payments**](docs/PaymentApi.md#get_payments) | **GET** /v1/payments.json | 決済設定の一覧を取得\n*ColorMeShop::ProductApi* | [**delete_product_pickup**](docs/ProductApi.md#delete_product_pickup) | **DELETE** /v1/products/{productId}/pickups/{pickupType}.json | おすすめ商品情報の削除\n*ColorMeShop::ProductApi* | [**get_product**](docs/ProductApi.md#get_product) | **GET** /v1/products/{productId}.json | 商品データの取得\n*ColorMeShop::ProductApi* | [**get_products**](docs/ProductApi.md#get_products) | **GET** /v1/products.json | 商品一覧の取得\n*ColorMeShop::ProductApi* | [**post_product_pickup**](docs/ProductApi.md#post_product_pickup) | **POST** /v1/products/{productId}/pickups.json | おすすめ商品情報の追加\n*ColorMeShop::ProductApi* | [**update_product**](docs/ProductApi.md#update_product) | **PUT** /v1/products/{productId}.json | 商品データの更新\n*ColorMeShop::SaleApi* | [**cancel_sale**](docs/SaleApi.md#cancel_sale) | **PUT** /v1/sales/{saleId}/cancel.json | 受注のキャンセル\n*ColorMeShop::SaleApi* | [**get_sale**](docs/SaleApi.md#get_sale) | **GET** /v1/sales/{saleId}.json | 受注データの取得\n*ColorMeShop::SaleApi* | [**get_sales**](docs/SaleApi.md#get_sales) | **GET** /v1/sales.json | 受注データのリストを取得\n*ColorMeShop::SaleApi* | [**send_sales_mail**](docs/SaleApi.md#send_sales_mail) | **POST** /v1/sales/{saleId}/mails.json | メールの送信\n*ColorMeShop::SaleApi* | [**stat_sale**](docs/SaleApi.md#stat_sale) | **GET** /v1/sales/stat.json | 売上集計の取得\n*ColorMeShop::SaleApi* | [**update_sale**](docs/SaleApi.md#update_sale) | **PUT** /v1/sales/{saleId}.json | 受注データの更新\n*ColorMeShop::ScriptApi* | [**create_script_tag**](docs/ScriptApi.md#create_script_tag) | **POST** /v1/script_tags.json | スクリプトタグの作成\n*ColorMeShop::ScriptApi* | [**delete_script_tag**](docs/ScriptApi.md#delete_script_tag) | **DELETE** /v1/script_tags/{scriptTagId}.json | スクリプトタグの削除\n*ColorMeShop::ScriptApi* | [**get_script_tag**](docs/ScriptApi.md#get_script_tag) | **GET** /v1/script_tags/{scriptTagId}.json | スクリプトタグの取得\n*ColorMeShop::ScriptApi* | [**get_script_tags**](docs/ScriptApi.md#get_script_tags) | **GET** /v1/script_tags.json | スクリプトタグの取得\n*ColorMeShop::ScriptApi* | [**update_script_tag**](docs/ScriptApi.md#update_script_tag) | **PUT** /v1/script_tags/{scriptTagId}.json | スクリプトタグの更新\n*ColorMeShop::ShopApi* | [**get_shop**](docs/ShopApi.md#get_shop) | **GET** /v1/shop.json | ショップ情報の取得\n*ColorMeShop::StockApi* | [**get_stocks**](docs/StockApi.md#get_stocks) | **GET** /v1/stocks.json | 在庫情報の取得\n\n\n## Documentation for Models\n\n - [ColorMeShop::ApplicationCharge](docs/ApplicationCharge.md)\n - [ColorMeShop::ApplicationChargeCreateResponse](docs/ApplicationChargeCreateResponse.md)\n - [ColorMeShop::Customer](docs/Customer.md)\n - [ColorMeShop::Delivery](docs/Delivery.md)\n - [ColorMeShop::DeliveryChargeByPrefecture](docs/DeliveryChargeByPrefecture.md)\n - [ColorMeShop::DeliveryDateSetting](docs/DeliveryDateSetting.md)\n - [ColorMeShop::Meta](docs/Meta.md)\n - [ColorMeShop::Payment](docs/Payment.md)\n - [ColorMeShop::Product](docs/Product.md)\n - [ColorMeShop::ProductCategory](docs/ProductCategory.md)\n - [ColorMeShop::ProductGroup](docs/ProductGroup.md)\n - [ColorMeShop::ProductOption](docs/ProductOption.md)\n - [ColorMeShop::ProductPickup](docs/ProductPickup.md)\n - [ColorMeShop::ProductUpdateRequest](docs/ProductUpdateRequest.md)\n - [ColorMeShop::ProductVariant](docs/ProductVariant.md)\n - [ColorMeShop::RecurringApplicationCharge](docs/RecurringApplicationCharge.md)\n - [ColorMeShop::RecurringApplicationChargeCreateResponse](docs/RecurringApplicationChargeCreateResponse.md)\n - [ColorMeShop::Sale](docs/Sale.md)\n - [ColorMeShop::SaleDelivery](docs/SaleDelivery.md)\n - [ColorMeShop::SaleDetail](docs/SaleDetail.md)\n - [ColorMeShop::ScriptTag](docs/ScriptTag.md)\n - [ColorMeShop::Shop](docs/Shop.md)\n - [ColorMeShop::Stock](docs/Stock.md)\n\n\n## Documentation for Authorization\n\n\n### OAuth2\n\n- **Type**: OAuth\n- **Flow**: accessCode\n- **Authorization URL**: https://api.shop-pro.jp/oauth/authorize\n- **Scopes**: \n  - read_products: 商品データを参照\n  - write_products: 在庫データを更新\n  - read_sales: 受注・顧客データを参照\n  - write_sales: 受注データを更新\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Fcolormeshop-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepabo%2Fcolormeshop-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Fcolormeshop-ruby/lists"}