-
Notifications
You must be signed in to change notification settings - Fork 0
Post related endpoints
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
POST /api/v1/users/{userid}/posts
Expected Parameters:
- Title
- Description
- Content
Returns:
- ID
GET /api/v1/posts/today
Returns an array of:
- PostID
- OwnerID
- Title
- Description
- Content
- CreationDate
- Likes
GET /api/v1/posts/week
Returns an array of:
- PostID
- OwnerID
- Title
- Description
- Content
- CreationDate
- Likes
GET /api/v1/posts/month
Returns an array of:
- PostID
- OwnerID
- Title
- Description
- Content
- CreationDate
- Likes
GET /api/v1/posts/alltime
Returns an array of:
- PostID
- OwnerID
- Title
- Description
- Content
- CreationDate
- Likes
GET /api/v1/posts/{postid}
Returns:
- PostID
- OwnerID
- Title
- Description
- Content
- CreationDate
- Likes
GET /api/v1/users/{userid}/posts
Returns an array of:
- PostID
- OwnerID
- Title
- Description
- Content
- CreationDate
- Likes
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
PUT /api/v1/users/{userid}/posts/{postid}/title
Expected parameters:
- Title
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
PUT /api/v1/users/{userid}/posts/{postid}/description
Expected parameters:
- Description
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
PUT /api/v1/users/{userid}/posts/{postid}/content
Expected parameters:
- Content
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
DELETE /api/v1/users/{userid}/posts/{postid}
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
POST /api/v1/users/{userid}/posts/{postid}/likes
Requires Authorization Bearer header with a valid JWT token corresponding to the userid.
DELETE /api/v1/users/{userid}/posts/{postid}/likes