Questioner api is an api version 1 of the qstioner web application. It allows the user to send htttp requests to application and persists in data structures.
Questioner is a platform where human beings can ask questions about meetups and vote present questions.
- Create a new directory locally and open a terminal window from that folder
- Clone the repository
$ git clone https://github.com/hogum/qstioner-api.git
- Switch to the stackS directory
- Depending on your os install virtualenv and open a virtual enviroment:
$ virtualenv venv && source venv/bin/activate
- Install the project requirements
$ pip install -r requirements.txt
- Set Up the environment variables
$ export JWT_SECRET_KEY="your jwt secret key"
$ export SECRET_KEY="your secret key"
or
on Windows OS
- Allows Registration and Login of users into the application
Method |
Endpoint |
Functionality |
POST |
api/v1/auth/register |
Register new User |
POST |
api/v1/auth/login |
Login registered User |
PUT |
api/v1/auth/users/user_id |
Update user details |
DELETE |
api/v1/auth/users/user_id |
Delete a user account |
- Allows management of meetups by the admin, and all CRUD operations on a meetup
Method |
Endpoint |
Functionality |
POST |
/api/v1/meetups/ |
Add a meetup |
GET |
/api/v1/meetups/upcoming |
Lists all meetups |
GET |
/api/v1/meetups/meetup_id |
Retrieve a meetup |
PUT |
/api/v1/meetups/meetup_id |
Edit a meetup of a logged in user |
DELETE |
/api/v1/meetups/question_id |
Delete a request of a logged in user |
- Allows users to perform CRUD operations on questions to a meetup
Method |
Endpoint |
Functionality |
POST |
/api/v1/meetups/meetup_id/questions |
Add a question |
GET |
/api/v1/meetups/meetup_id/questions |
Lists all questions |
GET |
/api/v1/meetups/meetup_id/questions/question_id |
Retrieve a question |
PUT |
/api/v1/meetups/meetup_id/questions/question_id |
Edit a question of a logged in user |
DELETE |
/api/v1/meetups/meetup_id/questions/question_id |
Delete a request of a logged in user |
Method |
Endpoint |
Functionality |
PATCH |
/api/v1/question_id/upvote |
Upvote a Question |
PATCH |
/api/v1/question_id/downvote |
Downvote a Question |
Method |
Endpoint |
Functionality |
PATCH |
/api/v1/meetup_id/<rsvp> |
RSVP a meetup |
Comment Endpoints
Method |
Endpoint |
Functionality |
POST |
/api/v1/meetups/meetup_id/questions/question_id/comment |
Add a Comment to a Meetup Question |
GET |
/api/v1/meetups/meetup_id/questions/question_id/comment |
Lists all comments to a Question |
PUT |
/api/v1/meetups/meetup_id/questions/question_id/comment/commentID |
Edit a comment |
DELETE |
/api/v1/meetups/meetup_id/questions/question_id/comment/commentID |
Delete a comment |
Mugoh
This software was developed with the support of Andela Kenya