Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Get All Articles Endpoint #29

Closed
LamboCreeper opened this issue May 30, 2022 · 0 comments · Fixed by #38
Closed

Get All Articles Endpoint #29

LamboCreeper opened this issue May 30, 2022 · 0 comments · Fixed by #38
Assignees
Labels
accepted The issue is accepted and PRs are welcome enhancement New feature or request
Milestone

Comments

@LamboCreeper
Copy link
Member

LamboCreeper commented May 30, 2022

Requires #27

What Functionality Are You Suggesting?

The ability to get all articles from the database via the API.

API Endpoint

GET /article

Query Parameter Description
?userId= The ID of the author of all the articles you want to retrieve
?status= The status of the articles you want to retrieve

Users are not required to be authenticated to access this endpoint. However, they may only retrieve articles where status is APPROVED unless they are the author of the article which is being requested.

Response Body

[
    {
        id: number;
        created: string; // simplified extended ISO formatted date
        modified: string; // simplified extended ISO formatted date
        title: string;
        description: string;
        content: string;
        status: ArticleStatus; // APPROVED, PENDING, REJECTED
        user: {
            id: number;
            username: string;
            created: string; // simplified extended ISO formatted date
            modified: string; // simplified extended ISO formatted date 
        }
    },
    ...
]

Why Will This Benefit The Community?

This functionality will allow us to display articles on the web and in Discord.

@LamboCreeper LamboCreeper added accepted The issue is accepted and PRs are welcome enhancement New feature or request labels May 30, 2022
@LamboCreeper LamboCreeper added this to the Articles milestone May 30, 2022
@LamboCreeper LamboCreeper self-assigned this Jul 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted The issue is accepted and PRs are welcome enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant