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

Endpoint: List Articles #13

Open
mgroves opened this issue Jun 28, 2023 · 2 comments
Open

Endpoint: List Articles #13

mgroves opened this issue Jun 28, 2023 · 2 comments

Comments

@mgroves
Copy link
Owner

mgroves commented Jun 28, 2023

GET /api/articles

Returns most recent articles globally by default, provide tag, author or favorited query parameter to filter results

Query Parameters:

Filter by tag:

?tag=AngularJS

Filter by author:

?author=jake

Favorited by user:

?favorited=jake

Limit number of articles (default is 20):

?limit=20

Offset/skip number of articles (default is 0):

?offset=0

Authentication optional, will return multiple articles, ordered by most recent first

@mgroves
Copy link
Owner Author

mgroves commented Sep 12, 2023

Probably need to put a reasonable limit on limit max size, like maybe 100?

@mgroves
Copy link
Owner Author

mgroves commented Sep 12, 2023

Two possible methods:

  1. Pure SQL++: SQL query to return article info, author info, favorites, and following info
  2. SQL++ to get article IDs that match criteria, ArticleKeys ONLY, then fetch article info+author+favorites+following with existing data services

Another factor to consider: Caching! Cache results into their own document, to improve performance and reduce strain on query service? Make that a separate ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant