我正在使用clusterdev.flipkart-api,从这个API我有flipkart目录名称和链接然后点击它我得到目录的可用产品.但我需要从这个API获取特定产品的价格,标题,inStock详细信息.我试图做一些改变,但我没有更多的知识在json,所以我无法得到细节.在获得特定产品的价格,标题,inStock详细信息后,我需要将其更新到我的数据库中.
Flipkart Api常见问题链接:http://www.flipkart.com/affiliate/apifaq
请告诉我我需要做些什么改变来获得产品的价格,头衔,instock和其他细节.
实际代码:https://github.com/xaneem/flipkart-api-php 包含的文件:https://github.com/xaneem/flipkart-api-php/blob/master/clusterdev.flipkart-api.php
代码在这里
<?php
//Include the class.
include "clusterdev.flipkart-api.php";
//Replace <affiliate-id> and <access-token> with the correct values
$flipkart = new \clusterdev\Flipkart("pratikson3", "853d3bc027514b3aa33f1caa4f30f1cf", "json");
//To view category pages, API URL is passed as query string.
$url = isset($_GET['url'])?$_GET['url']:false;
if($url){
//URL is base64 encoded to prevent errors in some server setups.
$url = base64_decode($url);
//This parameter lets users allow out-of-stock items to be displayed.
$hidden = isset($_GET['hidden'])?false:true;
//Call the API …Run Code Online (Sandbox Code Playgroud)