Code Monkey home page Code Monkey logo

qstioner-api's Introduction

Build Status Coverage Status Maintainability

Run in Postman

qstioner-api

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.

API

Installation

  • 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
$ cd qstioner-api
  • Depending on your os install virtualenv and open a virtual enviroment:
$ pip install virtualenv
$ virtualenv venv && source venv/bin/activate
  • Install the project requirements
$ pip install -r requirements.txt
  • Set Up the environment variables

Running the application

$ export JWT_SECRET_KEY="your jwt secret key"
$ export SECRET_KEY="your secret key"
$ export FLASK_APP=app

or

$ set FLASK_APP=app

on Windows OS

Start the server
$ flask run

Project Dependencies

Endpoints

Authorization Endpoints
  • 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
Meetup Endpoints
  • 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
Questions Endpoints
  • 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
Vote Endpoints
Method Endpoint Functionality
PATCH /api/v1/question_id/upvote Upvote a Question
PATCH /api/v1/question_id/downvote Downvote a Question
RSVP Endpoints
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
Contributors

Mugoh

Acknowledgment

This software was developed with the support of Andela Kenya

qstioner-api's People

Contributors

mugoh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.