schemed

command module
v0.0.0-...-1b62c67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2017 License: MIT Imports: 5 Imported by: 0

README

Schemed

Hatch a plan with your friends, effortlessly.

Go Report Card GoDoc

Schemed is an online service that aims to make it easier for people to hangout without repetitive communication.

API Overview

The Schemed API is a RESTful web service, which operates upon the idea of resources and CRUD.

Resources

Resources are representations of the data that you'll be using from our API. Here are the resource types that will be available to you:

  • Users
  • Events
  • Venues
Operations

There are four basic operations which make up the acronym CRUD. Each operation is accessible through HTTP by sending requests to https://schemed.io/api.

Operation Request method and URL Response (in JSON)
Create POST /resource Created resource with ID
Read GET /resource Requested resources
Update PATCH /resource/id Updated resource
Delete DELETE /resource/id Deleted resource

A more detailed description of REST operations can be found here.

Examples
JavaScript

Create an Event

const response = await fetch('https://schemed.io/api/events', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'End of the world party',
    place: 'Heaven',
    host: 'Jesus',
  }),
})
const event = await response.json()
const { id, title, place, host } = event

To retrieve an Event by ID

const response = await fetch('https://schemed.io/api/events/123')
const event = await response.json()
const { id, title, place, host } = event

Update an Event by ID

const response = await fetch('https://schemed.io/api/events/123', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'End of the world party',
    place: 'Hell',
    host: 'Satan',
  }),
})
const event = await response.json()
const { id, title, place, host } = event

Delete an Event by ID

const response = await fetch('https://schemed.io/api/events/123', {
  method: 'DELETE',
})
const event = await response.json()
const { id, title, place, host } = event

How to contribute

Clone this repo then use Docker to get it running.

Note: Make sure you have your GOPATH all set up.

go get github.com/puradox/schemed
cd $GOPATH/src/github.com/puradox/schemed
docker-compose up

Be sure to use conventional commit messages when contributing back to this repo.

Happy hacking!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL