-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69518ef
Showing
21 changed files
with
5,676 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 TheCraftOfCode | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
web: node index.js |
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 |
---|---|---|
@@ -0,0 +1,249 @@ | ||
# Project: Amrita-Events-Api | ||
|
||
Backend Rest API for Amrita Events Android App. | ||
|
||
## End-point: Welcome..! | ||
|
||
### Description: | ||
|
||
### Welcome Page of Amrita Events Api. Never Used. (For Testing Purposes) | ||
|
||
### Endpoint: `/` | ||
|
||
### Method: `GET` | ||
|
||
> ``` | ||
> https://amrita-events.herokuapp.com/ | ||
> ``` | ||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
## End-point: Login | ||
### Description: | ||
### Endpoint: `/api/login` | ||
### Method: `POST` | ||
### Body (JSON): | ||
``` | ||
{ | ||
"username" : "<your-username-here>", | ||
"password" : "<your-password-here>" | ||
} | ||
``` | ||
> ``` | ||
> https://amrita-events.herokuapp.com/api/login | ||
> ``` | ||
### Body (**raw**) | ||
```json | ||
{ | ||
"username": "Justtotest", | ||
"password": "justtotest" | ||
} | ||
``` | ||
|
||
### Postman tests performed: | ||
|
||
``` | ||
pm.test("Checking Login endpoint status code", function(){ | ||
pm.response.to.have.status(200); | ||
}); | ||
``` | ||
|
||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
|
||
## End-point: RegisterUser | ||
|
||
### Description: | ||
|
||
### EndPoint: `/api/register` | ||
|
||
### Method : `POST` | ||
|
||
### Body: (JSON Only) | ||
|
||
``` | ||
{ | ||
"Name" : "<name-here>", | ||
"email" : "<your-email-here>", | ||
"username": "<Roll-No-as-username-here>", | ||
"password": "<Your-password-here>" | ||
} | ||
``` | ||
|
||
> ``` | ||
> https://amrita-events.herokuapp.com/api/register | ||
> ``` | ||
### Body (**raw**) | ||
```json | ||
{ | ||
"Name": "sridhar", | ||
"email": "justtotest.students.college.edu", | ||
"username": "justtotest", | ||
"password": "justtotest" | ||
} | ||
``` | ||
### Postman tests performed: | ||
|
||
``` | ||
pm.test("Checking Register endpoint status code", function(){ | ||
pm.response.to.have.status(200); | ||
}); | ||
``` | ||
|
||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
|
||
## End-point-name: AllEvents | ||
|
||
## Endpoint: `/api/all-events` | ||
|
||
## Method: `GET` | ||
|
||
End | ||
|
||
## Usage: | ||
|
||
`if the user is authenticated then this endpoint responds with list of all the events with sufficient information for the card view` | ||
|
||
### Note: | ||
|
||
`This Endpoint is only for Non-admin Authenticated Users.` | ||
|
||
> ``` | ||
> https://amrita-events.herokuapp.com/api/all-events | ||
> ``` | ||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
## End-point-name: ParticularEvent | ||
## Endpoint: `/api/all-events/:selectedEvent` | ||
## Method: `GET` | ||
## Usage: | ||
`if the user is authenticated then this endpoint responds with the completed details of the event corresponding to the id given in the request parameters` | ||
### Note: | ||
`This endpoint is only for the Non-Admin authenticated users` | ||
> ``` | ||
> https://amrita-events.herokuapp.com/api/all-events/6125250abb7921a16d0b6ae7 | ||
> ``` | ||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
## End-point-name: AllEventsAdminUsers | ||
## Endpoint: `/api/admin-users-portal` | ||
## Method: `GET` | ||
## Usage : | ||
`if the user is authenticated and is an admin then this endpoint responds with the list of all the events in the database` | ||
## Note: | ||
`This endpoint is only for Authenticated Admin Users` | ||
> ``` | ||
> https://amrita-events.herokuapp.com/api/admin-users-portal | ||
> ``` | ||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
## End-point-name: AddEventForAdmins | ||
## Endpoint: `/api/admin-users-portal` | ||
## Method: `POST` | ||
## Usage: | ||
`If the user is an authenticated Admin and all the validation on that request's body satisfy then this endpoint responds with "Event Created Successfully..! Message` | ||
## Body (JSON format) : | ||
``` | ||
{ | ||
"ImageUrl": "<image-url>", | ||
"Title": "<Title-of-the-event>", | ||
"Caption": "<caption-event>", | ||
"Description": "<What-is-the-event-about>", | ||
"OrganizingClub": "<club-organizing>", | ||
"Date": "<date-2018-01-24T21:46:25.551Z->", | ||
"Venue": "<-Venue-of-the-event>", | ||
"RegistrationLink": "<Registration-Link>", | ||
"Note": "<any-additional-note-on-event>", | ||
"ContactDetails": <-array-of-objects-of-all-the-contacts> | ||
} | ||
``` | ||
## Example: | ||
``` | ||
{ | ||
"ImageUrl": "www.goog", | ||
"Title": "some random", | ||
"Caption": "request.body.Caption", | ||
"Description": "request.body.Description", | ||
"OrganizingClub": "request.body.OrganizingClub", | ||
"Date": "2018-01-24T21:46:25.551Z", | ||
"Venue": "request.body.Venue", | ||
"RegistrationLink": "request.body.RegistrationLink", | ||
"Note": "request.body.Note", | ||
"ContactDetails": [{ | ||
"Name" : "Nirmal", | ||
"Phone" : "7569353633" | ||
},{ | ||
"Name" : "Sridhar", | ||
"Phone" : "7569353633" | ||
}] | ||
} | ||
``` | ||
### Note: | ||
`This Endpoint is only for the Authenticated Admin Users.` | ||
> ``` | ||
> https://amrita-events.herokuapp.com/api/admin-users-portal | ||
> ``` | ||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
## End-point-name: DeleteEventOnlyForAdmins | ||
## Endpoint: `/api/admin-users-portal/:eventId` | ||
## Method: `DELETE` | ||
## Params: `EventId` | ||
## Usage: | ||
`If the user is an authenticated Admin and the id of the evnt is given in the database then this endpoint successfully deleted the event and responds with the deleted event object.` | ||
### Note: | ||
`This endpoint is only for the Authenticated Admin users `. | ||
> ``` | ||
> https://amrita-events.herokuapp.com/api/admin-users-portal/6125250abb7921a16d0b6ae7 | ||
> ``` | ||
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ | ||
// this is a new commit |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-hacker |
Oops, something went wrong.