Rdmm

CircleCI Gem Version Documentation

An API Client library for DMM Web Service written in Ruby.

See https://affiliate.dmm.com/api/ for more details about DMM Web Service.

Requirements

  • Ruby 2.2.2 or higher

Installation

Add this line to your application's Gemfile:

gem "rdmm"

And then execute:

bundle

Or install it yourself as:

gem install rdmm

Usage

Rdmm::Client.new

require "rdmm"
client = Rdmm::Client.new(affiliate_id: "dummy", api_id: "dummy")

Rdmm::Client#list_actresses

Available options:

  • :id
  • :birthday_from
  • :birthday_to
  • :bust_from
  • :bust_to
  • :height_from
  • :height_to
  • :hip_from
  • :hip_to
  • :hits
  • :initial
  • :keyword
  • :offset
  • :sort
  • :waist_from
  • :waist_to
client.list_actresses

https://api.dmm.com/affiliate/v3/ActressSearch?affiliate_id=dummy&api_id=dummy

Rdmm::Client#list_authors

Available options:

  • :floor_id
  • :hits
  • :initial
  • :offset
client.list_authors(floor_id: 27)

https://api.dmm.com/affiliate/v3/AuthorSearch?affiliate_id=dummy&api_id=dummy&floor_id=27

Rdmm::Client#list_floors

client.list_floors

https://api.dmm.com/affiliate/v3/FloorList?affiliate_id=dummy&api_id=dummy

Rdmm::Client#list_genres

Available options:

  • :floor_id
  • :hits
  • :initial
  • :offset
client.list_genres(floor_id: 27)

https://api.dmm.com/affiliate/v3/GenreSearch?affiliate_id=dummy&api_id=dummy&floor_id=27

Rdmm::Client#list_items

Available options:

  • :article
  • :article_id
  • :content_id
  • :floor
  • :hits
  • :keyword
  • :mono_stock
  • :offset
  • :released_from
  • :released_to
  • :service
  • :site
  • :sort
client.list_items(site: "DMM.com")

https://api.dmm.com/affiliate/v3/ItemList?affiliate_id=dummy&api_id=dummy&site=DMM.com

Rdmm::Client#list_makers

Available options:

  • :floor_id
  • :hits
  • :initial
  • :offset
client.list_makers(floor_id: 27)

https://api.dmm.com/affiliate/v3/MakerSearch?affiliate_id=dummy&api_id=dummy&floor_id=27

Rdmm::Client#list_series

Available options:

  • :floor_id
  • :hits
  • :initial
  • :offset
client.list_series(floor_id: 27)

https://api.dmm.com/affiliate/v3/SeriesSearch?affiliate_id=dummy&api_id=dummy&floor_id=27

Rdmm::Responses::BaseResponse#each

This class implements Enumerable module.

client.list_items(site: "DMM.com").map(&:title)

output

["キングダム",
 "ハドソン川の奇跡",
 "ミュージカル『刀剣乱舞』 〜真剣乱舞祭 2016〜",
 "back number/アンコール",
 "パンフレット 舞台『刀剣乱舞』虚伝 燃ゆる本能寺(再演)",
 "終末のハーレム セミカラー版",
 "VOICEROID+ 東北きりたん EX ダウンロード版",
 "CHAOS;CHILD",
 "【8〜14泊】Travel house 軽量 TSAロック付き 4輪 93L スーツケース レッド",
 "ミュージカル『刀剣乱舞』真剣乱舞祭 2016 (ブルーレイディスク)",
 "シン・ゴジラ",
 "東京タラレバ娘",
 "舞台『刀剣乱舞』虚伝 燃ゆる本能寺 〜再演〜",
 "キングダム",
 "宇多田ヒカル/Fantome(SHM-CD)",
 "エルダー・スクロールズ・オンライン 日本語版 (インペリアルエディション)",
 "自炊・電子書籍化キット プラス裁断機PK-513L&ScanSnap iX500 FI-IX500A",
 "VOICEROID+ 結月ゆかり EX ダウンロード版",
 "映画 闇金ウシジマくんthe Final",
 "トレーディングブロマイド 25枚セット 舞台『刀剣乱舞』虚伝 燃ゆる本能寺(再演)"]

Rdmm::Responses::BaseResponse#first_position

client.list_items(site: "DMM.com").first_position

output

1

Rdmm::Responses::BaseResponse#has_next_page?

client.list_items(site: "DMM.com").has_next_page?

output

true

Rdmm::Responses::BaseResponse#result_count

client.list_items(site: "DMM.com").result_count

output

20

Rdmm::Responses::BaseResponse#total_count

client.list_items(site: "DMM.com").total_count

output

50000

Rdmm::Resources::ActressResource

Available attributes:

  • birthday
  • blood_type
  • bust
  • cup
  • height
  • hobbies
  • id
  • image_url_large
  • image_url_small
  • list_url_digital
  • list_url_mono
  • list_url_monthly
  • list_url_ppm
  • list_url_rental
  • name
  • prefectures
  • ruby
  • waist

Rdmm::Resources::AuthorResource

Available attributes:

  • another_name
  • id
  • list_url
  • name
  • ruby

Rdmm::Resources::FloorResource

Available attributes:

  • code
  • id
  • name
  • service_code
  • service_name
  • site_code
  • site_name

Rdmm::Resources::GenreResource

Available attributes:

  • id
  • list_url
  • name
  • ruby

Rdmm::Resources::ItemResource

Available attributes:

  • actors
  • actresses
  • affiliate_url
  • authors
  • category_name
  • content_id
  • directors
  • floor_code
  • floor_name
  • genres
  • labels
  • makers
  • prices
  • product_id
  • released_at
  • review_average
  • review_count
  • series
  • service_code
  • service_name
  • title
  • url
  • volume

Rdmm::Resources::MakerResource

Available attributes:

  • id
  • list_url
  • name
  • ruby

Rdmm::Resources::SeriesResource

Available attributes:

  • id
  • list_url
  • name
  • ruby