Giter VIP home page Giter VIP logo

evite's Introduction

Evite Event Api

Overview

The Evite Event API is an event management application that allows any user to view and sign up for events.

Requirements

Evite Event API requires

  • Python >= 3.7
  • Django = 3.0.8
  • SMTP server

Configuration

git clone project

git clone https://github.com/jeenx/evite

or unzip if it was downloaded

tar -xzvf evite.tar.gz

Before we run the application we need to make a few changes to the configuration.

Modify the evite/settings.py an update the email where event sign up notifications will be sent by the SMTP server

EVENTS_NOTIFICATION_EMAIL = '[email protected]'

SMTP configuration settings can also be found in evite/settings.py

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = '1025'
EMAIL_USE_TLS = False

If you don't have a SMTP server running, you can run a local one that will output to stdout. Open a new tab or shell and run the following:

 python3 -m smtpd -n -c DebuggingServer localhost:1025 

Run

Set up a python virtual environment

python3 -m virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt

For this project, the DB (db.sqlite3) is provided and no DB set up is required!

Run the local server python3 manage.py runserver

Access the API via http://localhost:8000

Admin console (http://localhost:8000/admin) can be accessed with the following credentials:

email: [email protected]
password: admin

API reference

The Evite Events API is built around REST. The API has resource oriented URLS, returns JSON encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Authentication

The Evite Events API uses API keys to authenticate requests. Only admins can view and manage the API keys in the Django Admin Console. Please reach out to your friendly admin to get a new key. For testing purposes, the following dev API key can be passed via the request header:

-H "Authorization: Api-Key gpiErY3c.W3TEnoV4Pzy39z5HuEisZs78BmbKkKmm"

Errors

HTTP Status Codes
200 - OK	              The request has succeeded.
204 - No Content              Server has fulfilled the request and there is no additional content in the response payload.
400 - Bad Request	      The request was unacceptable, often due to missing a required parameter.
403 - Forbidden	              The API key doesn't have permissions to perform the request or is not valid.
404 - Not Found	              The requested resource doesn't exist.
405 - Method Not Allowed      Method received is known by the server, but not supported by target.
5xx - Server Errors	      Something went wrong on the server-side

Public Endpoints

The following endpoints are available for public consumption and don't require an API key. The complete API endpoints are documented in the homepage.

Events
GET /events/

Return a list of all the events.

POST /events/{event_id}/participants/

Create a user registration for an event.

DELETE /events/{event_id}/participants/{confirmation_id}/

Delete a user registration for an event.

GET /events/{id}/

Return an event.

evite's People

Contributors

dependabot[bot] avatar jeenx avatar

Watchers

 avatar  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.