Skip to content

Commit

Permalink
Add REST groups setAnnouncement docs (RocketChat#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored and sampaiodiego committed Sep 18, 2018
1 parent d1bc6b6 commit b835760
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
- removeOwner
- rename
- roles
- setAnnouncement
- setCustomFields
- setDescription
- setPurpose
Expand Down
1 change: 1 addition & 0 deletions contributing/documentation/documentation-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ Here you can also find what articles are incomplete and missing.
- removeOwner
- rename
- roles
- setAnnouncement
- setCustomFields
- setDescription
- setPurpose
Expand Down
1 change: 1 addition & 0 deletions developer-guides/rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
| `/api/v1/groups.open` | Adds the private group back to the list of groups. | [Link](groups/open/) |
| `/api/v1/groups.rename` | Changes the name of the private group. | [Link](groups/rename/) |
| `/api/v1/groups.roles` | Gets the user's roles in the private group. | [Link](groups/roles/) |
| `/api/v1/groups.setAnnouncement` | Sets a group's announcement. | [Link](groups/setannouncement/)|
| `/api/v1/groups.setCustomFields` | Sets private group's custom fields. | [Link](groups/setcustomfields/)|
| `/api/v1/groups.setDescription` | Sets a private group's description. | [Link](groups/setdescription/) |
| `/api/v1/groups.setPurpose` | Sets a private group's description. | [Link](groups/setpurpose/) |
Expand Down
1 change: 1 addition & 0 deletions developer-guides/rest-api/groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
| `/api/v1/groups.removeOwner` | Removes the role of owner from a user in a group. | [Link](removeowner/) |
| `/api/v1/groups.rename` | Changes the name of the private group. | [Link](rename/) |
| `/api/v1/groups.roles` | Gets the user's roles in the private group. | [Link](roles/) |
| `/api/v1/groups.setAnnouncement` | Sets a group's announcement. | [Link](setannouncement/)|
| `/api/v1/groups.setCustomFields` | Sets private group's custom fields. | [Link](setcustomfields/) |
| `/api/v1/groups.setDescription` | Sets a private group's description. | [Link](setdescription/) |
| `/api/v1/groups.setPurpose` | Sets a private group's description. | [Link](setpurpose/) |
Expand Down
39 changes: 39 additions & 0 deletions developer-guides/rest-api/groups/setannouncement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Group Set Announcement

Sets the announcement for the group.

| URL | Requires Auth | HTTP Method |
| :--- | :--- | :--- |
| `/api/v1/groups.setAnnouncement` | `yes` | `POST` |

## Payload

| Argument | Example | Required | Announcement |
| :--- | :--- | :--- | :--- |
| `roomId` | `ByehQjC44FwMeiLbX` | Required | The group's id |
| `announcement` | `Test out everything.` | Required | The announcement to set for the group. |

## Example Call

```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type: application/json" \
http://localhost:3000/api/v1/groups.setAnnouncement \
-d '{ "roomId": "ByehQjC44FwMeiLbX", "announcement": "Test out everything" }'
```

## Example Result

```json
{
"announcement": "Test out everything.",
"success": true
}
```

## Change Log

| Version | Description |
| :--- | :--- |
| 0.70.0 | Added |

0 comments on commit b835760

Please sign in to comment.