4Like-dev

Client API Routes

This part describes methods for CLIENT-based app/service.

Discover page
GET /discover
GET /discover/{weekId}
Overall discover data
GET /discover

Authentication

Open

By calling this method you will obtain current data for discovery page. You will get a data with most 4liked videos by community on this week and few previous weeks.

Discover data of special week
GET /discover/{weekId}

Authentication

Open

By calling this method you will obtain most 4liked videos for past specified week.

Path variables

weekId
string required

id of the specified week in db

My Likes
GET /my-likes/{weekId}
POST /my-likes
Get user youtube likes and 4likes data
GET /my-likes

Authentication

API Token

By calling this method you will get up-to-date data with user youtube likes and 4likes.

Request parameters

JWT Token
string optional

Inner 4like app token

Responses

200 OK
Body
Object
playlistItems
Array
Object
addedWeekId
string
Example:
1
4Like
Object
liked
string
Example:
true
likedWeekId
string
Example:
2
id
string
Example:
eR7yRKBromQ
snippet
Object
publishedAt
string
Example:
2017-12-24T20:30:02.000Z
channelId
string
Example:
UCsvn_Po0SmunchJYOWpOxMg
title
string
Example:
VR CHAT (2nd Second Life)
thumbnails
Object
default
Object
url
string
Example:
https://i.ytimg.com/vi/eR7yRKBromQ/default.jpg
width
integer
Example:
120
height
integer
Example:
90
medium
Object
url
string
Example:
https://i.ytimg.com/vi/eR7yRKBromQ/mqdefault.jpg
width
integer
Example:
320
height
integer
Example:
180
high
Object
url
string
Example:
https://i.ytimg.com/vi/eR7yRKBromQ/hqdefault.jpg
width
integer
Example:
480
height
integer
Example:
360
standard
Object
url
string
Example:
https://i.ytimg.com/vi/eR7yRKBromQ/sddefault.jpg
width
integer
Example:
640
height
integer
Example:
480
maxres
Object
url
string
Example:
https://i.ytimg.com/vi/eR7yRKBromQ/maxresdefault.jpg
width
integer
Example:
1280
height
integer
Example:
720
channelTitle
string
Example:
videogamedunkey
tags
Array
Example:
["dunkey","2nd life","second life dunkey","second life","2nd second life","vr chat","vr chat dunkey","bubsy","bubsy dunkey","geenie.com","dunkey akinator","jampack dunkey","jampack volume 1"]
string
Example:
dunkey
categoryId
string
Example:
20
localized
Object
title
string
Example:
VR CHAT (2nd Second Life)
defaultAudioLanguage
string
Example:
en
statistics
Object
viewCount
string
Example:
1241212
likeCount
string
Example:
65400
nextPageToken
string

Token for the next portion of data

Get user likes from specific week
GET /my-likes/{weekId}

Authentication

API Token

Same as /my-likes, but you getting a portion of data just for specified week.

Path variables

weekId
string required
Post 4like
POST /my-likes

Authentication

API Token

Scores specified video as 4Like of user.

Request body

Object
videoId
string

id of video which user wants to 4Like

JWT Token
string

Inner 4like app access token

Responses

201 Created
400 Bad Request
500 Internal Server Error
Working with account
GET /login
GET /account/invite
POST /account/buy4likes
GET /account/signout
POST /account/remove
Login operation
GET /login

Authentication

Open

Logging user in by Google account.

Request parameters

authKey
string optional

authentification key given by Google OAuth2

Example:
authKey=Aio09219Auhf7yrUyehklmbeETSas

Responses

200 OK
Body
Object
authToken
string

JWT access token to our app

404 Not Found

Page not found

500 Internal Server Error

Inner server error

Get general account data
GET /account

Authentication

API Token

Sending overall account data to user.

Invite a friend
GET /account/invite

Authentication

API Token

??? Potentially we will give an ability for user to invite his friends, but we don’t know how yet, so basically this is a dummy method yet.

Buy more 4Likes
POST /account/buy4likes

Authentication

API Token

Allows user to increase an amount of his 4Likes.

Logout user
GET /account/signout

Authentication

API Token

Just signs out a user.

Remove user from app
POST /account/remove

Authentication

API Token

Permanently removes user data from our app and db.