Class JTwitterPlaces

Description

Twitter API Places & Geo class for the Joomla Platform.

  • since: 12.3

Located in /libraries/joomla/twitter/places.php (line 19)

JTwitterObject
   |
   --JTwitterPlaces
Method Summary
 array createPlace (float $lat, float $long, string $name, string $geo_token, string $within, [string $attribute = null], [string $callback = null])
 array getGeocode (float $lat, float $long, [string $accuracy = null], [string $granularity = null], [integer $max_results = 0], [string $callback = null])
 array getPlace (string $id)
 array getSimilarPlaces (float $lat, float $long, string $name, [string $within = null], [string $attribute = null], [string $callback = null])
 array search ([float $lat = null], [float $long = null], [string $query = null], [string $ip = null], [string $granularity = null], [string $accuracy = null], [integer $max_results = 0], [string $within = null], [string $attribute = null], [string $callback = null])
Variables
Methods
createPlace (line 262)

Method to create a new place object at the given latitude and longitude.

  • return: The decoded JSON response
  • since: 12.3
  • access: public
array createPlace (float $lat, float $long, string $name, string $geo_token, string $within, [string $attribute = null], [string $callback = null])
  • float $lat: The latitude to search around.
  • float $long: The longitude to search around.
  • string $name: The name a place is known as.
  • string $geo_token: The token found in the response from geo/similar_places.
  • string $within: This is the place_id which you would like to restrict the search results to.
  • string $attribute: This parameter searches for places which have this given street address.
  • string $callback: If supplied, the response will use the JSONP format with a callback of the given name.
getGeocode (line 58)

Method to get up to 20 places that can be used as a place_id when updating a status.

  • return: The decoded JSON response
  • since: 12.3
  • access: public
array getGeocode (float $lat, float $long, [string $accuracy = null], [string $granularity = null], [integer $max_results = 0], [string $callback = null])
  • float $lat: The latitude to search around.
  • float $long: The longitude to search around.
  • string $accuracy: A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet.
  • string $granularity: This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country.
  • integer $max_results: A hint as to the number of results to return.
  • string $callback: If supplied, the response will use the JSONP format with a callback of the given name.
getPlace (line 30)

Method to get all the information about a known place.

  • return: The decoded JSON response
  • since: 12.3
  • access: public
array getPlace (string $id)
  • string $id: A place in the world. These IDs can be retrieved using getGeocode.
getSimilarPlaces (line 213)

Method to locate places near the given coordinates which are similar in name.

  • return: The decoded JSON response
  • since: 12.3
  • access: public
array getSimilarPlaces (float $lat, float $long, string $name, [string $within = null], [string $attribute = null], [string $callback = null])
  • float $lat: The latitude to search around.
  • float $long: The longitude to search around.
  • string $name: The name a place is known as.
  • string $within: This is the place_id which you would like to restrict the search results to.
  • string $attribute: This parameter searches for places which have this given street address.
  • string $callback: If supplied, the response will use the JSONP format with a callback of the given name.
search (line 120)

Method to search for places that can be attached to a statuses/update.

  • return: The decoded JSON response
  • since: 12.3
  • throws: RuntimeException
  • access: public
array search ([float $lat = null], [float $long = null], [string $query = null], [string $ip = null], [string $granularity = null], [string $accuracy = null], [integer $max_results = 0], [string $within = null], [string $attribute = null], [string $callback = null])
  • float $lat: The latitude to search around.
  • float $long: The longitude to search around.
  • string $query: Free-form text to match against while executing a geo-based query, best suited for finding nearby locations by name.
  • string $ip: An IP address.
  • string $granularity: This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country.
  • string $accuracy: A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet.
  • integer $max_results: A hint as to the number of results to return.
  • string $within: This is the place_id which you would like to restrict the search results to.
  • string $attribute: This parameter searches for places which have this given street address.
  • string $callback: If supplied, the response will use the JSONP format with a callback of the given name.

Inherited Methods

Inherited From JTwitterObject

 JTwitterObject::__construct()
 JTwitterObject::checkRateLimit()
 JTwitterObject::fetchUrl()
 JTwitterObject::getOption()
 JTwitterObject::getRateLimit()
 JTwitterObject::sendRequest()
 JTwitterObject::setOption()

Documentation generated on Tue, 19 Nov 2013 15:10:41 +0100 by phpDocumentor 1.4.3