diff --git a/server/.gitignore b/server/.gitignore index 3224a90..7f08afc 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -141,4 +141,6 @@ dist # SvelteKit build / generate output .svelte-kit -# End of https://www.toptal.com/developers/gitignore/api/node \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/node + +docs/index.html \ No newline at end of file diff --git a/server/docs/index.html b/server/docs/index.html deleted file mode 100644 index 301367d..0000000 --- a/server/docs/index.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - ACM Website API - - - - - - - - - -

ACM Website API (1.0.0)

Download OpenAPI specification:Download

API for managing ACM website resources including users, events, projects, and more.

-

users

Operations about users

-

Admin List all users

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get current user

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "major": "string",
  • "grad_date": "2019-08-24",
  • "interests": [
    ],
  • "profile_pic": "string"
}

Update current user

Request Body schema: application/json
required
id
integer
name
string
email
string
major
string
grad_date
string <date>
interests
Array of strings
Items Enum: "web_development" "machine_learning" "cloud_computing" "artificial_intelligence"
profile_pic
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "major": "string",
  • "grad_date": "2019-08-24",
  • "interests": [
    ],
  • "profile_pic": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "major": "string",
  • "grad_date": "2019-08-24",
  • "interests": [
    ],
  • "profile_pic": "string"
}

Admin Get a user by ID

path Parameters
userId
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "major": "string",
  • "grad_date": "2019-08-24",
  • "interests": [
    ],
  • "profile_pic": "string"
}

Admin Update a user

path Parameters
userId
required
integer
Request Body schema: application/json
required
id
integer
name
string
email
string
major
string
grad_date
string <date>
interests
Array of strings
Items Enum: "web_development" "machine_learning" "cloud_computing" "artificial_intelligence"
profile_pic
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "major": "string",
  • "grad_date": "2019-08-24",
  • "interests": [
    ],
  • "profile_pic": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "major": "string",
  • "grad_date": "2019-08-24",
  • "interests": [
    ],
  • "profile_pic": "string"
}

Admin Delete a user

path Parameters
userId
required
integer
Request Body schema: application/json
required
id
integer

Responses

Request samples

Content type
application/json
{
  • "id": 0
}

Response samples

Content type
application/json
{
  • "status": "string"
}

events

Operations about events

-

List all events

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new event

Request Body schema: application/json
required
id
integer
name
string
location
string
start_date
string <date>
end_date
string <date>
description
string
event_type
string
Enum: "workshop" "seminar" "hackathon" "conference" "meetup" "test" "other"
event_capacity
integer
image
string
start_time
string <time>
end_time
string <time>
tags
Array of strings
Items Enum: "web_development" "machine_learning" "cloud_computing" "artificial_intelligence"
target_audience
string
Value: "students"

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "location": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "description": "string",
  • "event_type": "workshop",
  • "event_capacity": 0,
  • "image": "string",
  • "start_time": "14:15:22Z",
  • "end_time": "14:15:22Z",
  • "tags": [
    ],
  • "target_audience": "students"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "location": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "description": "string",
  • "event_type": "workshop",
  • "event_capacity": 0,
  • "image": "string",
  • "start_time": "14:15:22Z",
  • "end_time": "14:15:22Z",
  • "tags": [
    ],
  • "target_audience": "students"
}

Get an event by ID

path Parameters
eventId
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "location": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "description": "string",
  • "event_type": "workshop",
  • "event_capacity": 0,
  • "image": "string",
  • "start_time": "14:15:22Z",
  • "end_time": "14:15:22Z",
  • "tags": [
    ],
  • "target_audience": "students"
}

projects

Operations about projects

-

List all projects

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new project

Request Body schema: application/json
required
id
integer
name
string
description
string
github_link
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "description": "string",
  • "github_link": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "description": "string",
  • "github_link": "string"
}

equipment

Operations about equipment rentals

-

List all equipment rentals

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new equipment rental

Request Body schema: application/json
required
item_id
integer
user_id
integer
date_borrowed
string <date>
return_date
string <date>
price
number
condition
string
Enum: "ready" "broken" "in_maintenance"

Responses

Request samples

Content type
application/json
{
  • "item_id": 0,
  • "user_id": 0,
  • "date_borrowed": "2019-08-24",
  • "return_date": "2019-08-24",
  • "price": 0,
  • "condition": "ready"
}

Response samples

Content type
application/json
{
  • "item_id": 0,
  • "user_id": 0,
  • "date_borrowed": "2019-08-24",
  • "return_date": "2019-08-24",
  • "price": 0,
  • "condition": "ready"
}

membership

Operations about membership plans and requests

-

List all membership requests

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new membership request

Request Body schema: application/json
required
id
integer
status
string
Enum: "pending" "approved" "declined"
note
string
plan_id
integer
user_id
integer

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "status": "pending",
  • "note": "string",
  • "plan_id": 0,
  • "user_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "status": "pending",
  • "note": "string",
  • "plan_id": 0,
  • "user_id": 0
}

subscriptions

Get users all current subscriptions

Responses

Response samples

Content type
application/json
[
  • 0
]

User subscribes to a company or an event

Request Body schema: application/json
required
type
string
Enum: "company" "event"
id
integer

Responses

Request samples

Content type
application/json
{
  • "type": "company",
  • "id": 0
}

Response samples

Content type
application/json
{
  • "status": "string"
}

User unsubscribes to a company or an event

Request Body schema: application/json
required
type
string
Enum: "company" "event"
id
integer

Responses

Request samples

Content type
application/json
{
  • "type": "company",
  • "id": 0
}

Response samples

Content type
application/json
{
  • "status": "string"
}

company

List all companies

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new company

Request Body schema: application/json
required
name
string
location
string
description
string
industries
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "location": "string",
  • "description": "string",
  • "industries": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "location": "string",
  • "description": "string",
  • "industries": [
    ]
}
- - - -