本文整理了Java中twitter4j.Twitter.reverseGeoCode()
方法的一些代码示例,展示了Twitter.reverseGeoCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Twitter.reverseGeoCode()
方法的具体详情如下:
包路径:twitter4j.Twitter
类名称:Twitter
方法名:reverseGeoCode
暂无
代码示例来源:origin: org.twitter4j/twitter4j-async
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
ResponseList<Place> places = twitter.reverseGeoCode(query);
for (TwitterListener listener : listeners) {
try {
listener.gotReverseGeoCode(places);
} catch (Exception e) {
logger.warn("Exception at reverseGeoCode", e);
}
}
}
});
代码示例来源:origin: org.mule.modules/mule-module-twitter
/**
* Search for places (cities and neighborhoods) that can be attached to a
* statuses/update. Given a latitude and a longitude, return a list of all the
* valid places that can be used as a place_id when updating a status.
* Conceptually, a query can be made from the user's location, retrieve a list of
* places, have the user validate the location he or she is at, and then send the
* ID of this location up with a call to statuses/update.<br>
* There are multiple granularities of places that can be returned --
* "neighborhoods", "cities", etc. At this time, only United States data is
* available through this method.
* <p/>
* {@sample.xml ../../../doc/twitter-connector.xml.sample twitter:reverseGeoCode}
*
* @param latitude latitude coordinate. Mandatory if ip is not specified
* @param longitude longitude coordinate.
* @return a {@link ResponseList} of {@link Place}
* @throws TwitterException when Twitter service or network is unavailable
*/
@Processor
public ResponseList<Place> reverseGeoCode(@Placement(group = "Coordinates") @Optional Double latitude,
@Placement(group = "Coordinates") @Optional Double longitude)
throws TwitterException {
return getConnectionManagement().getTwitterClient().reverseGeoCode(createQuery(latitude, longitude, null));
}
内容来源于网络,如有侵权,请联系作者删除!