sharing (1.0.0)

Download OpenAPI specification:Download

Sharing has a really interesting name

Users

Authenticate user and login

Authorizations:
None
Request Body schema: application/json
required

User credentials

email
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "account": {
    },
  • "token": "string"
}

Register a new user

Authorizations:
None
Request Body schema: application/json
required

User information for registration

email
required
string
password
required
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "account": {
    },
  • "token": "string"
}

Get user by ID

Authorizations:
NonebearerAuth
path Parameters
user_id
required
string <int64>

ID of the user to retrieve

header Parameters
Authorization
required
string

Bearer token for authentication

Responses

Response samples

Content type
application/json
{
  • "user": {
    }
}

Get users

Authorizations:
NonebearerAuth
query Parameters
ids
Array of strings <int64> [ items <int64 > ]

IDs of the users to retrieve

header Parameters
Authorization
string

Bearer token for authentication

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

Update user profile

Authorizations:
bearerAuth
header Parameters
Authorization
required
string

Bearer token for authentication

Request Body schema: application/json
name
string
bio
string
avatar_url
string
bg_url
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "bio": "string",
  • "avatar_url": "string",
  • "bg_url": "string"
}

Response samples

Content type
application/json
{
  • "profile": {
    }
}

Get followers of a user

Authorizations:
NonebearerAuth
path Parameters
user_id
required
string <int64>

ID of the user to retrieve

query Parameters
page
string <int64>

page number

limit
integer <int32>

limit number

header Parameters
Authorization
string

Bearer token for authentication

Responses

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "all_count": 0,
  • "next_page": "string"
}

Get users followed by a user

Authorizations:
NonebearerAuth
path Parameters
user_id
required
string <int64>

ID of the user to retrieve

query Parameters
page
string <int64>

page number

limit
integer <int32>

limit number

header Parameters
Authorization
string

Bearer token for authentication

Responses

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "all_count": 0,
  • "next_page": "string"
}

Follow or unfollow a user

Authorizations:
bearerAuth
header Parameters
Authorization
required
string

Bearer token for authentication

Request Body schema: application/json
required

User ID and action to perform

user_id
required
string <int64>
action
required
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "user_id": "string",
  • "action": 0
}

Response samples

Content type
application/json
{ }

Asserts

generate new asset pre-signed url to upload

Authorizations:
bearerAuth
Request Body schema: application/json
required

asset information

string

Responses

Request samples

Content type
application/json
{
  • "kind": "video"
}

Response samples

Content type
application/json

Content

getUserVideos

Authorizations:
bearerAuth
path Parameters
userId
required
integer <int64>
query Parameters
page
integer <int64>
size
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "all_count": 0,
  • "next_page": 0,
  • "items": [
    ]
}

getUserLikes

Authorizations:
bearerAuth
path Parameters
userId
required
integer <int64>
query Parameters
page
integer <int64>
size
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "all_count": 0,
  • "next_page": 0,
  • "items": [
    ]
}

getVideos

Authorizations:
bearerAuth
query Parameters
page
integer <int64>
size
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "all_count": 0,
  • "next_page": 0,
  • "items": [
    ]
}

createVideo

Authorizations:
bearerAuth
Request Body schema: application/json
required
title
string or null
des
string or null
cover_url
string or null
video_url
string or null

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "des": "string",
  • "cover_url": "string",
  • "video_url": "string"
}

getDailyPopularVideos

Authorizations:
bearerAuth
query Parameters
page
integer <int64>
size
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "all_count": 0,
  • "next_page": 0,
  • "items": [
    ]
}

vote

Authorizations:
bearerAuth
Request Body schema: application/json
required
video_id
integer <int64>
type
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "video_id": 0,
  • "type": 0
}

cancelVote

Authorizations:
bearerAuth
Request Body schema: application/json
required
video_id
integer <int64>
type
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "video_id": 0,
  • "type": 0
}

getMessages

Authorizations:
bearerAuth
query Parameters
receiverId
required
integer <int64>
page
integer <int64>
size
integer <int32>
unreadOnly
required
boolean

Responses

Response samples

Content type
application/json
{
  • "all_count": 0,
  • "next_page": 0,
  • "items": [
    ]
}

sendMessage

Authorizations:
bearerAuth
Request Body schema: application/json
required
receiver_id
integer <int64>
content
string or null
type
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "receiver_id": 0,
  • "content": "string",
  • "type": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "sender_id": 0,
  • "receiver_id": 0,
  • "content": "string",
  • "type": 0,
  • "read": true,
  • "created_at": "2019-08-24T14:15:22Z"
}

markAsRead

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Comments

get main comments

Authorizations:
NoneNone
query Parameters
belong_to
required
integer <int64>
page
required
integer <int64>
size
integer <int32>
Default: "10"

Responses

get reply comments

Authorizations:
NoneNone
query Parameters
belong_to
required
integer <int64>
reply_to
required
integer <int64>
page
required
integer <int64>
size
integer <int32>
Default: "10"

Responses

post comments

Authorizations:
None
Request Body schema: application/json
required
content
string
reply_to
integer <int64>
belong_to
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "reply_to": 0,
  • "belong_to": 0
}

delete comment

Authorizations:
None
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
content
string
reply_to
integer <int64>
belong_to
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "reply_to": 0,
  • "belong_to": 0
}

like comments

Authorizations:
None
path Parameters
id
required
integer <int64>

Responses

cancel like comments

Authorizations:
None
path Parameters
id
required
integer <int64>

Responses