Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Service_Rakuten Component Proposal

Proposed Component Name Zend_Service_Rakuten
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Service_Rakuten
Proposers TERUI Shingo, Satoru Yoshida
Ralph Schindler, Zend liaison
Revision ------10 Dec:add explanation of method parameters.
0.8 - 28 Nov 2008:I made APIs correspond from version 1.10 to 1.12 and I implemented the checking of the required parameters.
0.7 - 26 Dec: update References, Use Cases and Class Skeletons.
0.6 - 19 Dec: update References, Class Index, Use Cases and Class Skeletons.
0.5 - 11 Dec: update References, Use Cases and Class Skeletons.
0.4 - 22 Nov: update all except Dependencies and Milestones.
0.3 - 21 May: update class skeletons.
0.2 - 15 March 2007: add class skeletons. (wiki revision: 28)

Table of Contents

1. Overview

Zend_Service_Rakuten is a interface to use the "Rakuten Web service" that is provided by the Rakuten, Inc. .

2. References

The following links are API references written in Japanese. I write method names and brief description for each API.

  • Rakuten Web Service
    • for the Rakuten Market
      • searchItem() - Search items. Uses ItemSearch API
        parameter type min max required default explanation
        following in params array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        keyword string
        may required null key word. One of keyword, genreId or catalogCode is required
        shopCode string
        null shop code
        genreId int 0
        may required 0 genre id. One of keyword, genreId or catalogCode is required.
        catalogCode string
        may required null catalog code. One of keyword, genreId or catalogCode is required
        hits int 1 30
        30 items per page.
        page int 1 100
        1 page limits.
        sort string
        standard sort type. (mark)affiliateRate, (mark)reviewCount, (mark)itemPrice, (mark)updateTimestamp or standard. (mark) means plus or minus mark, each mark means Ascend and Descend. For example, +itemPrice
        minPrice int 0
        null minimum price
        maxPrice int 0
        null maximum price. It must be grater than minPrice
        availability int 0 1
        1 0:all items, 1:only items that can be bought
        field int 0 1
        1 0:search widely, 1:search narrowly
        carrier int 0 1
        0 0:PC, 1:mobile
        imageFlag int 0 1
        0 0:all item, 1:only items that has image
        orFlag int 0 1
        0 0:AND keywords, 1:OR keywords
        NGKeyword string
        null keyword that you want to omit
        genreInformationFlag int 0 1
        0 0:not get count of items that are in the same genre, 1:get count (This method supports only 0)
      • searchGenre() - Retrieve genre's information. Uses GenreSearch API
        parameter type min max required default explanation
        type string
        required child information type. child, parent or current
        genreId int 0
        required 0 genre id. If parent is specified, genre id must be grater than 0.
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
      • searchItemCode() - Retrieve item's information by item code. Uses ItemCodeSearch API
        parameter type min max required default explanation
        code string
        required
        item code
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        carrier int 0 1
        0 0:PC, 1:mobile
      • searchCatalog() - Search items by catalog. Uses CatalogSearch API
        parameter type min max required default explanation
        following in params array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        keyword string
        may required null key word. One of keyword or genreId is required
        genreId int 0
        may required 0 genre id. One of keyword or genreId is required.
        hits int 1 30
        30 items per page.
        page int 1 100
        1 page limits.
        sort string
        -registerDate sort type. (mark)registerDate,(mark)releaseDate, (mark)reviewNum or random. (mark) means plus or minus mark, each mark means Ascend and Descend. For example, +reviewNum
        field int 0 1
        1 0:search widely, 1:search narrowly
        imageFlag int 0 1
        0 0:all item, 1:only items that has image
        releaseRange int 0 12
        0 0:no limit, 1-12:search only sold in specified months
        orFlag int 0 1
        0 0:AND keywords, 1:OR keywords
        NGKeyword string
        null keyword that you want to omit
        genreInformationFlag int 0 1
        0 0:not get count of items that are in the same genre, 1:get count (This method supports only 0)
      • itemRanking() - Retrieve item ranking. Uses ItemRanking API
        parameter type min max required default explanation
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        genreId int 0
        null genre id.
        age int 10 50
        null age zone. 10:teen agers, 20:20 agers, 30:30 agers, 40:40 agers, 50:50 over
        sex int 0 1
        null sex. 0:men, 1:women
    • for the Rakuten Books
      • searchBook() - search books. Uses BookSearch API
        parameter type min max required default explanation
        following in params array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        keyword string
        may required null key word. One of keyword or genreId is required
        genreId int 0
        may required 0 genre id. One of keyword or genreId is required. The root id of the genreId must be 200162(books, magazine and comic).
        hits int 1 30
        30 items per page.
        page int 1 100
        1 page limits.
        sort string
        standard sort type. (mark)affiliateRate, (mark)reviewCount, (mark)itemPrice, (mark)updateTimestamp or random. (mark) means plus or minus mark, each mark means Ascend and Descend. For example, +itemPrice
        minPrice int 0
        null minimum price
        maxPrice int 0
        null maximum price. It must be grater than minPrice.
        availability int 0 1
        1 0:all items, 1:only items that you can buy.
        field int 0 1
        1 0:search widely, 1:search narrowly
        carrier int 0 1
        0 0:PC, 1:mobile
        imageFlag int 0 1
        0 0:all item, 1:only items that has image
        orFlag int 0 1
        0 0:AND keywords, 1:OR keywords
        NGKeyword string
        null keyword that you want to omit
        genreInformationFlag int 0 1
        0 0:not get count of items that are in the same genre, 1:get count (This method supports only 0)
      • searchCd() - search CDs. Uses CDSearch API
        This method has same parameters like searchBook(). But the root id of the genreId must be 101311(CD).
      • searchDvd() - search DVDs. Uses DVDSearch API
        This method has same parameters like searchBook(). But the root id of the genreId must be 101354(DVD).
    • for the Rakuten Auction
      • searchAuctionItem() - Search items. Uses AuctionItemSearch API
        parameter type min max required default explanation
        following in params array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        keyword string
        may required null key word. One of keyword or genreId is required
        genreId int 0
        may required 0 genre id. One of keyword or genreId is required.
        hits int 1 30
        30 items per page.
        page int 1 100
        1 page limits.
        minPrice int 0
        null minimum price
        maxPrice int 0
        null maximum price. It must be grater than minPrice
        sort string
        +endTime sort type. (mark)endTime, (mark)itemPrice, (mark)bidCount or (mark)affiliateRate. (mark) means plus or minus mark, each mark means Ascend and Descend. For example, +itemPrice
        blowFlag int 0 1
        0 0:all items, 1:only items that you can buy without waiting auction's end.
        itemType int 0 3
        0 0:all items, 1:only items that are sold by personal seller, 2:only items that are sold by shops, 3:only items that are sold by auction shops
        newFlag int 0 2
        0 0:all items, 1:only used items, 2:only unused items
        field int 0 1
        1 0:search widely, 1:search narrowly
        carrier int 0 1
        0 0:PC, 1:mobile
        imageFlag int 0 1
        0 0:all item, 1:only items that has image
        orFlag int 0 1
        0 0:AND keywords, 1:OR keywords
        NGKeyword string
        null keyword that you want to omit
      • searchAuctionItemCode() - Retrieve item's information by item code. Uses AuctionItemCodeSearch API
        parameter type min max required default explanation
        code string
        required
        item code
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        carrier int 0 1
        0 0:PC, 1:mobile
    • for the Rakuten Travel
      • searchSimpleHotel() - Search hotels. Uses SimpleHotelSearch API
        parameter type min max required default explanation
        following in params array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
      • searchHotelDetail() - Retrieve hotel's information by hotel number. Uses HotelDetailSearch API
        parameter type min max required default explanation
        hotelNo string
        required
        hotel number
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        carrier int 0 1
        0 0:PC, 1:mobile
        datumType int 1 2
        2 1:Unit is degree, 2:Unit is second.
      • searchVacantHotel() - Search hotels that have vacant room. Uses VacantHotelSearch
      • getAreaClass() - Retrieve choices of area. Uses GetAreaClass API
        parameter type min max required default explanation
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
      • searchKeywordHotel() - Search hotels by word. Uses KeywordHotelSearch API
        parameter type min max required default explanation
        keyword string
        required
        key word.
        following in optparams array
        affiliateId string
        null affiliate id
        callBack string
        null function name of Json call back
        carrier int 0 1
        0 0:PC, 1:mobile
        page int
        1 page limits.
        hits int 1 100
        20 items per page.
        sumDisplayFlag int 0 1
        0 0:not display features about the area and the hotel, 1:display.
        middleClassCode string
        null area code. You can get the list with getAreaClass().
    • Other purpose
      • dynamicAd() - Retrieve dynamic advertisements that is suitable for content in URL that you specify. Uses DynamicAd API and DynamicAd API (travel)
        parameter type min max required default explanation
        type string
        required item advertisement type. item or travel.
        affiliateId string
        required
        affiliate id
        url string
        required
        URL
        following in optparams array
        carrier int 0 1
        0 0:PC, 1:mobile
        callBack string
        null function name of Json call back

3. Component Requirements, Constraints, and Acceptance Criteria

  • Implements the "Rakuten Web Service" APIs.
  • Returns server responses as lightweight data objects.

4. Dependencies on Other Framework Components

  • Zend_Rest_Client
  • Zend_Service_Exception

5. Theory of Operation

Returns server response as the SimpleXMLElement.

6. Milestones / Tasks

  • Milestone 1: Class development and write proposal
  • Milestone 2: Unit tests and debugging
  • Milestone 3: Documentation

7. Class Index

  • Zend_Service_Rakuten

8. Use Cases

UC-01

Search 3 items by word, "Zend Studio". Its case is most simple case.

UC-02

Retrieve hotels that have vacant room for 1 adult person in the kasukabe city from today to tommorow.
The kasukabe city is in the saitama ward, and the saitama ward is in japan.
The checkinDate and checkoutDate are in Asia/Tokyo (GMT +9) time zone.

UC-03

Display advertisements that is suitable for www.zend.com .
dynamicAd() needs your affiliate ID from the Rakuten web service.

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.