Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: User Profile API endpoint #457

Closed
fkulla opened this issue Apr 26, 2023 · 1 comment · Fixed by #541
Closed

feat: User Profile API endpoint #457

fkulla opened this issue Apr 26, 2023 · 1 comment · Fixed by #541
Labels
enhancement New feature or request

Comments

@fkulla
Copy link
Contributor

fkulla commented Apr 26, 2023

What

I propose adding a new API endpoint GET /api/user/profile that responds with information about the authorized user's preferences/capabilities in the following format:

{
  "theme": "auto",
  "bookmark_date_display": "relative",
  "bookmark_link_target": "_blank",
  "web_archive_integration": "Disabled",
  "enable_sharing": false,
  "enable_favicons": false
}

This mirrors the internal model of the UserProfile, but I think it would be better to return the web_archive_integration state as a boolean for convenience. Maybe it could be renamed to enable_web_archive_integration?

Why

To allow API clients to query user capabilities. It's a prerequisite for changes needed at sissbruecker/linkding-extension#27.

@fkulla
Copy link
Contributor Author

fkulla commented Apr 26, 2023

Would like to self-assign this issue. Not familiar with Django, but it seems like a simple addition.

@sissbruecker sissbruecker added the enhancement New feature or request label May 18, 2023
sissbruecker added a commit that referenced this issue Oct 1, 2023
* feat: Implement UserProfile serializer and add API endpoint per #457

* chore: Document API addition

* Address review comments

---------

Co-authored-by: fkulla <mail@florian.direct>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants