[openstreetmap-website] Add a /api/0.6/user/NNNN API call (#99)
Tom Hughes
notifications at github.com
Wed Sep 19 19:37:04 BST 2012
This branch adds the `/api/0.6/user/NNNN` API call for requesting public information on a specified user in machine readable form. It is based on the existing `/api/0.6/user/details` call with some extra details added. Example output as follows:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server">
<user id="1" display_name="TomH" account_created="2012-09-19T18:33:34Z">
<description></description>
<contributor-terms agreed="true" pd="false"/>
<roles>
<administrator/>
</roles>
<changesets count="0"/>
<traces count="0"/>
<blocks>
<received count="0" active="0"/>
</blocks>
</user>
</osm>
```
The extra fields have also been added to the `/api/0.6/user/details` call, which also retains some extra information (home location and languages) which are hidden fro this public API call.
You can merge this Pull Request by running:
git pull https://github.com/tomhughes/openstreetmap-website userapi
Or you can view, comment on it, or merge it online at:
https://github.com/openstreetmap/openstreetmap-website/pull/99
-- Commit Summary --
* Add a /api/0.6/user/NNNN call to the API
* Add some extra information to user API responses
-- File Changes --
M app/controllers/user_controller.rb (31)
D app/views/user/api_details.builder (26)
A app/views/user/api_read.builder (43)
M config/routes.rb (4)
M db/structure.sql (28)
M test/functional/user_controller_test.rb (28)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/99.patch
https://github.com/openstreetmap/openstreetmap-website/pull/99.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/99
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20120919/09a157b7/attachment.html>
More information about the rails-dev
mailing list