Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routes #1

Closed
joshghent opened this issue May 17, 2018 · 2 comments
Closed

Routes #1

joshghent opened this issue May 17, 2018 · 2 comments

Comments

@joshghent
Copy link
Contributor

This is the complete list of API routes that we are aiming to build. Maybe we can plan all this out with swagger and then start to build it from there. I'm sure some of this will change but this is basically what we are aiming for. It's so we can use this inside the main ESFiddle app

We need routes for the following. Not sure on the names at the minute - make suggestions!
All of these will be routed with JWT authentication or possibly 0auth because we need account based logins (with Github, Google, Twitter etc)

  • A user to star a new fiddle
  • Create a new fiddle
  • Edit a fiddle by ID
  • Get a users record
  • Edit a users record
  • Create a new user
  • Get trending fiddles (based on how many views and stars)
  • Get recent fiddles (with pagination etc)
  • Get most starred fiddles (with pagination again)
  • Delete a fiddle
  • Get examples (sorted by which ES version they are for)
  • Get all examples
  • Search API (this might be a seperate repo tho, any thoughts?)
@joshghent
Copy link
Contributor Author

joshghent commented May 19, 2018

Ok these are the routes we will make. This will need converting to swagger documentation and add payloads to the post/update routes etc.
All private methods use JWT authentication
Public methods use something else (possibly JWT but the account information will not be needed)

PRIVATE - Create user, update, patch, delete
/user

PRIVATE - Create fiddle, GET fiddles for user
/fiddles

PRIVATE - get single fiddle, update delete
/fiddle/:fiddleid

PUBLIC - Get recent fiddles
/fiddles/recent/:dateRange

PUBLIC - Get most starred
/fiddles/popular/:dateRange

PRIVATE - Toggle Starring a fiddle - jwt auth (this is how we get the user that has starred the fiddle)
/fiddles/:fiddleid/star

PRIVATE - Fork a fiddle
/Fiddles/:fiddleid/fork

PRIVATE - Tag a fiddle
/Fiddles/:fiddleid/tag
Post the tag payload

PRIVATE - Download a fiddle to zip
/Fiddles/:fiddleid/download
Returns URL to S3 bucket or some kind of file upload? Would this be fast enough?

PRIVATE - Screenshot a fiddle
/Fiddles/:fiddleid/screenshot
Integrate with carbon.now.sh and return an image

PRIVATE - Get code-blocks screenshot
/Fiddles/:fiddleid/code-blocks
Return the code blocks image for a fiddle

@joshghent
Copy link
Contributor Author

Ok I've finally added swagger docs so hopefully we can all get cracking on it! 💯

@joshghent joshghent reopened this Jun 17, 2018
@joshghent joshghent added the MVP Issues for the MVP label Nov 6, 2018
joshghent pushed a commit that referenced this issue Nov 21, 2018
@collinmesser collinmesser removed MVP Issues for the MVP up-for-grabs labels Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants