Class JTwitterPlaces
Twitter API Places & Geo class for the Joomla Platform.
-
JTwitterObject
-
JTwitterPlaces
Methods summary
public
array
|
#
getPlace( string $id )
Method to get all the information about a known place.
Method to get all the information about a known place.
Parameters
- $id
string - $id A place in the world. These IDs can be retrieved using getGeocode.
Returns
array - The decoded JSON response
Since
12.3
|
public
array
|
#
getGeocode( float $lat, float $long, string $accuracy = null, string $granularity = null, integer $max_results = 0, string $callback = null )
Method to get up to 20 places that can be used as a place_id when updating a
status.
Method to get up to 20 places that can be used as a place_id when updating a
status.
Parameters
- $lat
float - $lat The latitude to search around.
- $long
float - $long The longitude to search around.
- $accuracy
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.
- $granularity
string - $granularity This is the minimal granularity of place types to return and must
be one of: poi, neighborhood, city, admin or country.
- $max_results
integer - $max_results A hint as to the number of results to return.
- $callback
string - $callback If supplied, the response will use the JSONP format with a callback of
the given name.
Returns
array - The decoded JSON response
Since
12.3
|
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 )
Method to search for places that can be attached to a statuses/update.
Method to search for places that can be attached to a statuses/update.
Parameters
- $lat
float - $lat The latitude to search around.
- $long
float - $long The longitude to search around.
- $query
string - $query Free-form text to match against while executing a geo-based query, best
suited for finding nearby locations by name.
- $ip
string - $ip An IP address.
- $granularity
string - $granularity This is the minimal granularity of place types to return and must
be one of: poi, neighborhood, city, admin or country.
- $accuracy
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.
- $max_results
integer - $max_results A hint as to the number of results to return.
- $within
string - $within This is the place_id which you would like to restrict the search results
to.
- $attribute
string - $attribute This parameter searches for places which have this given street
address.
- $callback
string - $callback If supplied, the response will use the JSONP format with a callback of
the given name.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
getSimilarPlaces( float $lat, float $long, string $name, string $within = null, string $attribute = null, string $callback = null )
Method to locate places near the given coordinates which are similar in
name.
Method to locate places near the given coordinates which are similar in
name.
Parameters
- $lat
float - $lat The latitude to search around.
- $long
float - $long The longitude to search around.
- $name
string - $name The name a place is known as.
- $within
string - $within This is the place_id which you would like to restrict the search results
to.
- $attribute
string - $attribute This parameter searches for places which have this given street
address.
- $callback
string - $callback If supplied, the response will use the JSONP format with a callback of
the given name.
Returns
array - The decoded JSON response
Since
12.3
|
public
array
|
#
createPlace( float $lat, float $long, string $name, string $geo_token, string $within, string $attribute = null, string $callback = null )
Method to create a new place object at the given latitude and longitude.
Method to create a new place object at the given latitude and longitude.
Parameters
- $lat
float - $lat The latitude to search around.
- $long
float - $long The longitude to search around.
- $name
string - $name The name a place is known as.
- $geo_token
string - $geo_token The token found in the response from geo/similar_places.
- $within
string - $within This is the place_id which you would like to restrict the search results
to.
- $attribute
string - $attribute This parameter searches for places which have this given street
address.
- $callback
string - $callback If supplied, the response will use the JSONP format with a callback of
the given name.
Returns
array - The decoded JSON response
Since
12.3
|
__construct()
,
checkRateLimit()
,
fetchUrl()
,
getOption()
,
getRateLimit()
,
sendRequest()
,
setOption()
Magic methods summary
Properties summary
$client
,
$oauth
,
$options