Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Client for the DMM Web Service API 2.0.
Ruby
Branch: master

README.md

ruby-dmm

Gem Version Build Status Coverage Status Code Climate Dependency Status

Client for the DMM Web Service API 2.0.

Installation

Add this line to your application's Gemfile:

gem 'ruby-dmm'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby-dmm

Usage

client = DMM.new(:api_id => "your_api_id", :affiliate_id => "your_affiliate_id", :result_only => true)
response = client.order("date").limit(5).item_list("妄想")
response.items.map {|item| item.title }
# => ["ココロ@ファンクション!",
#     "やらせてっ!てぃーちゃー学園旅行〜やらてぃーが学園を飛び出したァ!?〜(DVDPG)",
#     "彫刻ボディ 瀧川花音",
#     "目が奪われる瞬間 vol.02",
#     "彫刻ボディ 瀧川花音"]

Choose your favorite XML Parser

You can use ox, libxml, nokogiri through multi_xml.

Add 'ox' and 'nokogiri' to your Gemfile, then it works below.

> require 'ruby-dmm'
> MultiXml.parser # => MultiXml::Parsers::Ox
> MultiXml.parser = :nokogiri
> MultiXml.parser # => MultiXml::Parsers::Nokogiri

See multi_xml documents.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

See also

API Reference

Something went wrong with that request. Please try again.