Skip to content
New issue

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

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

Already on GitHub? # to your account

[V2][Backend] API endpoints changes #713

Closed
geromegrignon opened this issue Aug 24, 2021 · 8 comments
Closed

[V2][Backend] API endpoints changes #713

geromegrignon opened this issue Aug 24, 2021 · 8 comments

Comments

@geromegrignon
Copy link
Contributor

geromegrignon commented Aug 24, 2021

The V2 is a great opportunity to review the specs.

Here is an RFC for URL and verbs used on the backend specs:

Login user

POST /api/users/#

Register user

POST /api/users

Get current user

GET /api/user

Proposal: change the URL to /api/users/me (consistency on users)

Update user

PUT /api/user

Proposal: change the URL to /api/users (consistency on users)

Get profile

GET /api/profiles/:username

Follow user

POST /api/profiles/:username/follow

#582 Proposal: change the verb to PUT (as it creates a relation link)

Unfollow user

DELETE /api/profiles/:username/follow

Get articles

GET /api/articles

Get feed articles

GET /api/articles/feed

#695 Proposal: change the URL to /api/feed (to avoid conflict with /api/articles/:slug with a feed param)

Get article

GET /api/articles/:slug

Create article

POST /api/articles

Update article

PUT /api/articles/:slug

Delete article

DELETE /api/articles/:slug

Add comments to an article

POST /api/articles/:slug/comments

Get comments from an article

GET /api/articles/:slug/comments

Delete Comment

DELETE /api/articles/:slug/comments/:id

Favorite article

POST /api/articles/:slug/favorite

Proposal: change the verb to PUT (as it creates a relation link)

Unfavorite article

DELETE /api/articles/:slug/favorite

Get tags

GET /api/tags

@geromegrignon geromegrignon changed the title [V2][Backend][RFC] API endpoints changes [V2][Backend] API endpoints changes Nov 6, 2021
@geromegrignon
Copy link
Contributor Author

This task is now open for contributions to the API documentation ( I'll open contributions to the API itself soon).

Based on the v2 branch of this repository, changes have to be made upon the OpenAPI file.

You can preview changes by importing the yml file in Swagger Editor.

@conradylx
Copy link

Is this task still available?

@geromegrignon
Copy link
Contributor Author

Is this task still available?

Hello, sorry for the delay.
Yes, it's still available (please note proposals related to 582 and 695 are already done on the v2 branch).

@Vikrant-Khedkar
Copy link

Is it still open

@safil-badarudeen
Copy link

can i solve this issue in js or only contribute if i have knowledge of ts. If i can do it in Js , assign me. thank you

@PradeeprajDhanasekaran
Copy link

Is this still open ??

@shreycmd
Copy link

shreycmd commented Aug 8, 2024

Is it this issue resolved if not please assign it to me

@geromegrignon
Copy link
Contributor Author

Hi @shreycmd, thanks for your interest in this project.
However I'm currently closing tasks related to the v2 as that's not a sustainable solution (#693 (comment)).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

6 participants