Skip to content

budipest/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

budipest-api

This is an Express API with Node.js for the Budipest app.

What will this service do?

This Express API serves the Flutter application (that can be found in this repository) with the nearby toilets and related services (e.g. upvoting, downvoting).

Our API has the following endpoints:

  • GET /toilets?lat={lat}&lon={lon}
    • Get nearby toilets. Provide the user latitude and longitude in the URL params.
  • POST /toilets
    • Upload a new toilet
  • GET /toilets/{toiletID}
    • Get a particular toilet's data.
  • POST /toilets/{toiletID}/upvote/{userID}
    • Upvote a toilet with the user ID. If the user already upvoted this toilet, calling this endpoint will remove the upvote. If the user has a downvote, calling this endpoint will also remove that.
  • POST /toilets/{toiletID}/downvote/{userID}
    • Upvote a toilet with the user ID. If the user already downvoted this toilet, calling this endpoint will remove the downvote. If the user already upvoted, calling this endpoint will also remove that.
  • POST /toilets/{toiletID}/ratings/{userID}
    • Add new rating or edit existing one.

How do you start development?

npm i
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published