View source: R/osm_get_user_details.R
| osm_get_user_details | R Documentation |
Details of users
osm_get_user_details(user_id, format = c("R", "xml", "json"))
user_id |
The ids of the users to retrieve the details for, represented by a numeric or a character value (not the display names). |
format |
Format of the output. Can be |
For users not found, the result is empty. If format = "R", returns a data frame with one user per row.
format = "xml"Returns a xml2::xml_document with the following format:
<osm version="0.6" generator="OpenStreetMap server">
<user id="12023" display_name="jbpbis" account_created="2007-08-16T01:35:56Z">
<description></description>
<company>bitbetter GmbH</company>
<social-links>
<link platform="mastodon">https://mastodon.social/@jbpbis</link>
</social-links>
<contributor-terms agreed="false"/>
<img href="http://www.gravatar.com/avatar/somehash"/>
<roles>
</roles>
<changesets count="1"/>
<traces count="0"/>
<blocks>
<received count="0" active="0"/>
</blocks>
</user>
<user id="210447" display_name="siebh" account_created="2009-12-20T10:11:42Z">
<description></description>
<contributor-terms agreed="true"/>
<roles>
</roles>
<changesets count="267"/>
<traces count="1"/>
<blocks>
<received count="0" active="0"/>
</blocks>
</user>
</osm>
format = "json"Returns a list with the following json structure:
{
"version": "0.6",
"generator": "OpenStreetMap server",
"users": [
{
"user": {
"id": 12023,
"display_name": "jbpbis",
"account_created": "2007-08-16T01:35:56Z",
"description": "",
"company": "MyCompany Ltd.",
"social_links": [
{
"url": "https://mastodon.social/@jbpbis",
"platform": "mastodon"
}
],
"contributor_terms": {
"agreed": False
},
"img": {
"href": "https://www.gravatar.com/avatar/somehash"
},
"roles": [],
"changesets": {
"count": 1
},
"traces": {
"count": 0
},
"blocks": {
"received": {
"count": 0,
"active": 0
}
}
}
},
{
"user": {
"id": 210447,
"display_name": "siebh",
"account_created": "2009-12-20T10:11:42Z",
"description": "",
"contributor_terms": {
"agreed": True
},
"roles": [],
"changesets": {
"count": 363
},
"traces": {
"count": 1
},
"blocks": {
"received": {
"count": 0,
"active": 0
}
}
}
}
]
}
For single user calls, the users level gets dropped.
Other users' functions:
osm_details_logged_user(),
osm_get_preferences_user()
usrs <- osm_get_user_details(user_id = c(1, 24, 44, 45, 46, 48, 49, 50))
usrs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.