-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: manage participant * refactor(group.go): change HTTP methods for managing group participants to use POST instead of DELETE and PATCH for better compatibility and consistency * chore: update image homepage
- Loading branch information
1 parent
5050c56
commit d62ef31
Showing
9 changed files
with
249 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: WhatsApp API MultiDevice | ||
version: 4.0.0 | ||
version: 4.1.0 | ||
description: This API is used for sending whatsapp via API | ||
servers: | ||
- url: http://localhost:3000 | ||
|
@@ -838,30 +838,104 @@ paths: | |
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
group_id: | ||
type: string | ||
example: '120363228882361111' | ||
participants: | ||
type: array | ||
items: | ||
type: string | ||
example: | ||
- '6819241294719274' | ||
- '6829241294719274' | ||
- '6839241294719274' | ||
example: | ||
- '6819241294719274' | ||
- '6829241294719274' | ||
- '6839241294719274' | ||
$ref: '#/components/schemas/ManageParticipantRequest' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ManageParticipantResponse' | ||
'400': | ||
description: Bad Request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorBadRequest' | ||
'500': | ||
description: Internal Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorInternalServer' | ||
/group/participants/remove: | ||
post: | ||
operationId: removeParticipantFromGroup | ||
tags: | ||
- group | ||
summary: Remove participants from group | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ManageParticipantRequest' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ManageParticipantResponse' | ||
'400': | ||
description: Bad Request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorBadRequest' | ||
'500': | ||
description: Internal Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorInternalServer' | ||
/group/participants/promote: | ||
post: | ||
operationId: promoteParticipantToAdmin | ||
tags: | ||
- group | ||
summary: Promote participants to admin | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ManageParticipantRequest' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/AddParticipantToGroupResponse' | ||
$ref: '#/components/schemas/ManageParticipantResponse' | ||
'400': | ||
description: Bad Request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorBadRequest' | ||
'500': | ||
description: Internal Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorInternalServer' | ||
/group/participants/demote: | ||
post: | ||
operationId: demoteParticipantToMember | ||
tags: | ||
- group | ||
summary: Demote participants to member | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ManageParticipantRequest' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ManageParticipantResponse' | ||
'400': | ||
description: Bad Request | ||
content: | ||
|
@@ -960,7 +1034,21 @@ components: | |
group_id: | ||
type: string | ||
example: [email protected] | ||
AddParticipantToGroupResponse: | ||
ManageParticipantRequest: | ||
type: object | ||
properties: | ||
group_id: | ||
type: string | ||
example: [email protected] | ||
participants: | ||
type: array | ||
items: | ||
type: string | ||
example: | ||
- '6819241294719274' | ||
- '6829241294719274' | ||
- '6839241294719274' | ||
ManageParticipantResponse: | ||
type: object | ||
properties: | ||
code: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.