【发布时间】:2015-03-09 03:27:51
【问题描述】:
final String FORECAST_BASE_URL =
"http://api.openweathermap.org/data/2.5/forecast/daily?";
final String QUERY_PARAM = "q";
你好。 我正在制作一个天气预报应用程序。但是当我使用“http://openweathermap.org”的API时, 我进货有问题,如何获取城市代码或ID“q”? 我尝试查找城市 ID,但找不到。
示例代码按城市 ID 调用:
api.openweathermap.org/data/2.5/forecast/daily?id=524901
我听说“q”也用于“id”。 我的意思是
api.openweathermap.org/data/2.5/forecast/daily?q=524901
也是可以的。我想这样做。
那么,如何找到城市ID? 有人知道吗?
【问题讨论】:
-
你有解决办法吗?
标签: android weather forecasting