{"id":35129463,"url":"https://github.com/t4traw/yahoo_store_api","last_synced_at":"2026-03-17T16:03:34.615Z","repository":{"id":20816493,"uuid":"89988141","full_name":"t4traw/yahoo_store_api","owner":"t4traw","description":"Yahoo!ショッピング プロフェッショナル出店ストア向けAPIを簡単に叩けるruby gem","archived":false,"fork":false,"pushed_at":"2022-04-13T15:02:28.000Z","size":96,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-30T08:19:17.933Z","etag":null,"topics":["api","gem","ruby","yahoo","yahoo-api","yahoo-shopping"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/yahoo_store_api","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/t4traw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-02T03:34:23.000Z","updated_at":"2024-07-15T06:55:08.000Z","dependencies_parsed_at":"2022-08-07T09:16:19.314Z","dependency_job_id":null,"html_url":"https://github.com/t4traw/yahoo_store_api","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/t4traw/yahoo_store_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t4traw%2Fyahoo_store_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t4traw%2Fyahoo_store_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t4traw%2Fyahoo_store_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t4traw%2Fyahoo_store_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t4traw","download_url":"https://codeload.github.com/t4traw/yahoo_store_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t4traw%2Fyahoo_store_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30626906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","gem","ruby","yahoo","yahoo-api","yahoo-shopping"],"created_at":"2025-12-28T04:56:19.278Z","updated_at":"2026-03-17T16:03:34.610Z","avatar_url":"https://github.com/t4traw.png","language":"Ruby","readme":"# YahooStoreApi\n\n**⚠️Deprecated⚠️**\n\nYahooのAPI認証がv1からv2に移行しており、自分自身EC関連の業務から離れているため、メンテナンスができません。\n\n\u003e 2021年8月3日をもちましてYahoo! ID連携 v1の新規の登録を終了いたしました。\n\u003e 2022年4月27日にYahoo! ID連携 v1の利用を終了いたしますのでv2への移行が必要です。\n\n---\n\n[![Gem Version](https://badge.fury.io/rb/yahoo_store_api.svg)](https://badge.fury.io/rb/yahoo_store_api)\n[![Ruby](https://github.com/t4traw/yahoo_store_api/actions/workflows/main.yml/badge.svg)](https://github.com/t4traw/yahoo_store_api/actions/workflows/main.yml)\n[![Code Climate](https://codeclimate.com/github/t4traw/yahoo_store_api/badges/gpa.svg)](https://codeclimate.com/github/t4traw/yahoo_store_api)\n\nYahoo!ショッピング プロフェッショナル出店ストア向けAPIを簡単に叩けるrubyラッパーです。\n\n## できること\n\n* 商品に関連するAPI\n  * 商品参照API(`get_item`)\n  * 商品登録API(`set_item`)\n  * 商品アップロードAPI(`upload_item_file`)\n  * 商品削除API(`delete_item`)\n* 画像に関連するAPI\n  * 商品画像一括アップロードAPI(`upload_item_image_pack`)\n* 在庫に関連するAPI\n  * 在庫参照API(`get_stock`)\n  * 在庫更新API(`set_stock`)\n* 出品管理に関連するAPI\n  * 全反映予約API(`reserve_publish`)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'yahoo_store_api'\n```\n\n## 事前準備\n\n事前にストア出品アカウントと連携した認証コードが必要になります。\n\nまず、Yahooデベロッパーネットワークの[Yahoo!ショッピングのストア運営をサポートするAPIを利用したアプリケーション](https://e.developer.yahoo.co.jp/shopping/register)にアプリケーションを登録します。\n\n登録が終えたら、次に[認可コードを取得](https://developer.yahoo.co.jp/yconnect/server_app/explicit/authorization.html)する必要があります。ページに表示するかリダイレクトした時のパラメーターにある認証コードを取得します。\n\n※シンプルにページ上に認証コードを表示させる例: https://auth.login.yahoo.co.jp/yconnect/v1/authorization?response_type=code+id_token\u0026client_id=[上で登録したアプリケーションID]\u0026state=foobar\u0026redirect_uri=oob\u0026nonce=hogehoge\n\nstateやnonceなどは[Authorizationエンドポイント](https://developer.yahoo.co.jp/yconnect/server_app/explicit/authorization.html)に詳細がありますので、適宜変更してください。\n\n## Initialize\n\nストアアカウント、上で登録したアプリケーションid、シークレット、取得した認証コードでインスタンスを生成します。\n\nredirect_uriにはアプリケーション登録時に設定したフルURL（もしくはカスタムURIスキーム）を指定してください。登録済みの戻り先URLが1つしかない場合は省略可能です。戻り先URLがない場合はoobを指定してください。\n\n```ruby\nclient = YahooStoreApi::Client.new(\n  seller_id: YOUR_STORE_ID, # ストアアカウントid\n  application_id: YOUR_APPLICATION_ID, # アプリケーションid\n  application_secret: YOUR_SECRET, # シークレット\n  redirect_uri: 'oob', # 省略可能\n  authorization_code: AUTHORIZATION_CODE # 認証コード\n)\n```\n\nなお、この認証コードは1回のみ使用可能で、次からはリフレッシュトークンを使用するか、再度認証コードを取得する必要があります。リフレッシュトークンは生成したインスタンスから取得する事ができます。\n\n```ruby\nputs client.refresh_token\n```\n\n```ruby\nclient = YahooStoreApi::Client.new(\n  seller_id: YOUR_STORE_ID, # ストアアカウントid\n  application_id: YOUR_APPLICATION_ID, # アプリケーションid\n  application_secret: YOUR_SECRET, # シークレット\n  refresh_token: YOUR_REFRESH_TOKEN # リフレッシュトークン\n)\n```\n\n## Usage\n\n### 商品情報の参照\n\nストアに登録されている商品情報を取得できます。\n\n```ruby\nitem = client.get_item('test123')\n\n# 商品名を取得\nitem.name\n# 通常販売価格を取得\nitem.price\n# 取得したすべての情報をhashで出力\nitem.all\n```\n\n### 商品情報の登録\n\n項目については[Yahoo:商品登録API](https://developer.yahoo.co.jp/webapi/shopping/editItem.html)を参照してください。\n\n```ruby\nitem = client.edit_item({\n  item_code: 'test1234',\n  name: 'test_item',\n  path: 'test_category',\n  price: 1000,\n})\n\n# 送信結果をhashで出力\nitem.all\n```\n\n### 商品情報の一括登録\n\ncsvファイルをアップロードする事で商品情報の一括登録ができます。\n\n```ruby\nitem = client.upload_item_file(\"your/upload/file.csv\")\n```\n\n### 商品情報の更新\n\n:bangbang: APIの仕様で、更新したいカラムのみ送信して更新が **できません** :bangbang:\n\n商品を登録・更新する場合、**省略した項目はデフォルト値で上書きされるので注意してください**。\n\nなので、一度情報を取得し、必要な箇所を書き換えて送信する必要があります。\n\n```ruby\ndata = client.get_item(code).all\ndata[\"name\"] = 'edit item'\ndata[\"caption\"] = 'edit caption'\nclient.edit_item(data)\n```\n\n### 在庫情報の参照\n\nストアに登録されている商品の在庫情報を取得できます。\n\n```ruby\nstock = client.get_stock('test123')\n\n# 在庫数の取得\nstock.quantity\n# 取得したすべての情報をhashで出力\nstock.all\n```\n\n### 全反映予約\n\n反映予約をします。\n\n```ruby\npub = client.reserve_publish\n\n# 結果を取得\npub.status\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft4traw%2Fyahoo_store_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft4traw%2Fyahoo_store_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft4traw%2Fyahoo_store_api/lists"}