Skip to content

SkyHustle/go-surfspot-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Surf Spots Api

A simple REST API built using No third-party packages/dependencies

Requirements

  • GET /surfspots returns list of surfspots as JSON

  • GET /surfspots/{id} returns details of specific surfspot as JSON

  • GET /admin requires basic auth

  • GET /surfspots/random redirects (Status 302) to a random surfspot

  • POST /surfspots accepts a new surfspot to be added

  • POST /surfspots returns status 415 if content is not application/json

  • DELETE /surfspots/{id} returns an empty object {}

  • PUT /surfspots/{id} returns the updated surfspot as JSON

  • Each endpoint should have a test

Data Types

A surfspot object should look like this:

{
  "id": "someid",
  "name": "name of the surfspot",
  "founder": "the name of the person who found the sufspotspot",
  "beach": "name of the beach the surfspot is located at",
  "difficulty": 5, 
}

Persistence

There is no persistence, just temporary in-memory storage.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages