Skip to content

Favorites route should (optionally?) return fav_key #125

@ghost

Description

Basic idea:
The current favorites route, with ?full=1, returns the fav_id for each submission listed.

It should also (optionally?) return the fav_key for each submission.

Use case:
A FAExport user who wants to work with their own favorites can make one request to the favorites route, and get both fav_id and fav_key for many of their favorites at once. They can then use those values to modify their favorites as desired.

As it currently stands, the FAExport user can make a single request to the favorites route to get a list of several favorites, but then has to make several requests to the submission route to get the fav_key for each submission, so they can then work with their favorites.

Notes:
This will probably require the FAExport user to provide valid FA login cookies to the favorites route.

Looking at FA's HTML, the fav_key is apparently only available on the individual submission pages for a logged-in user, and not available on that user's "list of favorites" page.

Because of that, this change would require FAExport to iterate over all the favorites to get the fav_key for each one. The "list of favorites" page can probably have many (24, 48, or 72) entries. This might delay the response somewhat, while FAExport iterates over all of those submissions.

Maybe not all FAExport users would be interested in this, so perhaps this behavior is optional - like a ?get_favkey=1 argument to the favorites route. Or perhaps there's a new route, called something like favorites_detailed or similar, that requires FA login cookies and always returns the fav_key entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions