falling-fruit / falling-fruit-web

Mobile-friendly website for Falling Fruit
https://beta.fallingfruit.org
GNU General Public License v3.0
33 stars 15 forks source link

Idea: allow viewing all locations added by one source #424

Open wbazant opened 2 months ago

wbazant commented 2 months ago

Totally an idea for later but it would be fun to build out this aspect of the site one day. In the same bucket:

Motivation: I was testing clusters and found lots of locations in Johannesburg, then saw they were all added by one user Space_Ferret. Then I started wondering about what else this person added and so on. Being able to see this would add a new dimension to the site, since there would be somewhere to go after the 'location' is viewed.

ezwelty commented 4 days ago

Some version of user profiles is a must in the long term, but it brings up some privacy issues which we'll need to be careful about.

allow viewing a user's 'About you' when they joined

This is already supported by the API's GET /users/{id} (https://petstore.swagger.io/?url=https://fallingfruit.org/api/0.3/openapi.yml#/Users/get_users__id_) Access is blocked if the user is anonymous (their username is currently null).

some stats about a user: how many locations they added, last activity

Simple summary stats could easily be added to the above GET /users/{id}. Hard part is to decide what they should be.

allow viewing all locations added by the user | how many locations they added, last activity

This is sort of supported. GET /locations/changes can return results filtered by user_id (if user is not anonymous). The returned location ids could be used to call GET /locations with the ids param. Alternatively, I could add a user_id param to GET /locations, but that endpoint is already getting pretty crowded...

allow viewing all locations added in the same import

Noted. An import_id param could be added to GET /locations, or I could add a GET /imports/{id}/locations which returns location ids?