Skip to content

developmentnow/skwiz-it-api

Repository files navigation

RESTful API for skwiz.it

This is a relatively simple API thrown together for the "exquisite corps" app skwiz.it.

Install and Run

$ go get github.com/benkauffman/skwiz-it-api

$ cd $GOPATH/src/github.com/benkauffman/skwiz-it-api
$ go get && go build
$ chmod +x ./skwiz-it-api && ./skwiz-it-api

Configure

An example configuration is listed below and is also saved under example.config.json
The API requires that a config.json file live in the root directory with the correct S3, DB, MailGun and App properties defined

{
  "S3": {
    "Key": "my-special-key",
    "Secret": "sUp3rS3cre7",
    "Bucket": "some-bucket",
    "Region": "us-west-2"
  },
  "MySQL": {
    "Host": "some.db.net",
    "Database": "api_db",
    "User": "username",
    "Password": "3245ertfdsa"
  },
  "MailGun": {
    "Domain": "YourDomain",
    "ApiKey": "YourApiKey",
    "PublicApiKey": "YourPublicApiKey"
  },
  "App": {
    "Domain": "http://localhost:3000"
  }
}

Public API Endpoints

Secured API Endpoints

End points with a private base, require the header X-App-User to be provided.
The X-App-User header should contain the user json object base64 encoded
X-App-User header example : eyJuYW1lIjoiQmVuIiwgImVtYWlsIjoiYmVuQGtyYXNoaWRidWlsdC5jb20iLCAiaWQiOiAxfQ==

User

{
    "id": 1,
    "name": "Ben Kauffman",
    "email": "ben@krashidbuilt.com"
}

Drawing

{
    "id": 1,
    "url": null,
    "top": {
        "name": null,
        "email": null,
        "url": null
    },
    "middle": {
        "name": null,
        "email": null,
        "url": null
    },
    "bottom": {
        "name": null,
        "email": null,
        "url": null
    }
}

About

API used for skwiz.it web application https://skwiz.it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published