lamernews icon indicating copy to clipboard operation
lamernews copied to clipboard

Expose users via API

Open fracek opened this issue 12 years ago • 5 comments

Expose the list of existing users at the /api/users endpoint.

It should return a json like this:

{
  "users": [
    {
      "username": "Tizio",
      "ctime": "1370468376",
      "karma": 100,
      "about": "baobab"
    },
    {
      "username": "Caio",
      "ctime": "1370468376",
      "karma": 100,
      "about": "bho"
    },
  ],
  "status": "ok",
  "count": 2
}

What do you think?

fracek avatar Jun 06 '13 18:06 fracek

This could be nice for generating statistics, is that the use case you have in mind?

I fear this could be abused though, so maybe if the feature is accepted, it should be restricted to only allow admins to access it? In this case, it could also be nice to include the number of news and comments posted for each user.

fcambus avatar Jun 20 '13 14:06 fcambus

This could be nice for generating statistics, is that the use case you have in mind?

My idea (born on http://www.hackingitalia.com/ ) was to generate a map of the users. Each user puts a code (antirez idea was to add something like geo:72.2,83.3 ) in the about field, then we parse it and generate the map.

I fear this could be abused though, so maybe if the feature is accepted, it should be restricted to only allow admins to access it?

I did include only informations that are already public for this reason.

fracek avatar Jun 20 '13 17:06 fracek

So, I think this should be implemented, as there is already two use case for this :

  • Generating map of users for Hacking Italia
  • General purpose statistics (and for this purpose, we should also add the number of news and comments posted for each user)

In any case, we can add config file options to enable / disable the feature, and make it public / restrict it to admins only.

fcambus avatar Jun 26 '13 12:06 fcambus

  • 1

Additionally, an admin UI for sorting users on email, karma, etc. might be nice. This could maybe done with Backbone.js similarly to https://github.com/documentcloud/documentcloud/blob/master/public/javascripts/model/accounts.js

mulderp avatar Aug 10 '13 16:08 mulderp

also, would be nice in client application [edit] along with /user/:username [/edit]

lplume avatar Jan 19 '15 22:01 lplume