Skip to content

Commit

Permalink
feat: ✨ added groups spec for API
Browse files Browse the repository at this point in the history
Signed-off-by: Adithya Anandsaikrishnan <[email protected]>
  • Loading branch information
adi-lux committed Mar 13, 2024
1 parent 9403171 commit ba3222d
Show file tree
Hide file tree
Showing 4 changed files with 314 additions and 3 deletions.
311 changes: 311 additions & 0 deletions pages/zotmeet/api/group.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,312 @@
import { Tabs } from "nextra/components";

# Group API Specification

### Get Multiple Groups

<details>
<summary>
`GET`
`/groups`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | id | string | optional |
> | name | string | optional |
> | created_at | Date | optional |
##### Response
<Tabs items={["200", "400"]}>
<Tabs.Tab>
```json copy
{
"groups": [
{
"id": "string",
"name": "string",
"description": "string",
"created_at": "Date"
}
]
}

```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>

### Get Group

<details>
<summary>
`GET`
`/groups`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | id | string | optional |
> | name | string | optional |
> | created_at | Date | optional |
##### Response
<Tabs items={["200", "400"]}>
<Tabs.Tab>
```json copy
{
"groups": [
{
"id": "string",
"name": "string",
"description": "string",
"created_at": "Date"
}
]
}

```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>

### Get Group's Meetings

<details>
<summary>
`GET`
`/groups/{id}/meetings`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | id | string | required |
##### Response
<Tabs items={["200", "400"]}>
<Tabs.Tab>
```json copy
{
"meetings": [
{
"id": "string",
"title": "string",
"dates": ["Date"],
"description": "string",
"location": "string",
"from_time": "string",
"to_time": "string",
"host": {
"id": "string",
"username": "string",
"email": "string",
"created_at": "Date"
}
}
]
}

```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>

### Get Group's Users

<details>
<summary>
`GET`
`/groups/{id}/users`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | id | string | required |
##### Response
<Tabs items={["200", "400"]}>
<Tabs.Tab>
```json copy
{
"users": [
{
"id": "string",
"username": "string",
"email": "string",
"created_at": "Date"
}
]
}
```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>

### Create Group

<details>
<summary>
`POST`
`/groups/{id}`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | name | string | required |
> | description | Date | optional |
##### Response
<Tabs items={["201", "400"]}>
<Tabs.Tab>
```json copy
{
"group": {
"id": "string",
"name": "string",
"description": "string",
"created_at": "Date"
}
}
```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>

### Update Group

<details>
<summary>
`PUT`
`/groups/{id}`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | id | string | required |
> | name | string | optional
> | description | string | optional
> | created_at | Date | optional |
##### Response
<Tabs items={["200", "400"]}>
<Tabs.Tab>
```text copy
Group Information Successfully Modified
```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>

### Delete Group

<details>
<summary>
`DELETE`
`/groups/{id}`
</summary>

##### Request

> | name | type | description
> |------------|-------------------------|------|
> | id | string | required |

##### Response
<Tabs items={["200", "400"]}>
<Tabs.Tab>
```text copy
Group Information Successfully Deleted
```
</Tabs.Tab>
<Tabs.Tab>
```json copy
{
"error": {
"status": "number",
"message": "string"
}
}
```
</Tabs.Tab>
</Tabs>

</details>
4 changes: 2 additions & 2 deletions pages/zotmeet/api/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# s to Write:
# API List

APIs marked with an X are completed
Attached is a list of all API Routes for ZotMeet. Subject to Change.

- [ ] `GET /users` `Get Multiple Users`

Expand Down
1 change: 0 additions & 1 deletion pages/zotmeet/api/meeting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { Tabs } from "nextra/components";
> | id | string | optional |
> | title | string | optional |
> | dates | Date[] | optional |
> | description | string | optional |
> | location | string | optional |
> | from_time | string | optional |
> | to_time | string | optional |
Expand Down
1 change: 1 addition & 0 deletions pages/zotmeet/api/user.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { Tabs } from "nextra/components";
</Tabs>

</details>

### Get User

<details>
Expand Down

0 comments on commit ba3222d

Please sign in to comment.