Giter VIP home page Giter VIP logo

coordinatorstorytelling-be's Introduction

CoordinatorStorytelling-BE

Coordinator Storytelling Backend

All Endpoints are fully functional and deployed to the http://coordinator-storytelling.herokuapp.com/ server

the GET Endpoints are :

/stories/all (no authentication) - returns list of all stories from all coordinators

/stories/5 (no authentication) - returns the story associated with id ("5" in this case)

/stories/mine (requires token) - returns all stories from whomever is logged in

/stories/random (no authentication) - returns random story from a random coordinator

/users/getusername (requires token) - returns the user information for whomever holds the token

Post endpoints are :

/createnewuser (no authentication) - creates a new user based on a JSON format. The format is 

{

"username": "fakeuser",

"password":"password",

"firstname": "John2",

"lastname": "Doe",

"country": "USA",

"email": "[email protected]",

"title": "owner"

}

the username HAS to be unique and it has to have the rest of the information in it. (Required to create the user)

/stories/story (requires a token) - create a new story based on a JSON format. the format is

{
   
    "title": "fake title posted through postman as a user for the second time",
    
    "country": "Bolivia",
    
    "description": "fakeish description",
    
    "content": "A creative man is motivated by the desire to achieve, not by the desire to beat others",
    
    "date": "fake date"
    
}

##PUT endpoint :

 /stories/story/update/7 - Updates a current story with any new information

the Json doesnt have to be a full copy of the story as long as it has whats being updated labeled:

{"country":"sample country name"}

will update the "country" section of the story and leave rest intact.

DELETE endpoint:

 /stories/story/3 - deletes a specific story based on the id ( for example 3)

##ADMIN ONLY ENDPOINTS

/stories/username/john - access all stories from a specific user

/users/users - access a list of all users 

/users/user/3 - access all data (except password) for a specific user

PUT /users/user/3 - update a specific users information

coordinatorstorytelling-be's People

Contributors

kylecole01 avatar jbseppanen avatar

Watchers

James Cloos 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.