# User
# List Liked Submissions
# Resource URL
https://humtog.com/api/auth/submissions/liked
# Resource Method
GET
# Example Response
{
"data": [
{
"id": 23,
"slug": "submissionSlug",
"channel_id": 1,
"channel_name": "channelName",
"channel_title": "channelTitle",
"location": {
...
},
...
},
...
],
"links": {
"first": "https://humtog.com/api/auth/submissions/liked?page=1",
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://humtog.com/api/auth/submissions/liked",
"per_page": 15,
"to": 3
}
}
# List Users
# Resource URL
https://humtog.com/api/get-users
# Resource Method
GET
# Example Response
[
{
"id": 1,
"username": "userName",
"name": "fullName",
"website": null,
"location": "locationName",
"location_id": 3,
"avatar": "/imgs/default-avatar.png",
"color": "Dark",
"bio": null,
"confirmed": true,
"is_anonymous": 0,
...
},
...
]
# Bookmark User
This route toggles the "bookmark" action for the user. Meaning that the first time you call it, it'll bookmark the user; the second call for the same record will cause removing "bookmark" record.
TIP
The response is different for "bookmark" and "undo bookmark". You can use either the response's message or status code to detect whether the action has caused "bookmark" or "undo bookmark". Since the "bookmark" action causes creating a record in our database, it has the status code of 201. The "undo bookmark" isn't creating anything; thus it has the status code of 200.
# Resource URL
https://humtog.com/api/users/:user_id/bookmark
# Resource Method
POST
# Example Response
When performed a "bookmark" action:
{
"message": "Bookmarked successfully."
}
When performed an "undo bookmark" action:
{
"message": "Undid bookmark successfully."
}
# List Bookmarked Users
# Resource URL
https://humtog.com/api/users/bookmarked
# Resource Method
GET
# Example Response
{
"data": [
{
"id": 2,
"username": "userName",
"name": "fullName",
"bio": null,
"avatar": "/imgs/default-avatar.png",
"verified_email": true,
"cover_color": "Dark",
"created_at": "2020-04-29 09:21:42",
"info": {
...
}
},
...
],
"links": {
"first": "https://humtog.com/api/users/bookmarked?page=1",
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://humtog.com/api/users/bookmarked",
"per_page": 20,
"to": 1
}
}
# Block User
It works same as bookmark user
# Resource URL
https://humtog.com/api/users/:user_id/block
# Resource Method
POST
# Example Response
When performed a "block" action:
{
"message": "Blocked userName successfully."
}
When performed an "un block" action:
{
"message": "userName is no longer blocked."
}