Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
DMM web service module
tree: 4857ccb64d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
eg
lib/WebService
t
xt
.gitignore
.shipit
Changes
MANIFEST
MANIFEST.SKIP
Makefile.PL
README
README.pod

README.pod

NAME

WebService::DMM - DMM webservice module

SYNOPSIS

  use WebService::DMM;
  use Config::Pit;

  my $config = pit_get('dmm.co.jp', require => {
      affiliate_id => 'DMM affiliate ID',
      api_id       => 'DMM API ID',
  });

  my $dmm = WebService::DMM->new(
      affiliate_id => $config->{affiliate_id},
      api_id       => $config->{api_id},
  );

  my $response = $dmm->search( %params );
  die "Failed to request" unless $response->is_success;

  for my $item (@{$response->items}) {
      ....
  }

DESCRIPTION

WebService::DMM is DMM webservice module. DMMhttp://www.dmm.com is Japanese shopping site.

INTERFACES

Class Methods

WebService::DMM->new(%args) :WebService::DMM

Create and return a new WebService::DMM instance with %args.

%args must have following parameter:

affiliate_id

Affiliate ID of DMM. Postfix of affliate_id should be 900-999.

api_id

API ID of DMM. Register your account in DMM and you can get API ID.

Instance Method

$dmm->search(%param)

%params mandatory parameters are:

operation :Str = "ItemList"
version :Str = "1.00"
timestamp :Str = current time

Time format should be 'Year-Month-Day Hour:Minute:Second' (strftime format is '%Y-%m-%d %T')

site :Str

Site, 'DMM.co.jp' or 'DMM.com'.

%param optional parameters are:

hits :Int = 20

Number of items

offset :Int = 1

Number of page

sort :Str = "rank"

Type of sort, 'rank', '+price', '-price', 'date', 'review'.

service :Str

See "SERVICE AND FLOOR" section

floor :Str

See "SERVICE AND FLOOR" section

keyword :Str

Search keyword. You can use DMM search keyword style. Keyword should be string(not byte sequence).

SERVICE AND FLOOR

DMM.com services are:

lod

akb48, ske48

digital

bandai, anime, video, idol, cinema, fight

monthly

toei, animate, shochikugeino, idol, cinepara, dgc, fleague

digital_book

comic, novel, magazine, photo, audio, movie

pcsoft

pcgame, pcsoft

mono

dvd, cd, book, game, hobby, kaden, houseware, gourmet

rental

rental_dvd, ppr_dvd, rental_cd, ppr_cd, set_dvd, set_cd, comic

nandemo

fashion_ladies, fashion_mems, rental_iroiro

DMM.co.jp services are:

digital

videoa, videoc, nikkatsu, anime, photo

monthly

shirouto, nikkatsu, paradisetv, animech, dream, avstation, playgirl, alice, crystal, hmp, waap, momotarobb, moodyz, prestige, jukujo, sod, mania, s1, kmp

ppm

video, videoc

pcgame

pcgame

doujin

doujin

book

book

mono

dvd, good, anime, pcgame, book, doujin

rental

rental_dvd, ppr_dvd, set_dvd

CUSTOMIZE USER AGENT

You can specify your own instance of Furl to set $WebService::DMM::UserAgent.

    $WebService::DMM::UserAgent = Furl->new( your_own_paramter );

EXAMPLES

There are many examples in the "eg/" directory in this distribution.

AUTHOR

Syohei YOSHIDA <syohex@gmail.com>

COPYRIGHT

Copyright 2012- Syohei YOSHIDA

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Official Guide https://affiliate.dmm.com/api/guide/

Something went wrong with that request. Please try again.