{"id":199193,"date":"2015-07-07T20:47:24","date_gmt":"2015-07-07T11:47:24","guid":{"rendered":"https:\/\/ja.wordpress.org\/support\/2015\/07\/07\/%e4%b8%ad%e5%8f%a4%e8%bb%8a%e6%a4%9c%e7%b4%a2api%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%9f%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%8d%e3%83%bc%e3%82%b\/"},"modified":"2016-07-30T21:13:26","modified_gmt":"2016-07-30T21:13:26","slug":"%e4%b8%ad%e5%8f%a4%e8%bb%8a%e6%a4%9c%e7%b4%a2api%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%9f%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%8d%e3%83%bc","status":"closed","type":"topic","link":"https:\/\/ja.wordpress.org\/support\/topic\/%e4%b8%ad%e5%8f%a4%e8%bb%8a%e6%a4%9c%e7%b4%a2api%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%9f%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%8d%e3%83%bc\/","title":{"rendered":"\u4e2d\u53e4\u8eca\u691c\u7d22api\u3092\u5229\u7528\u3057\u305f\u56fa\u5b9a\u30da\u30fc\u30b8\u306e\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3"},"content":{"rendered":"<p>\u306f\u3058\u3081\u307e\u3057\u3066\u3002<br \/>\n\u8272\u3005\u3068\u30cd\u30c3\u30c8\u3067\u8abf\u3079\u305f\u306e\u3067\u3059\u304c\u3001\u77e5\u8b58\u8db3\u3089\u305a\u3067\u89e3\u6c7a\u6cd5\u304c\u898b\u5f53\u305f\u3089\u306a\u304b\u3089\u305a\u3001\u5f53\u30d5\u30a9\u30fc\u30e9\u30e0\u306b\u6295\u7a3f\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>WordPress\u306e\u56fa\u5b9a\u30da\u30fc\u30b8\u306b\u30ab\u30fc\u30bb\u30f3\u30b5\u30fc\u306e\u4e2d\u53e4\u8eca\u691c\u7d22api\u3092\u5229\u7528\u3057\u3066\u4e2d\u53e4\u8eca\u3092\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u3002<br \/>\n\u56fa\u5b9a\u30da\u30fc\u30b8\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3002<\/p>\n<pre><code>&lt;!--post-entry end--&gt;\n&lt;?php the_content(); ?&gt;\n&lt;hr&gt;\n&lt;?php\n\/\/\u30ab\u30fc\u30bb\u30f3\u30b5\u30fcAIP_START\n\/\/\u30d9\u30fc\u30b9URL\n$baseurl = &quot;http:\/\/webservice.recruit.co.jp\/carsensor\/usedcar\/v1\/&quot;;\n\n\/\/\u30ea\u30af\u30a8\u30b9\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\n\n$key = &#039;aa3f6edc73b877bd&#039;; \/\/API\u30ad\u30fc\n$brand = post_custom(&#039;brand&#039;); \/\/\u30e1\u30fc\u30ab\u30fc\n\n\/\/\u30ea\u30af\u30a8\u30b9\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u7d44\u307f\u7acb\u3066\n$url = &quot;$baseurl?key=$key&amp;pref=10&amp;brand=$brand&amp;count=100&amp;order=5&quot;;\n\n\/\/xml\u30d1\u30fc\u30b9\n$xml = simplexml_load_file( $url );\n\/\/\u30ab\u30fc\u30bb\u30f3\u30b5\u30fcAIP_END\n?&gt;\n\n&lt;?php echo $xml-&gt;results_available; ?&gt;\u4ef6\u30d2\u30c3\u30c8\u3057\u307e\u3057\u305f\u3002\n\n&lt;?php if( $xml-&gt;results_returned != 0 ): ?&gt;\n\t&lt;?php foreach ( $xml-&gt;usedcar as $i ): ?&gt;\n\t\t&lt;div class=&quot;craftsman_search_car&quot;&gt;\n\t\t\t&lt;div class=&quot;row spaces&quot;&gt;\n\t\t\t&lt;div class=&quot;col-sm-4&quot;&gt;\n\t\t\t&lt;a href=&quot;&lt;?php echo $i-&gt;urls-&gt;pc; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;&lt;?php echo $i-&gt;photo-&gt;main-&gt;l; ?&gt;&quot; alt=&quot;&lt;?php echo $i-&gt;brand-&gt;name; ?&gt; &lt;?php echo $i-&gt;model; ?&gt; \/ &lt;?php echo $i-&gt;grade; ?&gt;&quot; title=&quot;&lt;?php echo $i-&gt;photo-&gt;main-&gt;caption; ?&gt;&quot; class=&quot;img-thumbnail&quot;&gt;&lt;\/a&gt;&lt;p&gt;&lt;small&gt;\u3010\u753b\u50cf\u63d0\u4f9b\uff1a\u30ab\u30fc\u30bb\u30f3\u30b5\u30fcnet \u3011&lt;\/small&gt;&lt;\/p&gt;\n\t\t\t&lt;\/div&gt; &lt;!-- col-sm-4 end --&gt;\n\t\t\t&lt;div class=&quot;col-sm-8&quot;&gt;\n\t\t\t\t&lt;div class=&quot;row&quot;&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-12&quot;&gt;\n\t\t\t\t&lt;h3 id=&quot;car_name&quot;&gt;&lt;a href=&quot;&lt;?php echo $i-&gt;urls-&gt;pc; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?php echo $i-&gt;brand-&gt;name; ?&gt; &lt;?php echo $i-&gt;model; ?&gt; \/ &lt;?php echo $i-&gt;grade; ?&gt;&lt;\/a&gt;&lt;\/h3&gt;\n\t\t\t\t&lt;\/div&gt; &lt;!-- col-xs-12 end --&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-4&quot;&gt;\n\t\t\t\t\u672c\u4f53\u4fa1\u683c\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-8&quot;&gt;\n\t\t\t\t&lt;b class=&quot;price &quot;&gt;&lt;?php echo number_format( (int)$i-&gt;price ); ?&gt;\u5186&lt;\/b&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-4&quot;&gt;\n\t\t\t\t\u521d\u5ea6\u767b\u9332\u5e74\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-8&quot;&gt;\n\t\t\t\t&lt;?php echo $i-&gt;year; ?&gt;\u5e74\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-4&quot;&gt;\n\t\t\t\t\u8d70\u884c\u8ddd\u96e2\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-8&quot;&gt;\n\t\t\t\t&lt;?php echo $i-&gt;odd; ?&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-4&quot;&gt;\n\t\t\t\t\u6574\u5099\u30fb\u4fdd\u8a3c\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-8&quot;&gt;\n\t\t\t\t&lt;?php echo $i-&gt;maintenance; ?&gt; \/ &lt;?php echo $i-&gt;warranty; ?&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-4&quot;&gt;\n\t\t\t\t\u30b3\u30e1\u30f3\u30c8\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;div class=&quot;col-xs-8&quot;&gt;\n\t\t\t\t&lt;?php echo $i-&gt;desc; ?&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;\/div&gt; &lt;!-- row end --&gt;\n\t\t\t&lt;\/div&gt; &lt;!-- col-sm-8 end --&gt;\n\t\t\t&lt;\/div&gt; &lt;!-- row end --&gt;\n\t\t&lt;\/div&gt; &lt;!-- craftsman_search end --&gt;\n\t&lt;?php endforeach; ?&gt;\n&lt;?php else: ?&gt;\n\t\t&lt;p&gt;\u306a\u3044\u3088&lt;\/p&gt;\n\n&lt;?php endif; ?&gt;\n&lt;?php endwhile; ?&gt;<\/code><\/pre>\n<p>\u73fe\u5728\u306f100\u4ef6\u53d6\u5f97\u3057\u3001100\u4ef6\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u304c101\u4ef6\u4ee5\u964d\u3092\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u3067\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u304c\u898b\u3064\u304b\u3089\u305a\u3001\u601d\u3044\u3064\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\nWP-PageNavi\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u308f\u306a\u3044\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u3082\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u304c\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u81ea\u4f53\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u6d45\u306f\u304b\u306a\u8003\u3048\u3067\u3059\u304c\u3001 WP-PageNavi\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u308f\u306a\u3044\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u306f\u56fa\u5b9a\u30da\u30fc\u30b8\u6570\u307e\u305f\u306f\u6295\u7a3f\u6570\u306e\u5408\u8a08\u3092\u53d6\u5f97\u3057\u3066\u884c\u3063\u3066\u3044\u308b\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u3092\u4e2d\u53e4\u8eca\u691c\u7d22api\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30d5\u30a3\u30fc\u30eb\u30c9\u300cresults_available\uff08\u30af\u30a8\u30ea\u30fc\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3059\u308b\u3001\u691c\u7d22\u7d50\u679c\u306e\u5168\u4ef6\u6570\uff09\u300d\u306b\u3057\u3066\u3042\u3052\u308c\u3070\u5c11\u3057\u306f\u89e3\u6c7a\u3067\u304d\u308b\u306e\u3067\u306f\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u305f\u3076\u3093\u2026<\/p>\n<p>\u3069\u3046\u3059\u308c\u3070\u3001\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u304c\u53ef\u80fd\u306b\u306a\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<br \/>\n\u4f55\u5352\u3054\u6559\u6388\u306e\u307b\u3069\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p>\u2193\u30ab\u30fc\u30bb\u30f3\u30b5\u30fc \u4e2d\u53e4\u8eca\u691c\u7d22api\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<br \/>\n<a href=\"https:\/\/webservice.recruit.co.jp\/carsensor\/reference.html#1\">https:\/\/webservice.recruit.co.jp\/carsensor\/reference.html#1<\/a><\/p>\n","protected":false},"template":"","class_list":["post-199193","topic","type-topic","status-closed","hentry","topic-tag-api","topic-tag-14136"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/199193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/199193\/revisions"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=199193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}