Comments (6)
@RitikJaiswal75 @apurvkhare @prakashchoudhary07 @sahsisunny @DashDeipayan @heyrandhir Please share your thoughts on this.
from website-api-contracts.
APIs Should represent the resource they are accessing I think it should just be
POST
as PATCH
here is used for a singular update, but the functionality of the API is to update multiple users
I would prefer the API name to be POST
on `/users'
any action that it performs can go into the request body
something like
{
action: "archive"
on: "in_discord"
}
from website-api-contracts.
APIs Should represent the resource they are accessing I think it should just be
POST
asPATCH
here is used for a singular update, but the functionality of the API is to update multiple usersI would prefer the API name to be
POST
on `/users' any action that it performs can go into the request body something like{ action: "archive" on: "in_discord" }
There exists another API on the same endpoint /users
. This API marks users unverified. If we go with this approach again we have to update the previously implemented API definition as well.
@prakashchoudhary07 @heyrandhir @apurvkhare What's you thoughts on this?
from website-api-contracts.
APIs Should represent the resource they are accessing I think it should just be
POST
asPATCH
here is used for a singular update, but the functionality of the API is to update multiple usersI would prefer the API name to be
POST
on `/users' any action that it performs can go into the request body something like{ action: "archive" on: "in_discord" }
Also, I don't understand why we used POST here. POST is supposed to be used when we are creating new resources. But, here we are just updating the existing archived
property on the user's resources. Can you please explain?
from website-api-contracts.
There exists another API on the same endpoint
/users
. This API marks users unverified. If we go with this approach again we have to update the previously implemented API definition as well.
I think we would need to update the previous api then. Based on request body it should perform the unverified action. while as @RitikJaiswal75 suggested based on specific key such as
{
action: "archive"
on: "in_discord"
}
you can perform your action and similarly assign some other key for unverified action.
from website-api-contracts.
Based on this Discussion:
- For archive users not in discord API
POST /users
Request Body
{
"action": "archive",
"on": "in_discord"
}
- For marking users unverified in discord API
POST /users
Request Body
{
"action": "unverified",
"on": "discord_unlinked"
}
from website-api-contracts.
Related Issues (20)
- Create API contract for Discord Bot API
- API contract for Task Requests
- [Live-Site] API contracts for Events model
- Change the route in API contracts.
- API contract for syncing Discord users with RDS-backend
- Update users API contract
- update the Users API contract
- create an API contract for user migrations adding colors field to al users
- [RFC] Modify API contract and route GET /users/isUsernameAvailable/:username HOT 5
- Update User API contract
- [Live-Site] Update API contracts for Events model
- [Live-Site] API contracts for questions and answers in feature
- Update the API Constracts of Extension Request for all methods
- Update task object with createdAt and updatedAt
- Add missing query details for GET /tasks
- Add API Contacts for /requests API
- Validate the api contract against actual routes available in backend
- Update the route `/users/userId/:userId` in the `/users` API Contract HOT 1
- Update the API contract for GET users/status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website-api-contracts.