From: Joshua Roesslein Date: Mon, 1 Dec 2014 21:08:30 +0000 (-0600) Subject: Upgrade trends methods documentation. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3c0d993ff8d76debd15460ba7647297a559da142;p=tweepy.git Upgrade trends methods documentation. --- diff --git a/docs/api.rst b/docs/api.rst index 350722b..ed6497e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -701,15 +701,38 @@ List Methods :rtype: :class:`User` object if user is subscribed to the list, otherwise False. -Local Trends Methods +Trends Methods -------------------- -.. method:: API.trends_available([lat], [long]) +.. method:: API.trends_available() - Returns the locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in. [Coming soon] + Returns the locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in. - :param lat: If passed in conjunction with long, then the available trend locations will be sorted by distance to the lat and long passed in. The sort is nearest to furthest. - :param long: See lat. + :rtype: :class:`JSON` object + + +.. method:: API.trends_place(id, [exclude]) + + Returns the top 10 trending topics for a specific WOEID, if trending information is available for it. + + The response is an array of “trend” objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL. + + This information is cached for 5 minutes. Requesting more frequently than that will not return any more data, and will count against your rate limit usage. + + :param id: The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID. + :param exclude: Setting this equal to hashtags will remove all hashtags from the trends list. + :rtype: :class:`JSON` object + +.. method:: API.trends_closest(lat, long) + + Returns the locations that Twitter has trending topic information for, closest to a specified location. + + The response is an array of “locations” that encode the location’s WOEID and some other human-readable information such as a canonical name and country the location belongs in. + + A WOEID is a Yahoo! Where On Earth ID. + + :param lat: If provided with a long parameter the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair. The valid ranges for longitude is -180.0 to +180.0 (West is negative, East is positive) inclusive. + :param long: If provided with a lat parameter the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair. The valid ranges for longitude is -180.0 to +180.0 (West is negative, East is positive) inclusive. :rtype: :class:`JSON` object