2
我正在實施Bing
搜索圖片搜索。Android:必應圖片搜索結果定製
我參考this鏈接,並將我的回覆更改爲JSON
。
它的工作原理,其結果是這樣的:
{
"d": {
"results": [{
"__metadata": {
"uri": "https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027Pepsi\u0027&$skip=0&$top=1",
"type": "ImageResult"
},
"ID": "64737694-fc53-4d68-933d-10edc214fd3a",
"Title": "Pepsi: Like Madonna, its look has been reinvented time and time again ...",
"MediaUrl": "http://tjthesportsgeek.files.wordpress.com/2012/02/pepsi.png",
"SourceUrl": "http://tjthesportsgeek.com/2012/02/14/tale-of-the-tape-coke-vs-pepsi/",
"DisplayUrl": "tjthesportsgeek.com/2012/02/14/tale-of-the-tape-coke-vs-pepsi",
"Width": "1588",
"Height": "2064",
"FileSize": "569827",
"ContentType": "image/png",
"Thumbnail": {
"__metadata": {
"type": "Bing.Thumbnail"
},
"MediaUrl": "http://ts2.mm.bing.net/th?id=OIP.M7f9b9a39639b9ca8bb6f1cba6e35d041H0&pid=15.1",
"ContentType": "image/jpg",
"Width": "369",
"Height": "480",
"FileSize": "19879"
}
},
// Next array element
]
}
}
但我需要的是:
的
json
結果只有MediaUrl和縮略圖的MediaUrl。 (因爲它可以在谷歌自定義搜索與字段=項目(鏈接,圖像/ thumbnailLink)標籤「領域」的幫助下)只有中等尺寸的圖像。 (我搜索了這個和應用過濾器,但沒用。)
請回復您的寶貴意見。