Places
Get place information
Http request with GET method:
http://iwannagothere.com/api/places/{geoname_id}
Parameters:
- key: User API key
- geoname_id: Geoname id of the place
Example response:
<place> <country-id type="integer">206</country-id> <created-at type="datetime">2009-04-18T10:10:08+02:00</created-at> <delta type="boolean">true</delta> <geoname-id type="integer">3117735</geoname-id> <hierarchy nil="true"></hierarchy> <id type="integer">2</id> <items-count type="integer">5</items-count> <lat>40.4165020941502</lat> <long>-3.70256423950195</long> <map-id type="integer">2</map-id> <name>Madrid</name> <nicename>madrid</nicename> <updated-at type="datetime">2009-07-17T15:28:09+02:00</updated-at> <long_guid>http://iwannagothere.com/travel-guides/valencia</long_guid> </place>
Error codes:
- 401: API Key not valid
- 404: Place not found
Get photos of a place
Http request with GET method:
http://iwannagothere.com/api/places/{geoname_id}/get_photos
Parameters:
- key: User API key
- geoname_id: Geoname id of the place
- size: Size of the photos (default 'square')
- limit: Limit number of photos. Default to 10
Available sizes:
- thumb: '120x120'
- square: '75x75'
- small: '100x100'
- home: '252x132'
- square_mini: '48x48'
- big: '500x500'
Example response:
<pictures>
<picture>
<content_type>image/jpg</content_type>
<width>500</width>
<height>375</height>
<url>http://a3.iwannagothere.com/userfiles/pictures/[...]_square.jpeg</url>
</picture>
<picture>
<content_type>image/jpg</content_type>
<width>500</width>
<height>375</height>
<url>http://a3.iwannagothere.com/userfiles/pictures/[...]_square.jpeg</url>
</picture>
<picture>
<url>http://a3.iwannagothere.com/userfiles/pictures/[...]_square.jpeg</url>
</picture>
<picture>
<content_type>image/jpeg</content_type>
<width>640</width>
<height>480</height>
<url>http://a3.iwannagothere.com/userfiles/pictures/[...]_square.jpeg</url>
</picture>
</pictures>
Error codes:
- 401: API Key not valid
- 404: Place not found
Get guides from a place
Http request with GET method:
http://iwannagothere.com/api/places/{geoname_id}/get_routes
Parameters:
- key: User API key
- geoname_id: Geoname id of the place
- limit: Limit number of guides. Default to 10
Example response:
<itemroutes type="array">
<itemroute>
<created-at type="datetime">2008-06-02T10:02:54+02:00</created-at>
<description nil="true"></description>
<id type="integer">25</id>
<items-count type="integer">1</items-count>
<name>Veranico</name>
<nicename>veranico</nicename>
<updated-at type="datetime">2008-07-06T13:48:26+02:00</updated-at>
<user-id type="integer">30</user-id>
<long_guid>http://iwannagothere.com/users/bomberstudios/routes/[...]</long_guid>
</itemroute>
<itemroute>
<created-at type="datetime">2008-12-20T18:28:18+01:00</created-at>
<description nil="true"></description>
<id type="integer">136</id>
<items-count type="integer">3</items-count>
<name>7</name>
<nicename>7</nicename>
<updated-at type="datetime">2008-12-20T18:30:30+01:00</updated-at>
<user-id type="integer">608</user-id>
<long_guid>http://iwannagothere.com/users/bomberstudios/routes/[...]</long_guid>
</itemroute>
<itemroute>
<created-at type="datetime">2008-06-11T22:20:22+02:00</created-at>
<description nil="true"></description>
<id type="integer">51</id>
<items-count type="integer">2</items-count>
<name>Comic route in Madrid</name>
<nicename>comic-route-in-madrid</nicename>
<updated-at type="datetime">2008-07-06T13:48:26+02:00</updated-at>
<user-id type="integer">77</user-id>
<long_guid>http://iwannagothere.com/users/bomberstudios/routes/[...]</long_guid>
</itemroute>
<itemroute>
<created-at type="datetime">2009-02-28T04:32:08+01:00</created-at>
<description nil="true"></description>
<id type="integer">160</id>
<items-count type="integer">2</items-count>
<name>My preferred restaurants in Madrid</name>
<nicename>my-preferred-restaurants-in-madrid</nicename>
<updated-at type="datetime">2009-02-28T04:40:19+01:00</updated-at>
<user-id type="integer">468</user-id>
<long_guid>http://iwannagothere.com/users/bomberstudios/routes/[...]</long_guid>
</itemroute>
<itemroute>
<created-at type="datetime">2008-06-24T20:22:33+02:00</created-at>
<description nil="true"></description>
<id type="integer">72</id>
<items-count type="integer">1</items-count>
<name>Madrid</name>
<nicename>madrid</nicename>
<updated-at type="datetime">2009-03-03T14:55:15+01:00</updated-at>
<user-id type="integer">343</user-id>
<long_guid>http://iwannagothere.com/users/bomberstudios/routes/[...]</long_guid>
</itemroute>
</itemroutes>
Error codes:
- 401: API Key not valid
- 404: Place not found