To install this application, the following steps are to be followed;
- Clone the API on your local machine.
- Open your terminal and navigate to the directory of the cloned app on your local machine.
- If you don't have yarn installed on your machine, run
npm install yarn -g
to install yarn. - Run
yarn install
to install all packages and dependencies the app will run on - Create a
.env
file on the root folder and save the database connection string to variable MONGO_URI and create a variable PORT with integer value. - Run
yarn dev
to run the application. Upon successfully, a message will show on the console showing your server is running on the specified port and database connection has been established.
https://catchup.hng.tech/api/v1/auth/signup
This endpoint is responsible for accepting data from users that are new to the application and creating an account for them
https://catchup.hng.tech/api/v1/auth/signin
This endpoint is responsible for accepting data from the users and sign into the application after they must have created an account on the application
https://catchup.hng.tech/api/v1/auth/refresh
This endpoint is responsible for refreshing the JWT needed to access the protected resources on the application
https://catchup.hng.tech/api/v1/auth/recover/generate
This endpoint is responsible for generating the token required for user to recover their account (Password Recovery)
https://catchup.hng.tech/api/v1/auth/recover/confirm
This endpoint is responsible for having the account recovery token generated sent to the user's email
https://catchup.hng.tech/api/v1/auth/google/url
This endpoint is responsible for login in to Google to interface with Google API for sign-up/Sign-in up with Google
https://catchup.hng.tech/api/v1/auth/google
This link is responsible for getting user from Google
https://api.catchup.hng.tech/api/v1/event
This endpoint is responsible for creating an event by an event
https://catchup.hng.tech/api/v1/event
This endpoint is responsible for querying the event database and getting list of all events
https://catchup.hng.tech/api/v1/event/:id
This endpoint is responsible for retrieving information for a particular event
https://catchup.hng.tech/api/v1/event/:id
This endpoint is responsible for removing an event from the database by the host
https://catchup.hng.tech/api/v1/event/:id
This endpoint is responsible for keeping record of an event in the event database up-to-date
https://api.catchup.hng.tech/api/v1/event/token/:id
https://catchup.hng.tech/api/v1/participant/addpart
This endpoint is responsible for creating a participant on the database
https://catchup.hng.tech/api/v1/participant/delete/:id
This endpoint is responsible for removing a participants from an event
https://catchup.hng.tech/api/v1/participant/update/:id
This endpoint is responsible for keeping a partcipant data up-to-date
https://catchup.hng.tech/api/v1/event/user/event
This endpoint is responsible for getting all Decided events
https://catchup.hng.tech/api/v1/calendar/
This endpoint is responsible for syncing with google calendar
The following steps should be taken for effective use of the Catchup API Swagger documentation
Follow the guidelines below to make use of the swagger documentation on https://catchup.hng.tech/api-docs
-
First, you have to go to
https://catchup.hng.tech/api-docs
to gain access to the Catchup swagger API documentation -
Once on the above route, there are 3 collections: auth, events and paricipants - housing the related endpoints
-
Select the production server
-
To test an endpoint, select a collection e.g auth. To access protected enpoint you will need to signup and then sign in and copy the access token from the response
-
After a successful sign in, click on the authorize button at the top right corner and input the access token in the provided field
-
Click on any of the displayed endpoints to learn more about it's use case
-
To run/test the endpoint click on the 'Try it out' button. This displays a preview page where you can modify/input parameters or the request body
-
For clarity, an example of the expected response is displayed iin the endpoint page
-
In the case of routes requiring parameters such as 'api/v1/:id' you can input the id in the provided id field
-
Once this is all set, click on the execute button to send a request to the enpoint
-
The server then sends response which is displayed in the response section right below the execute button.