显示 foursquare 场地图像作为图像响应

show foursquer venues image in response as image

我在 foursquare 中创建了一个应用程序,我有 client_id 和 client_secret key.By 使用这个 url https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&ll=35.719307,51.490538&intent=checkin&radius=200 我得到了用户周围最近的地方位置。结果是:

 {
    "meta": {
        "code": 200,
        "requestId": "5e9ad1c80be7b4001c1474bb"
    },
    "response": {
        "venues": [
            {
                "id": "57650baf498e141eccfe41ea",
                "name": "اتلیه عکاسی چشمک",
                "location": {
                    "lat": 35.718884,
                    "lng": 51.49175,
                    "labeledLatLngs": [
                        {
                            "label": "display",
                            "lat": 35.718884,
                            "lng": 51.49175
                        }
                    ],
                    "distance": 119,
                    "cc": "IR",
                    "country": "ایران",
                    "formattedAddress": [
                        "ایران"
                    ]
                },
                "categories": [
                    {
                        "id": "4bf58dd8d48988d1e2931735",
                        "name": "Art Gallery",
                        "pluralName": "Art Galleries",
                        "shortName": "Art Gallery",
                        "icon": {
                            "prefix": "https://ss3.4sqi.net/img/categories_v2/arts_entertainment/artgallery_",
                            "suffix": ".png"
                        },
                        "primary": true
                    }
                ],
                "referralId": "v-1587204556",
                "hasPerk": false
            },...

我想在应用程序中将场地数组显示为列表,我想显示

"icon": {
    "prefix": "https://ss3.4sqi.net/img/categories_v2/arts_entertainment/artgallery_",
    "suffix": ".png"
},

在列表项中,但如何显示此图片? 我混合图标数据像 https://ss3.4sqi.net/img/categories_v2/arts_entertainment/artgallery_4bf58dd8d48988d1e2931735.png 但我出错了。

构建各种尺寸的类别图标所需的部分。将前缀与大小(32、44、64 和 88 可用)和后缀组合在一起,例如https://foursquare.com/img/categories/food/default_64.png. To get an image with a gray background, use bg_ before the size, e.g. https://foursquare.com/img/categories_v2/food/icecream_bg_32.png

另见 https://developer.foursquare.com/docs/api-reference/venues/categories/