quetz icon indicating copy to clipboard operation
quetz copied to clipboard

Suggested API changes for frontend

Open seadeep42 opened this issue 4 years ago • 5 comments

  • [x] User channels: API to list channels a user is part of. Needed for profile section channels tab #300
  • [x] User packages: Similar to above. API to list packages a user is part of. #301
  • [x] /api/channels/{channel_name}/packages/{package_name}: Need more info (Summary, description, URLs, platforms, current version) #299
  • [ ] API for package logs and files
  • [x] /api/channels Need count of members and packages in the response #302

seadeep42 avatar Jan 11 '21 11:01 seadeep42

sounds doable ;-)

User channels: API to list channels a user is part of. Needed for profile section channels tab User packages: Similar to above. API to list packages a user is part of.

do you need to have the list of channels/packages in the /user/me response or as a separate endpoint?

/api/channels/{channel_name}/packages/{package_name}: Need more info (Summary, description, URLs, platforms, current version)

ok

API for package logs and files

I don't think that we keep logs for packages. What kind of logs do you think of? For files, you can get the filenames of all archives in /api/channels/{channel_name}/packages/{package_name}/versions, but we don't keep the archive content in the database. If this is something, you would like to have, it would need specific implementation.

/api/channels Need count of members and packages in the response

ok

btel avatar Jan 11 '21 12:01 btel

I think logs and files can wait, we will just not have those two tabs in the first release of the new frontend and will add that once we have the database ready.

wolfv avatar Jan 11 '21 12:01 wolfv

do you need to have the list of channels/packages in the /user/me response or as a separate endpoint?

I think either would do. I don't see a clear advantage of one over the other at the moment

seadeep42 avatar Jan 11 '21 12:01 seadeep42

do you need to have the list of channels/packages in the /user/me response or as a separate endpoint?

I think either would do. I don't see a clear advantage of one over the other at the moment

one advantage of having everything on the same endpoint, is that we need to make one request instead of 3 to get user detail, package and channel list

on the other hand there is more data to transfer, so if the channels/packages are not used often, it is a waste of bandwith

also for list of packages, we might need to paginate them or just expose 10 most recent or similar

what do you think? @chaitanya-deep @wolfv

btel avatar Jan 11 '21 16:01 btel

They are currently in three different pages but the design might change in the future. And so far there is no analytics on how often people visit each page. Might be better to have three different endpoints. That way I can implement the frontend with pagination.

seadeep42 avatar Jan 12 '21 03:01 seadeep42