Skip to content

flygerian/hint-api-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Hint API

API specification for the hint API


Authentication


I'm going to send the API key as an Authorization header in the Http request on every request

Authorization=<API key>

Creating a user


I'm going to send POST request to the /user endpoint

[POST] /user


Request Body

{
    "uName": "username",
    "uMail": "userEmail",
    "uPhone": "User phone number"
}

Expected response (success)


Code: 201 (created)


Response Body


{
    "uId": "userID"
}

Expected response (Duplicate user)


Code: 409 (conflict)


Response Body



{
    "message": "User exists"
}


Modify User Proferences


[POST] /modify-preferences/:userId


Request Body


[ "Male", "Female", "Neflix", "Light Comedy"  ] // Any Key word from the keywords array

Response


200 (OK)


Save feedback


[POST] /save-feedback


Request Body


    {
        "movieID": "tt304958658"
        "feedback": "LIKE" // Possibilities [LIKE, DISLIKE, SHOW_MORE, SHOW_LESS, SEEN]
    }

Expected response (Recommend movie)


Code: 204 (No Content)

Get movie recommendation for user


[GET] /recommend/:userId


Expected response

Code: 200 (OK)

    {
        "movieID": "tt304958658",
        "name": "Movie name",
        "imageUrl": "Image url",
        "triggers": ["Male", "Female", "Neflix", "Light Comedy"],
        "durationMins": 120,
        "editorial": "This is a great movie"
    }

About

Just the spec for the hinst API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published