Changeset 1170322
- Timestamp:
- 05/29/2015 05:00:42 PM (11 years ago)
- Location:
- cs-shop/trunk
- Files:
-
- 3 edited
-
cs-shop.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
service-rakuten.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cs-shop/trunk/cs-shop.php
r655498 r1170322 4 4 Plugin URI: http://www.csync.net/category/blog/wp-plugin/cs-shop/ 5 5 Description: Easy to create a affiliate products page of affiliate services in Japan. 6 Version: 1. 1.16 Version: 1.2 7 7 Author: cottonspace 8 8 Author URI: http://www.csync.net/ … … 28 28 * プラグインのバージョン 29 29 */ 30 define('CS_SHOP_VER', '1. 1.1');30 define('CS_SHOP_VER', '1.2'); 31 31 32 32 /** -
cs-shop/trunk/readme.txt
r655498 r1170322 4 4 Requires at least: 3.0 5 5 Tested up to: 3.0 6 Stable tag: 1. 1.16 Stable tag: 1.2 7 7 8 8 Easy to create a affiliate products page of affiliate services in Japan. … … 29 29 30 30 == Changelog == 31 32 = 1.2 = 33 * Support Rakuten API 2014-02-22 version. 31 34 32 35 = 1.1.1 = -
cs-shop/trunk/service-rakuten.php
r575123 r1170322 3 3 * アフィリエイトサービス実装クラス(楽天) 4 4 * User: cottonspace 5 * Date: 1 2/04/115 * Date: 15/05/30 6 6 */ 7 7 … … 53 53 /** 54 54 * カテゴリ検索クエリ生成 55 * @link http ://webservice.rakuten.co.jp/api/genresearch/55 * @link https://webservice.rakuten.co.jp/api/ichibagenresearch/ 56 56 * @param string $category 対象カテゴリ 57 57 * @return string RESTクエリ文字列 … … 62 62 $category = 0; 63 63 } 64 $baseurl = "http ://api.rakuten.co.jp/rws/3.0/rest";64 $baseurl = "https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20140222"; 65 65 $params = array(); 66 $params[" developerId"] = $this->account["developerId"];66 $params["applicationId"] = $this->account["developerId"]; 67 67 $params["affiliateId"] = $this->account["affiliateId"]; 68 $params["operation"] = "GenreSearch"; 69 $params["version"] = "2007-04-11"; 68 $params["format"] = "xml"; 70 69 $params["genrePath"] = 0; 71 70 $params["genreId"] = $category; … … 76 75 /** 77 76 * 商品検索クエリ生成 78 * @link http ://webservice.rakuten.co.jp/api/itemsearch/77 * @link https://webservice.rakuten.co.jp/api/ichibaitemsearch/ 79 78 * @return string RESTクエリ文字列 80 79 */ 81 80 private function queryItems() 82 81 { 83 $baseurl = "http ://api.rakuten.co.jp/rws/3.0/rest";82 $baseurl = "https://app.rakuten.co.jp/services/api/IchibaItem/Search/20140222"; 84 83 $params = array(); 85 $params[" developerId"] = $this->account["developerId"];84 $params["applicationId"] = $this->account["developerId"]; 86 85 $params["affiliateId"] = $this->account["affiliateId"]; 87 $params["operation"] = "ItemSearch"; 88 $params["version"] = "2010-09-15"; 86 $params["format"] = "xml"; 89 87 $params["hits"] = $this->requests["pagesize"]; 90 88 $params["availability"] = 1; … … 159 157 // RESTクエリ実行 160 158 $strxml = $this->download($query, $query); 161 $strxml = str_replace("header:Header", "Header", $strxml);162 $strxml = str_replace("genreSearch:GenreSearch", "GenreSearch", $strxml);163 159 $objxml = simplexml_load_string($strxml); 164 160 $hash = array(); 165 if (isset($objxml-> Body->GenreSearch)) {166 foreach ($objxml-> Body->GenreSearch->child as $node) {161 if (isset($objxml->children)) { 162 foreach ($objxml->children->child as $node) { 167 163 $hash[(string)$node->genreId] = (string)$node->genreName; 168 164 } … … 183 179 // RESTクエリ実行 184 180 $strxml = $this->download($query, $query); 185 $strxml = str_replace("header:Header", "Header", $strxml);186 $strxml = str_replace("itemSearch:ItemSearch", "ItemSearch", $strxml);187 181 $objxml = simplexml_load_string($strxml); 188 182 $hash = array(); 189 if (isset($objxml-> Body->ItemSearch)) {190 $this->pages = intval($objxml-> Body->ItemSearch->pageCount);191 foreach ($objxml-> Body->ItemSearch->Items->Item as $node) {183 if (isset($objxml->Items)) { 184 $this->pages = intval($objxml->pageCount); 185 foreach ($objxml->Items->Item as $node) { 192 186 array_push($hash, array( 193 187 "name" => (string)$node->itemName, … … 197 191 "score" => floatval((string)$node->reviewAverage), 198 192 "aurl" => (string)$node->affiliateUrl, 199 "iurl" => empty($this->requests["mobile"]) ? (string)$node->mediumImageUrl : (string)$node->smallImageUrl,193 "iurl" => empty($this->requests["mobile"]) ? (string)$node->mediumImageUrls->imageUrl[0] : (string)$node->smallImageUrls->imageUrl[0], 200 194 "surl" => (string)$node->shopUrl 201 195 )
Note: See TracChangeset
for help on using the changeset viewer.