heartratingserver

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

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

Go to latest
Published: Jul 31, 2015 License: MIT Imports: 9 Imported by: 0

README

HeartRating

API

POST /api/save
expected body:

 {
    "heart-score": 3,      # calculated score from Android app
    "watch-time": 1100000, # milliseconds watched
    "title": "Daredevil",  # title name
    "show": "Pilot",       # tv show title
    "user": "Bob"          # user account
 }

GET  /api/sessions/:user
response:

{
"user": {
    "Id": 1,
    "Name": "alice"
},
"sessions": [
    {
        "Title": "title",
        "Show": "show",
        "Heart": 1,
        "Duration": 1
    },
    {
        "Title": "title",
        "Show": "show",
        "Heart": 1,
        "Duration": 1
    },
    {
        "Title": "title",
        "Show": "show",
        "Heart": 1,
        "Duration": 1
    }
],
"status": "success"
}

GET  /api/users
response

{
    "users": [
        {
            "Id": 11,
            "Name": "Kevin"
        },
        {
            "Id": 6,
            "Name": "George"
        }
    ],
    "status": "success"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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