Giter VIP home page Giter VIP logo

build-sprint-wanderlust-reusable-be's Introduction

WanderLust

https://wanderlust-ty.herokuapp.com

Endpoints

HTTP Endpoint Description
POST /api/user/register Allows a user to register with a username & password, returns a json object that gives the id and their username
POST /api/user/login Allows a user to login with a username & password, returns a message that welcomes the user with their username and returns the token
GET /api/user Allows a logged in user a list view of all users (for ADMIN use)
POST /api/org/register Allows an organizer to register with a org_name & password, returns a json object that gives the id and their org_name
POST /api/org/login Allows an organizer to login with a org_name & password, will return a message that welcomes the organizer with their org_name and returns the token
GET /api/org Allows a logged in user a list view of all organizers (for ADMIN use)
GET /api/exp/:id Allows a logged in user or organizer to see all experiences specfic to an organizer id
POST /api/org/:id/exp Allows a logged in organizer to edit their experiences, takes in experience_title, experience_desc, date (YYYY-MM-DD) and can take in an image
GET /api/exp Allows anyone access to view all experiences
PUT /api/exp/:id Allows a logged in orgranizer to edit their experience, takes in the experience id
DELETE api/exp/:id Allows a logged in organizer to delete their experience, takes in the experience id

Successful Registration (USER)

[
    {
    "id": 1,
    "username": "Testing"
    }
]

Successful Login (User)

[
    {
    "message": "Welcome Testing",
    "token": "..."
    }
]

View all Users

[
    {
    "id": 1,
    "username": "Testing",
    "password": "..."
    },
    {
    "id": 2,
    "username": "Please Work",
    "password": "..."
    }
]

Successful Register (Organizer)

[
    {
    "id": 1,
    "org_name": "Wanderlust Team"
    }
]

Success Login (Organizer)

[
    {
    "message": "Welcome Wanderlust Team",
    "token": "..."
    }
]

View all Organizers

[
    {
    "id": 1,
    "org_name": "Wanderlust Team",
    "password": "$2a$08$R3KRKW1goHHH67OgPF9YouTqdn0s2Hv6r3CIdTcycE6u8X9yduqZy"
    },
    {
    "id": 2,
    "org_name": "Lambda School",
    "password": "$2a$08$X8/pupBK/0g0C87EZ5NbseyOXQj/6JIHmIh7szH83chSDgL94w6Wu"
    }
]

Checking Organizer Specific Experiences

[
    {
    "org_name": "Wanderlust Team",
    "experience_title": "Build a ReadMe",
    "experience_desc": "Going to make this clean so my team can be successful!",
    "date": "2019-10-20",
    "image": null
    }
]

Successfully adding a new Experience

[
  2
]

Viewing all Experiences

[
    {
    "org_name": "Wanderlust Team",
    "experience_title": "Build a ReadMe",
    "experience_desc": "Going to make this clean so my team can be successful!",
    "date": "2019-10-20",
    "image": null
    },
    {
    "org_name": "Lambda School",
    "experience_title": "Build Week",
    "experience_desc": "Students will work in teams to test their recently learned skills and create web application",
    "date": "2019-10-21",
    "image": null
    }
]

Successfully editing an Experience

[
    {
    "message": "Experience has been updated!"
    }
]

Successfull deleteing an Experience

[
    {
    "message": "Experience has been deleted"
    }
]

TOKENS EXPIRE AFTER 24H

build-sprint-wanderlust-reusable-be's People

Contributors

tylippe avatar

Watchers

James Cloos avatar Austen Allred avatar B avatar Elissa Thomas avatar Brit Hemming avatar Soumya Ghosh 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.