- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在对食物进行类别搜索,但我得到了诸如 Bridges 之类的内容。有人可以验证我是否正确构造了 URL,如果是,请指出我做错了什么?
提前非常感谢您。
URL(屏蔽了客户端 ID 和 secret 等敏感内容): https://api.foursquare.com/v2/venues/search?client_id=PUT_YOUR_CLIENT_ID_HERE&client_secret=PUT_YOUR_CLIENT_SECRET_HERE&v=20140714&ll=40.7,-74&radius=1000&category=4d4b7105d754a06374d81259
我使用的类别 ID 来自 foursquare 的网站。这是“食物”的 ID您可以看到 ID 列表 Right Here
这是我的 json 响应(已编辑大小):
{
"meta": {
"code": 200
},
"response": {
"venues": [
{
"id": "430d0a00f964a5203e271fe3",
"name": "Brooklyn Bridge Park",
"contact": {
"phone": "2128033822",
"formattedPhone": "(212) 803-3822",
"twitter": "nycparks",
"facebook": "104475634308",
"facebookUsername": "BartowPell",
"facebookName": "Bartow-Pell Mansion Museum"
},
"location": {
"address": "Main St",
"crossStreet": "Plymouth St",
"lat": 40.70227697066692,
"lng": -73.9965033531189,
"distance": 389,
"postalCode": "11201",
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Main St (Plymouth St)",
"Brooklyn, NY 11201",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d163941735",
"name": "Park",
"pluralName": "Parks",
"shortName": "Park",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/park_",
"suffix": ".png"
},
"primary": true
}
],
"verified": true,
"stats": {
"checkinsCount": 28131,
"usersCount": 17548,
"tipCount": 177
},
"url": "http:\/\/nyc.gov\/parks",
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 15,
"summary": "15 people are checked in here",
"groups": [
{
"type": "others",
"name": "Other people here",
"count": 15,
"items": [
]
}
]
},
"referralId": "v-1429381004"
},
{
"id": "4a43bcb7f964a520bba61fe3",
"name": "Brooklyn Bridge",
"contact": {
"twitter": "nyc_dot",
"facebook": "166279802886",
"facebookUsername": "NYCDOT",
"facebookName": "NYC DOT"
},
"location": {
"address": "Brooklyn Bridge",
"lat": 40.705953265881305,
"lng": -73.99656772613525,
"distance": 723,
"postalCode": "10038",
"cc": "US",
"city": "New York",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Brooklyn Bridge",
"New York, NY 10038",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d1df941735",
"name": "Bridge",
"pluralName": "Bridges",
"shortName": "Bridge",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/bridge_",
"suffix": ".png"
},
"primary": true
}
],
"verified": true,
"stats": {
"checkinsCount": 120787,
"usersCount": 67456,
"tipCount": 534
},
"url": "http:\/\/www.nyc.gov\/dot",
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 18,
"summary": "18 people are checked in here",
"groups": [
{
"type": "others",
"name": "Other people here",
"count": 18,
"items": [
]
}
]
},
"storeId": "",
"referralId": "v-1429381004"
},
{
"id": "51eabef6498e10cf3aea7942",
"name": "Brooklyn Bridge Park - Pier 2",
"contact": {
},
"location": {
"address": "Furman St",
"crossStreet": "Brooklyn Bridge Park Greenway",
"lat": 40.69956454780675,
"lng": -73.99835740533105,
"distance": 146,
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Furman St (Brooklyn Bridge Park Greenway)",
"Brooklyn, NY",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d163941735",
"name": "Park",
"pluralName": "Parks",
"shortName": "Park",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/park_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 1508,
"usersCount": 1161,
"tipCount": 10
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "3fd66200f964a520daf11ee3",
"name": "South Street Seaport",
"contact": {
"phone": "2127327678",
"formattedPhone": "(212) 732-7678",
"twitter": "theseaport"
},
"location": {
"address": "South St",
"crossStreet": "Pier 17",
"lat": 40.70566047104496,
"lng": -74.00287628173828,
"distance": 675,
"postalCode": "10038",
"cc": "US",
"city": "New York",
"state": "NY",
"country": "United States",
"formattedAddress": [
"South St (Pier 17)",
"New York, NY 10038",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d1e0941735",
"name": "Harbor \/ Marina",
"pluralName": "Harbors \/ Marinas",
"shortName": "Harbor \/ Marina",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/harbor_",
"suffix": ".png"
},
"primary": true
}
],
"verified": true,
"stats": {
"checkinsCount": 45850,
"usersCount": 29726,
"tipCount": 180
},
"url": "http:\/\/www.southstreetseaport.com",
"specials": {
"count": 0,
"items": [
]
},
"events": {
"count": 1,
"summary": "Hornblower",
"items": [
{
"id": "550a2152498e6adfd409dfa4",
"name": "Hornblower",
"categories": [
],
"allDay": true,
"date": 1429345800,
"timeZone": "America\/New_York",
"text": "",
"url": "http:\/\/www.voiceplaces.com\/new-york\/hornblower-4897577-e",
"images": [
],
"provider": {
"name": "Village Voice",
"iconUrl": {
"prefix": "https:\/\/playfoursquare.s3.amazonaws.com\/events\/images\/partners\/villagevoice\/",
"sizes": [
20,
40
],
"name": "\/logo.png"
},
"urlText": "more info"
},
"stats": {
"checkinsCount": 0,
"usersCount": 0
}
}
]
},
"hereNow": {
"count": 5,
"summary": "5 people are checked in here",
"groups": [
{
"type": "others",
"name": "Other people here",
"count": 5,
"items": [
]
}
]
},
"venuePage": {
"id": "59071427"
},
"storeId": "",
"referralId": "v-1429381004"
},
{
"id": "42377700f964a52024201fe3",
"name": "Brooklyn Heights Promenade",
"contact": {
},
"location": {
"address": "Columbia Heights",
"crossStreet": "btwn Remsen & Orange",
"lat": 40.69829137715981,
"lng": -73.99663209915161,
"distance": 342,
"postalCode": "11201",
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Columbia Heights (btwn Remsen & Orange)",
"Brooklyn, NY 11201",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d163941735",
"name": "Park",
"pluralName": "Parks",
"shortName": "Park",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/park_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 18073,
"usersCount": 8755,
"tipCount": 138
},
"url": "http:\/\/nyharborparks.org\/visit\/brhe.html",
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "53ff2935498e161412b3e871",
"name": "Brooklyn Bridge Park - Pier 2 Yoga Court",
"contact": {
},
"location": {
"lat": 40.700111,
"lng": -73.999185,
"distance": 69,
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Brooklyn, NY",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d102941735",
"name": "Yoga Studio",
"pluralName": "Yoga Studios",
"shortName": "Yoga Studio",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/gym_yogastudio_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 6,
"usersCount": 3,
"tipCount": 0
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "4f2c1bbae4b0ccfb1d99b510",
"name": "kk hair salon",
"contact": {
},
"location": {
"lat": 40.69956588745117,
"lng": -74.00108337402344,
"distance": 103,
"cc": "US",
"state": "New York",
"country": "United States",
"formattedAddress": [
"New York",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d110951735",
"name": "Salon \/ Barbershop",
"pluralName": "Salons \/ Barbershops",
"shortName": "Salon \/ Barbershop",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/salon_barber_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 1,
"usersCount": 1,
"tipCount": 0
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "540ca09f498e9d0f44e40791",
"name": "Smorgasburg at Brooklyn Bridge Park - Pier 2",
"contact": {
"twitter": "bkflea"
},
"location": {
"address": "Pier 2 (at Brooklyn Bridge Park)",
"lat": 40.69938593942123,
"lng": -73.99699733176632,
"distance": 262,
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Pier 2 (at Brooklyn Bridge Park)",
"Brooklyn, NY",
"United States"
]
},
"categories": [
{
"id": "53e0feef498e5aac066fd8a9",
"name": "Street Food Gathering",
"pluralName": "Street Food Gatherings",
"shortName": "Street Food Gathering",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/streetfood_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 545,
"usersCount": 523,
"tipCount": 6
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "3fd66200f964a520e9e81ee3",
"name": "Grimaldi's Pizzeria",
"contact": {
"phone": "7188584300",
"formattedPhone": "(718) 858-4300",
"twitter": "grimaldisnyc"
},
"location": {
"address": "1 Front St",
"crossStreet": "at Cadman Plaza W",
"lat": 40.70250515261926,
"lng": -73.9933359887217,
"distance": 627,
"postalCode": "11201",
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"1 Front St (at Cadman Plaza W)",
"Brooklyn, NY 11201",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d1ca941735",
"name": "Pizza Place",
"pluralName": "Pizza Places",
"shortName": "Pizza",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/pizza_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 21973,
"usersCount": 18381,
"tipCount": 459
},
"url": "http:\/\/www.grimaldis.com",
"hasMenu": true,
"menu": {
"type": "Menu",
"label": "Menu",
"anchor": "View Menu",
"url": "https:\/\/foursquare.com\/v\/grimaldis-pizzeria\/3fd66200f964a520e9e81ee3\/menu",
"mobileUrl": "https:\/\/foursquare.com\/v\/3fd66200f964a520e9e81ee3\/device_menu"
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "4c34a57da0ced13a9379186e",
"name": "Under The Brooklyn Bridge",
"contact": {
"twitter": "nyc_dot",
"facebook": "166279802886",
"facebookUsername": "NYCDOT",
"facebookName": "NYC DOT"
},
"location": {
"address": "Brooklyn Bridge",
"crossStreet": "FDR Dr",
"lat": 40.703475724581324,
"lng": -73.99405334200495,
"distance": 633,
"postalCode": "11201",
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"Brooklyn Bridge (FDR Dr)",
"Brooklyn, NY 11201",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d165941735",
"name": "Scenic Lookout",
"pluralName": "Scenic Lookouts",
"shortName": "Scenic Lookout",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/sceniclookout_",
"suffix": ".png"
},
"primary": true
}
],
"verified": true,
"stats": {
"checkinsCount": 7406,
"usersCount": 5831,
"tipCount": 31
},
"url": "http:\/\/www.nyc.gov\/dot",
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "4cb92bdc7148f04d9336d5ab",
"name": "Livys apartment !",
"contact": {
},
"location": {
"address": "95 Wall St",
"crossStreet": "Water st",
"lat": 40.700249,
"lng": -74.001442,
"distance": 124,
"postalCode": "10005",
"cc": "US",
"city": "New York",
"state": "NY",
"country": "United States",
"formattedAddress": [
"95 Wall St (Water st)",
"New York, NY 10005",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d1a3941735",
"name": "College Residence Hall",
"pluralName": "College Residence Halls",
"shortName": "Residence Hall",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/education\/residencehall_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 1,
"usersCount": 1,
"tipCount": 0
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "4c5435bf4623be9a62ee66f2",
"name": "Brooklyn Bridge Park - Pier 4",
"contact": {
},
"location": {
"address": "214 Furman St",
"crossStreet": "Montague St",
"lat": 40.69662731765942,
"lng": -73.99846644034649,
"distance": 397,
"postalCode": "11201",
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"214 Furman St (Montague St)",
"Brooklyn, NY 11201",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d163941735",
"name": "Park",
"pluralName": "Parks",
"shortName": "Park",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/park_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 1196,
"usersCount": 945,
"tipCount": 3
},
"url": "http:\/\/www.brooklynbridgepark.org\/the-park\/future-park\/pier-4",
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "5054eb43e4b04ed4f0dd1b30",
"name": "La cabana",
"contact": {
},
"location": {
"lat": 40.69875,
"lng": -73.99953,
"distance": 144,
"cc": "US",
"state": "New York",
"country": "United States",
"formattedAddress": [
"New York",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d154941735",
"name": "Cuban Restaurant",
"pluralName": "Cuban Restaurants",
"shortName": "Cuban",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/cuban_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 4,
"usersCount": 4,
"tipCount": 1
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
},
{
"id": "4ae62580f964a52011a521e3",
"name": "Danish Seamen's Church",
"contact": {
},
"location": {
"address": "102 Willow St",
"lat": 40.698023159650134,
"lng": -73.99568889745463,
"distance": 425,
"postalCode": "11201",
"cc": "US",
"city": "Brooklyn",
"state": "NY",
"country": "United States",
"formattedAddress": [
"102 Willow St",
"Brooklyn, NY 11201",
"United States"
]
},
"categories": [
{
"id": "4bf58dd8d48988d132941735",
"name": "Church",
"pluralName": "Churches",
"shortName": "Church",
"icon": {
"prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/religious_church_",
"suffix": ".png"
},
"primary": true
}
],
"verified": false,
"stats": {
"checkinsCount": 106,
"usersCount": 71,
"tipCount": 0
},
"specials": {
"count": 0,
"items": [
]
},
"hereNow": {
"count": 0,
"summary": "Nobody here",
"groups": [
]
},
"referralId": "v-1429381004"
}
],
"confident": true
}
}
最佳答案
请查看foursquare venues search参数正确,您使用了“category”参数,但正确的参数是“categoryId”(不是categoryid)。所以你应该将你的网址更改为:
关于java - 使用 Foursquare 进行类别搜索返回错误类别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29721177/
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
您好,我正在尝试使用 python 库 pytesseract 从图像中提取文本。请找到代码: from PIL import Image from pytesseract import image_
我的错误 /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference
我已经训练了一个模型,我正在尝试使用 predict函数但它返回以下错误。 Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]])
根据Microsoft DataConnectors的信息我想通过 this ODBC driver 创建一个从 PowerBi 到 PostgreSQL 的连接器使用直接查询。我重用了 Micros
我已经为 SoundManagement 创建了一个包,其中有一个扩展 MediaPlayer 的类。我希望全局控制这个变量。这是我的代码: package soundmanagement; impo
我在Heroku上部署了一个应用程序。我正在使用免费服务。 我经常收到以下错误消息。 PG::Error: ERROR: out of memory 如果刷新浏览器,就可以了。但是随后,它又随机发生
我正在运行 LAMP 服务器,这个 .htaccess 给我一个 500 错误。其作用是过滤关键字并重定向到相应的域名。 Options +FollowSymLinks RewriteEngine
我有两个驱动器 A 和 B。使用 python 脚本,我在“A”驱动器中创建一些文件,并运行 powerscript,该脚本以 1 秒的间隔将驱动器 A 中的所有文件复制到驱动器 B。 我在 powe
下面的函数一直返回这个错误信息。我认为可能是 double_precision 字段类型导致了这种情况,我尝试使用 CAST,但要么不是这样,要么我没有做对...帮助? 这是错误: ERROR: i
这个问题已经有答案了: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答) 已关闭
我的数据库有这个小问题。 我创建了一个表“articoli”,其中包含商品的品牌、型号和价格。 每篇文章都由一个 id (ID_ARTICOLO)` 定义,它是一个自动递增字段。 好吧,现在当我尝试插
我是新来的。我目前正在 DeVry 在线学习中级 C++ 编程。我们正在使用 C++ Primer Plus 这本书,到目前为止我一直做得很好。我的老师最近向我们扔了一个曲线球。我目前的任务是这样的:
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我的网站中有一段代码有问题;此错误仅发生在 Internet Explorer 7 中。 我没有在这里发布我所有的 HTML/CSS 标记,而是发布了网站的一个版本 here . 如您所见,我在列中有
如果尝试在 USB 设备上构建 node.js 应用程序时在我的树莓派上使用 npm 时遇到一些问题。 package.json 看起来像这样: { "name" : "node-todo",
在 Python 中,您有 None单例,在某些情况下表现得很奇怪: >>> a = None >>> type(a) >>> isinstance(a,None) Traceback (most
这是我的 build.gradle (Module:app) 文件: apply plugin: 'com.android.application' android { compileSdkV
我是 android 的新手,我的项目刚才编译和运行正常,但在我尝试实现抽屉导航后,它给了我这个错误 FAILURE: Build failed with an exception. What wen
谁能解释一下?我想我正在做一些非常愚蠢的事情,并且急切地等待着启蒙。 我得到这个输出: phpversion() == 7.2.25-1+0~20191128.32+debian8~1.gbp108
我是一名优秀的程序员,十分优秀!