Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZotMeet Getting Started + API Specification #13

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
3 changes: 3 additions & 0 deletions pages/zotmeet/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
},
"getting-started": {
"title": "Getting Started"
},
"api": {
"title": "ZotMeet API"
}
}
14 changes: 14 additions & 0 deletions pages/zotmeet/api/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"index": {
"title": "Overview"
},
"user": {
"title": "User"
},
"meeting": {
"title": "Meeting"
},
"group": {
"title": "Group"
}
}
312 changes: 312 additions & 0 deletions pages/zotmeet/api/group.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +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>
56 changes: 56 additions & 0 deletions pages/zotmeet/api/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# API List

Attached is a list of all API Routes for ZotMeet. Subject to Change.

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

- [ ] `POST /users` `Create User`

- [ ] `GET /users/{id}` `Get User`

- [ ] `PUT /users/{id}` `Update User`

- [ ] `DELETE /users/{id}` `Delete User`

- [ ] `GET /users/{id}/groups` `Get User's Groups`

- [ ] `GET /users/{id}/meetings` `Get User's Meetings
`

- [ ] `GET /users/{id}/availabilities` `Get User's Availabilities`

- [ ] `POST /users/{id}/availabilities` `Add User's Availabilities`

- [ ] `GET /users/{id}/availabilities/{meeting_id}` `Get User's Availabilities for Meeting`

- [ ] `PUT /users/{id}/availabilities/{meeting_id}` `Update User's Availabilities for Meeting`

- [ ] `DELETE /users/{id}/availabilities/{meeting_id}` `Deletes User's Availabilities for Meeting`

- [ ] `GET /meetings` `Get Multiple Meetings`

- [ ] `GET /meetings/{id}` `Get Meeting`

- [ ] `GET /meetings/{id}/users` `Get Meeting's Users`

- [ ] `GET /meetings/{id}/shared-availability` `Get Meeting's Shared Availability`

- [ ] `POST /meetings` `Create Meeting`

- [ ] `PUT /meetings/{id}` `Update meeting`

- [ ] `DELETE /meetings/{id}` `Delete Meeting`

- [ ] `GET /groups` `Get Multiple Groups`

- [ ] `POST /groups` `Create Group`

- [ ] `GET /groups/{id}` `Get Group`

- [ ] `PUT /groups/{id}` `Update Group`

- [ ] `DELETE /groups/{id}` `Delete Group`

- [ ] `GET /groups/{id}/meetings` `Get Group's Meetings`

- [ ] `GET /groups/{id}/users` `Get Group's Users`
Loading
Loading