0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

アダルトサイトソクミルのAPIクライアントgem "ruby_sokmil" を公開しました

Posted at

はじめに

こちらの記事で、アダルトサイトDUGAのAPIクライアントgem、"ruby_duga"を作成、公開したことをご報告しました。

ついでにアダルトサイトソクミルのAPIクライアントgemを公開したので、ご報告したいと思います。

使用方法

インストール

$ gem install ruby_sokmil

利用例

require 'ruby_sokmil'

cli = RubySokmil.new(api_key: "YOUR_API_KEY", affiliate_id: "YOUR_AFFILIATE_ID")
response = cli.item(keyword: "杉原杏璃", category: 'idol')
response.body[:result][:items].map {|x| x[:title]}
=>
["Last Kiss ~杉原杏璃ファイナルイメージ 杉原杏璃",
 "東京アンリ 杉原杏璃",
 "となりのアンリ 杉原杏璃",
 "白珠杏蜜 杉原杏璃",
 "アンリ先生 杉原杏璃",
 "フェアリー・テール 杉原杏璃",
 "なまアンリ、ゆめアンリ 杉原杏璃",
 "アンリの日記 杉原杏璃",
 "必撮!まるごと☆杉原杏璃2",
 "杏乳 杉原杏璃",
 "ヤングマガジンDVD 透覗 See Through Mode 杉原杏璃",
 "杏limited 杉原杏璃",
 "亜細亜の恋 杉原杏璃",
 "夢の世界へ 杉原杏璃",
 "杏璃~夏ものがたり 杉原杏璃",
 "じーっとみつめて・・・ 杉原杏璃",
 "必撮!まるごと☆杉原杏璃",
 "ボクのアンリ 杉原杏璃",
 "アンブロシア ~美味しいアンリ 杉原杏璃",
 "みすど mis*dol 杉原杏璃2",
 "杏Lover 杉原杏璃",
 "みすど mis*dol 杉原杏璃",
 "本当にデカップ 杉原杏璃",
 "杏Sweet 杉原杏璃",
 "杏璃色 杉原杏璃",
 "「杏蜜」 ~An-mitsu~ 杉原杏璃"]

メインの使い方はcategory: 'av'です。各自試してみてください。

環境変数にSOKMIL_API_KEYSOKMIL_AFFILIATE_IDを指定すれば、RubyDuga.newの際に、api_keyaffiliate_idを指定する必要はありません。

クライアントに渡すリクエストパラメータ、レスポンスフィールドの詳細についてはSokmilの「WEBサービス」を参照してください。

商品検索、メーカー検索、レーベル検索、シリーズ検索、ジャンル検索、監督検索、出演者検索に対応しています。

レーベル検索とシリーズ検索はDATABASE_ERRORが返ってくるので、ソクミルのサーバー側で動いてない気がしています。

require 'ruby_sokmil'

cli = RubySokmil.new(api_key: "YOUR_API_KEY", affiliate_id: "YOUR_AFFILIATE_ID")
response = cli.item(keyword: "杉原杏璃", category: 'idol')
cli.item(args)      # 商品検索
cli.maker(args)     # メーカー検索
cli.genre(args)     # ジャンル検索
cli.director(args)  # 監督検索
cli.actor(args)     # 出演者検索

さいごに

ご要望、不具合などがありましたら、ここかGitHubでお願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?