Moosocial REST API
What is REST API?Simply, REST API is the set of functions to which the developers can perform requests and receive responses. The interaction is performed via the HTTP/HTTPS protocol. An advantage of such an approach is the wide usage of HTTP/HTTPS that’s why REST API can be used practically for any programming language.
Base URL
All requests to this REST API should have the base URL: [https://example.com/api]
HTTP Verbs
In REST API, there are four verbs that are used to manage resources: GET ,POST, PUT, and DELETE. You can get the contents of a data using GET, delete the data using DELETE, and create or update the data using POST/PUT.
Authentication¶
Access Token Request - Allows a application to exchange the OAuth Request Token for an OAuth Access Token.
Authenticate¶
Authenticate
POST/auth/token
Endpoint : /api/auth/token.json
It is based on the Resource Owner Password Credentials flow of the OAuth 2 specification
Permission
It is not requires permission .
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
grant_type |
yes | string | Value MUST be set to "password" or "refresh_token" | |
username |
yes | string | if grant_type is "password". NOT NEED if grant_type is "refresh_token" The resource owner email. | |
password |
yes | string | if grant_type is "password". NOT NEED if grant_type is "refresh_token" The resource owner email. | |
refresh_token |
yes | if grant_type is "password". NOT NEED if grant_type is "refresh_token" The resource owner email. | ||
scope |
OPTIONAL | string | The scope of the access request as described by Section 3.3. |
200
Parameter | Type | Example | Description |
---|---|---|---|
access_token |
string | The access token issued by the authorization server. | |
token_type |
string | The type of the token | |
expires_in |
number | The lifetime in seconds of the access token | |
refresh_token |
string | The refresh token, which can be used to obtain new access tokens using the same authorization grant | |
scope |
string |
400
{
"name": "please enter a valid email",
"message": "please enter a valid email",
"url": "https://travel.moosocial.com/api/auth/token"
}
401
{
"name": "password is not correct",
"message": "password is not correct",
"url": "https://travel.moosocial.com/api/auth/token"
}
404
{
"name": "username or password is invalid",
"message": "username or password is invalid",
"url": "https://travel.moosocial.com/api/auth/token"
}
How to grant user access permision¶
To grant user access token permission , we use access_token generate from here
Here some example to use call api with access_token by GET , POST method .
GET Resquest
GET
Call moosocial api using GET RESQUEST
Assume your token is e7564451559131517ca2c1c70ac176633f19d5da
- To get your website's all created blog-posts: Send a GET request to:
https://travel.moosocial.com/api/blog/all?access_token=e7564451559131517ca2c1c70ac176633f19d5da
200
An array of blog object
- To get home feed that current user can view . Send a GET request to:
https://travel.moosocial.com/api/activity/home?filter=everyone&page=1&access_token=e7564451559131517ca2c1c70ac176633f19d5da
200
An array of Activity objects.
POST Resquest
POST
Call moosocial api using POST RESQUEST
Assume your token is e7564451559131517ca2c1c70ac176633f19d5da
- Like a bog : Send a POST request to:
https://travel.moosocial.com/api/Blog_Blog/like
Parameter | Type | Example | Description |
---|---|---|---|
access_token |
string | e7564451559131517ca2c1c70ac176633f19d5da | User access token |
id |
int | 1 | Blog id |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
Post request with Access Token in Header
POST
Call moosocial api using POST RESQUEST and add access_token in HEADER
We use moo-access-token variable to define access token at header.
Assume your token is e7564451559131517ca2c1c70ac176633f19d5da
- Like a bog : Send a POST request with access token send by header
https://travel.moosocial.com/api/Blog_Blog/like
Request Headers
Content-Type: application/json
Host: https://travel.moosocial.com
moo-access-token: e7564451559131517ca2c1c70ac176633f19d5da
Parameter | Type | Example | Description |
---|---|---|---|
id |
Blog id | 1 |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
Activity Feeds¶
APIs allow to mooSocial members to manage there feed and get paginated list of feeds, post new feed, share on feed and manage feed etc.
Example Activity¶
Default Activities |
---|
Base Moosocial Activity Feed This is default of api activity feed . hideLikeAndComment : TRUE show that this activity does not allow to LIKE or leave COMMENT share : TRUE mean this feed can be shared. titleHtml : Feed title with HTML format . contentHtml : Text content of current activity with HTML format . tagUser : List of all friends has been tagged in this activity . isViewerDisliked,isViewerLiked : TRUE mean this activity feed has been already liked/disliked by current viewer . isHideDislike: TRUE mean dislike function has been disabled by admin .
A JSON serialized activity
|
Example Activities |
---|
User A joined mooTravel
A JSON serialized activity
|
User A changed profile picture
A JSON serialized activity
|
User A post a text
A JSON serialized activity
|
User A post a link
A JSON serialized activity
|
User A > User B
A JSON serialized activity
|
User A share User B's post
A JSON serialized activity
|
User A is now friend with User B and 2 others
A JSON serialized activity
|
User A post photo on feed
A JSON serialized activity
|
User A added 2 news photo to album Album Name
A JSON serialized activity
|
User A > Group Name
A JSON serialized activity
|
User A > Event Name
A JSON serialized activity
|
User A shared User B's photo
A JSON serialized activity
|
User A shared User B's album
A JSON serialized activity
|
User A was tagged in a photo
A JSON serialized activity
|
User A commented on User B photo
A JSON serialized activity
|
User A created a new event
A JSON serialized activity
|
User A shared User B's event
A JSON serialized activity
|
User A is attending Event 1 , Event 2 and 2 others
A JSON serialized activity
|
User A shared a new video
A JSON serialized activity
|
User A shared User B's video
A JSON serialized activity
|
User A > Group Name
A JSON serialized activity
|
User A created a new topic
A JSON serialized activity
|
User A shared User B's topic
A JSON serialized activity
|
User A > Group Name
A JSON serialized activity
|
User A created a new blog entry
A JSON serialized activity
|
User A shared User B's blog
A JSON serialized activity
|
User A created a new group
A JSON serialized activity
|
User A shared User B's group
A JSON serialized activity
|
User A joined group Group Name and 2 others
A JSON serialized activity
|
User A shared User B's object > User C Object can be Blog | Topic | Video | Group | Event | Photo | Album
A JSON serialized activity
|
Get Single Activity Feed¶
Get Single Activity Feeds
GET/activity/{activity_id}
An individual entry in a profile's feed or plugins activities . The profile could be a user, event or group.
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | The post ID | |
published |
datetime | The time the post was initially published. | |
publishedTranslated |
string | The time the post was initially published with text translation | |
privacy |
int |
The actual number privacy settings of the post.
|
|
commentCount |
int | Total comment count | |
likeCount |
int | Total like count. | |
dislikeCount |
int | Total dislike count. | |
actor |
object |
The author of this post.
|
|
title |
string | Title of this post | |
titleHtml |
string | Title of this post with HTML format | |
type |
string | Action of this post | |
object |
object | The author of this post.
|
|
target |
object | Describes the target of the activity. The precise meaning of the activity's target is dependent on the activities type. |
400
{
"name": "You can not view this activity.",
"message": "You can not view this activity.",
"url": "https://travel.moosocial.com/api/activity/119"
}
404
{
"name": "This activity feed not exist.",
"message": "This activity feed not exist.",
"url": "https://travel.moosocial.com/api/activity/1122"
}
Get Users were tagged in invidual feed¶
Get Users were tagged in invidual feed
GET/activity/tag/{tag_id}
Return list of users were tagged in individual feed.
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
tag_id |
int | Tag id |
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
string | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
404
{
"name": "This tag feed not exist.",
"message": "This tag feed not exist.",
"url": "https://travel.moosocial.com/api/activity/tag/1234"
}
Post New Feed¶
Post a new feed
New feed
POST/activity
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
type |
string | default : User , in array of (User,Group_Group,Event_Event). Define which type of feed is posted , User can post feed at home , user profile , in a group or event |
|
target_id |
int | default : 0 , in array of (userid , groupid , eventid) | |
message |
string | Hi @[25:David J. Thouless] #1234 | The main body of the post, otherwise called the status message. Either link, place, or message must be supplied. |
messageText |
string | Hi David J. Thouless #1234 | The text of status |
userTagging |
string | 63,25,33 | Comma-separated list of user IDs of people tagged in this post |
privacy |
int | Determines the privacy settings of the post | |
wallphoto |
arrat[string] | An array of Photo path which is uploaded by using the api :/file |
200
{
"message": "success",
"id": "activity_id",
}
401
{
"name": "Missing parameter : Share feed can not be empty",
"message": "Missing parameter : Share feed can not be empty",
"url": "https://travel.moosocial.com/api/activity/post"
}
Post a comment on a feed¶
Post a comment on a feed
Post comment on feed
POST/activity/{activity_id}/comment
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
activity_id |
int | Activity Id | |
text |
string | Content of comment | |
photo |
string | is the path which is uploaded by using the api : /file |
200
{
"message": success,
"data": comment object,
}
Edit comment on feed¶
Edit comment on feed
Edit comment on feed
POST/activity/comment/edit
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
activity_id |
int | Activity Id | |
comment_id |
int | Comment Id | |
text |
string | Content of comment | |
photo |
string | is the path which is uploaded by using the api : /file |
200
{
"message": success,
}
400
{
"name": Comment can not be empty.,
"message": Comment can not be empty.,
"url": "https://travel.moosocial.com/api/activity/comment/edit"
}
Edit comment on feed
PUT/activity/{activity_id}/comment/{comment_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
activity_id |
int | Activity Id | |
comment_id |
int | Comment Id | |
text |
string | Content of comment | |
photo |
string | is the path which is uploaded by using the api : /file |
200
{
"message": success,
}
400
{
"name": Comment can not be empty.,
"message": Comment can not be empty.,
"url": "https://travel.moosocial.com/api/activity/10/comment/20"
}
Delete Activity feed¶
Delete an activity feed.
Delete Activity feed
POST/activity/delete/{id}
Permission
It's required a user access token. How to use
200
{
"success": true,
}
404
{
"name": "This activity feed not exist",
"message": "This activity feed not exist",
"url": "https://travel.moosocial.com/api/activity/1122"
}
Delete Activity feed
DELETE/activity/{activity_id}
Permission
It's required a user access token. How to use
200
{
"success": true,
}
404
{
"name": "This activity feed not exist",
"message": "This activity feed not exist",
"url": "https://travel.moosocial.com/api/activity/1122"
}
Delete comment on a feed .¶
Delete comment on a feed .
Delete comment on a feed.
POST/activity/{activity_id}/comment/delete
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
activity_id |
int | Activity Id | |
comment_id |
int | Comment Id |
200
{
"success": true,
}
400
{
"name": Something wrong with your data , please check again.,
"message": Something wrong with your data , please check again.,
"url": "https://travel.moosocial.com/api/activity/1/comment/delete"
}
Delete comment on a feed.
DELETE/activity/{activity_id}/comment
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
activity_id |
int | Activity Id | |
comment_id |
int | Comment Id |
200
{
"success": true,
}
400
{
"name": Something wrong with your data , please check again.,
"message": Something wrong with your data , please check again.,
"url": "https://travel.moosocial.com/api/activity/1/comment"
}
Get Home Feed¶
The posts that a person sees in their mooSoical News Feed.
Get User Activity Feed
GET/activity/home
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
filter |
string | OPTIONAL.It mus be "everyone" or "friends" | |
page |
int | default value is 1 |
200
An array of Activity objects.
File¶
All action related to upload file
Upload photo for new feed¶
Upload photo for new feed
POST/file
Upload photo for a new feed
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
qqfile |
image/jpeg |
200
{
"success": true,
"filename": 0fdc7992b900f41ab1b7641a48604bed.jpg,
"photo": uploads/tmp/0fdc7992b900f41ab1b7641a48604bed.jpg
"file_path": https://travel.moosocial.com/uploads/tmp/0fdc7992b900f41ab1b7641a48604bed.jpg
}
400
{
"name": Message,
"message": Message,
"url": "https://travel.moosocial.com/api/activity/photo"
}
Messages can be :
# Server error. Upload directory isn't writable.
# No files were uploaded.
# File is empty
# File is too large
# File has an invalid extension.
# Could not save uploaded file.The upload was cancelled, or server error encountered
Upload photo for album¶
Upload photo for album
POST/file/album
Upload photo for album
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
qqfile |
image/jpeg |
200
{
"success": true,
"filename": 0fdc7992b900f41ab1b7641a48604bed.jpg,
"photo": uploads/tmp/0fdc7992b900f41ab1b7641a48604bed.jpg
"file_path": https://travel.moosocial.com/uploads/tmp/0fdc7992b900f41ab1b7641a48604bed.jpg
}
400
{
"name": Message,
"message": Message,
"url": "https://travel.moosocial.com/api/file/album"
}
Messages can be :
# Server error. Upload directory isn't writable.
# No files were uploaded.
# File is empty
# File is too large
# File has an invalid extension.
# Could not save uploaded file.The upload was cancelled, or server error encountered
Friends ¶
Get Friend lists¶
Get list of your friend .
Get list of your friend .
GET/friend/list
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
totalFriendCount |
int | Total friend count | |
friend |
object |
An array of user friend
|
404
{
"name": "No friend found.",
"message": "No friend found.",
"url": "https://travel.moosocial.com/api/friend/list"
}
Get Friend's requested lists¶
Get list of your friend's requested
Get list of your friend's requested
GET/friend/requests
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
totalFriendCount |
int | Total friend count | |
friend |
object |
An array of user friend
|
404
{
"name": "No friend found.",
"message": "No friend found.",
"url": "https://travel.moosocial.com/api/friend/requests"
}
Get User friend lists¶
Get the user’s friends.
Get the user’s friends.
GET/friend/{user_id}/list
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
totalFriendCount |
int | Total friend count | |
friend |
object |
An array of user friend
|
401
{
"name": "User does not have access to this resource.",
"message": "User does not have access to this resource.",
"url": "https://travel.moosocial.com/api/friend/3/list"
}
404
{
"name": "User does not exist.",
"message": "User does not exist.",
"url": "https://travel.moosocial.com/api/friend/2/list"
}
Add friend¶
Send friend request to a user.
Send friend request to a user.
POST/friend/add
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | User id to whom sent the friend request by logged-in user. | |
message |
string | Message sent to user whom you sent request . |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Friend already .",
"message": "Friend already .",
"url": "https://travel.moosocial.com/api/friend/add"
}
404
{
"name": "User does not exist.",
"message": "User does not exist.",
"url": "https://travel.moosocial.com/api/friend/add"
}
405
{
"name": "You have already sent a friend request to this user",
"message": "You have already sent a friend request to this user",
"url": "https://travel.moosocial.com/api/friend/add"
}
Accept friend request¶
Accept friend request
Accept friend request
POST/friend/accept
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Friend request id . |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
404
{
"name": "Friend request not found.",
"message": "Friend request not found.",
"url": "https://travel.moosocial.com/api/friend/accept"
}
Reject friend request¶
Reject friend request
Reject friend request
POST/friend/reject
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Friend request id . |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
404
{
"name": "Friend request not found.",
"message": "Friend request not found.",
"url": "https://travel.moosocial.com/api/friend/reject"
}
Cancel friend request¶
Cancel the friend request sent to a user.
POST/friend/cancel
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | User id to whom sent the friend request by logged-in user. |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
404
{
"name": "Friend request not found.",
"message": "Friend request not found.",
"url": "https://travel.moosocial.com/api/friend/cancel"
}
Delete friendship¶
Remove friendship with a user .
POST/friend/delete
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | user id of the friend to remove as friend by logged-in user. |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "You are not a friend of this user",
"message": "You are not a friend of this user",
"url": "https://travel.moosocial.com/api/friend/delete"
}
Likes and Dislikes¶
Likes and dislikes object to make action on moosocial site .
Get user liked list¶
Get user liked list
GET{objectType}/like/{id}
Get array of user who already liked this item
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/like |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
count |
int | Total user liked this item | |
user |
object |
An array of user already liked
|
404
{
"name": "Nobody liked this item",
"message": "Nobody liked this item",
"url": "https://travel.moosocial.com/api/activity/like/10"
}
Get user disliked list¶
Get user disliked list
GET{objectType}/dislike/{id}
Get array of user who already disliked this item
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/dislike |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
count |
int | Total user disliked this item | |
user |
object |
An array of user already disliked
|
404
{
"name": "Nobody dislike this item",
"message": "Nobody dislike this item",
"url": "https://travel.moosocial.com/api/activity/dislike/10"
}
Like an item¶
Like an item
POST{objectType}/like
Like an activity feed , comment , blog , topic ,....
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/like |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Item already liked",
"message": "Item already liked",
"url": "https://travel.moosocial.com/api/activity/like"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/activity/like"
}
Dislike an item¶
Dislike an item
DELETE{objectType}/dislike
Dislike an activity feed , comment , blog , topic ,....
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/dislike |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Item already dislike",
"message": "Item already dislike",
"url": "https://travel.moosocial.com/api/activity/dislike"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/activity/dislike"
}
Remove like an item¶
Remove like an item
POST{objectType}/like/delete
Unlike an activity feed , comment , blog , topic ,....
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/like/delete |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Item not liked yet",
"message": "Item not liked yet",
"url": "https://travel.moosocial.com/api/activity/like/delete"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/activity/like/delete"
}
Remove like an item
DELETE{objectType}/like
Remove like an activity feed , comment , blog , topic ,....
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/like |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Item not liked yet",
"message": "Item not liked yet",
"url": "https://travel.moosocial.com/api/activity/like"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/activity/like"
}
Remove dislike an item¶
Remove dislike an item
POST{objectType}/dislike/delete
Remove dislike an activity feed , comment , blog , topic ,....
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/dislike/delete |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Item not disliked yet",
"message": "Item not disliked yet",
"url": "https://travel.moosocial.com/api/activity/dislike/delete"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/activity/dislike/delete"
}
Remove dislike an item
DELETE{objectType}/dislike
Remove dislike an activity feed , comment , blog , topic ,....
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string | /activity/dislike |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
id |
int | Object id (activity_id , comment_id , photo_id .....) |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Item not disliked yet",
"message": "Item not disliked yet",
"url": "https://travel.moosocial.com/api/activity/dislike"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/activity/dislike"
}
User¶
User Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
string | User name | |
url |
string | User profile url | |
avatar |
array | 1 |
An array of user avatar
|
type |
string | User type | |
friendCount |
int | User's friend count | |
photoCount |
int | User's photo count | |
userStatus |
string | Status with current user (Remove,Add, Cancel,Respond) | |
userCase |
int | User case that similar to user's status of current user (2 : Remove ,1 : Add ,4: Cancel ,3: Respond ) | |
requestId |
int | If status is Respond , will have request id to answer Accept or Remove friend request . (Default is null ) |
Get All User¶
Get all user
GETuser/browse/all
Get an array of all users
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Pagging number |
200
An array of user object
404
{
"name": "User not found",
"message": "User not found",
"url": "https://travel.moosocial.com/api/user/browse/all"
}
Get all current user's friend¶
Get all current user's friend
GETuser/browse/friends
Get an array of current user's friend
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Pagging number |
200
An array of user object
404
{
"name": "User not found",
"message": "User not found",
"url": "https://travel.moosocial.com/api/user/browse/friends"
}
Get all user that current user is following.¶
Get all user that current user is following.
GETuser/follow
Get all user that current user is following.
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Pagging number |
200
An array of user object
404
{
"name": "User not found",
"message": "User not found",
"url": "https://travel.moosocial.com/api/user/follow"
}
Search user¶
Search user
POSTuser/search
Search user
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
name |
string | User name | |
email |
User email | ||
gender |
array |
Array of gender 0 : Male 1: Female |
|
picture |
int | Have profile picture or not ( default : 0 , selected : 1) | |
online |
int | User is online ( default : 0 , selected : 1) |
200
An array ofuser object
404
{
"name": "User not found",
"message": "User not found",
"url": "https://travel.moosocial.com/api/user/search"
}
Change password¶
Change password
POSTuser/password
Change current user password
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
old_password |
string | Current password | |
password |
string | New password | |
password2 |
string | New password ( need matching with password) |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Your password has been changed |
400
{
"name": "message",
"message": "Message",
"url": "https://travel.moosocial.com/api/user/password"
}
Messages can be :
# Incorrect current password
# Passwords do not match
# Password must have at least 6 characters
Edit user information¶
Edit user information
POSTuser/edit
Edit user information
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
name |
string | User name | |
email |
User email | ||
month |
int | Birthday month | |
day |
int | Birthday day | |
year |
int | Birthday year | |
gender |
string | User gender (Male , Female) | |
timezone |
string | Timezone | |
username |
string | User special username | |
about |
string | User about | |
privacy |
int |
Privacy setting 1 : Everyone 2 : Friends Only |
|
hide_online |
int | Setting hide your online status ( default : 0) | |
receive_message_from_non_friend |
int | Setting receive message from non-friend (default:1) |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Your changes have been saved |
400
{
"name": "message",
"message": "Message",
"url": "https://travel.moosocial.com/api/user/edit"
}
Messages can be :
# Birthday is required
# Profile address must not be a numeric value
# Profile address is restricted
# Name is required
# Email must be a valid email
# Email already exists
# Email is required
# Profile address must only contain letters and numbers
# Profile address must be between 5 and 50 characters long.
# Profile address already exist
Edit user information
PUTuser
Edit user information
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
name |
string | User name | |
email |
User email | ||
month |
int | Birthday month | |
day |
int | Birthday day | |
year |
int | Birthday year | |
gender |
string | User gender (Male , Female) | |
timezone |
string | Timezone | |
username |
string | User special username | |
about |
string | User about | |
privacy |
int |
Privacy setting 1 : Everyone 2 : Friends Only |
|
hide_online |
int | Setting hide your online status ( default : 0) | |
receive_message_from_non_friend |
int | Setting receive message from non-friend (default:1) |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Your changes have been saved |
400
{
"name": "message",
"message": "Message",
"url": "https://travel.moosocial.com/api/user"
}
Messages can be :
# Birthday is required
# Username must not be a numeric value
# Username is restricted
# Name is required
# Email must be a valid email
# Email already exists
# Email is required
# Username must only contain letters and numbers
# Username must be between 5 and 50 characters long.
# Username already exist
Get current user ¶
Returns current user info.
Get current user
GET/user/me
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
number | The id of this person's user account. This ID is unique. | |
name |
string | The person's name. | |
email |
string | This person's primary email address listed on their profile. | |
avatar |
string | The list of person's image path of this person's avatar . | |
last_login |
string | This person's last login in the format MM/DD/YYYY . | |
photo_count |
string | This person's total photos | |
friend_count |
string | This person's total friends . | |
notification_count |
string | This person's notifications is unread | |
friend_request_count |
string | This person's total friend request is being waited to accept. | |
blog_count |
string | This person's total blogs | |
topic_count |
string | This person's total topic | |
conversation_user_count |
string | This person's total conversations | |
video_count |
string | This person's total videos | |
gender |
string | The gender pronoun selected by this person | |
birthday |
string | This person's birthday in the format MM/DD/YYYY. | |
timezone |
string | The person's current timezone offset from UTC. | |
about |
string | The 'about me' section of this person's profile. | |
lang |
string | The language is selected by this person | |
cover |
string | The person's image path of this person's avatar. | |
profile_url |
string | The person's profile path | |
email_validation |
boolean | This user has verify email or not | |
menus |
objects | Lists menu show and hide |
Get User Info¶
Get the profile field values of single user.
Get User Info
GETuser/{id}
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
enableFollow |
boolean | Enable follow action or not | |
follow |
boolean | Follow status (followed : true , not follow : false) | |
canView |
boolean | Current user can view that user's profiel or not | |
id |
number | The id of this person's user account. This ID is unique. | |
name |
string | The person's name. | |
avatar |
string | The list of person's image path of this person's avatar . | |
photo |
string | ||
photo_count |
string | This person's total photos of ??? | |
friend_count |
string | This person's total friends . | |
blog_count |
string | This person's total blogs | |
topic_count |
string | This person's total topic | |
video_count |
string | This person's total videos | |
gender |
string | OPTION.It's belongs to viewer access token .The gender pronoun selected by this person | |
birthday |
string | OPTION.It's belongs to viewer access token .This person's birthday in the format MM/DD/YYYY | |
timezone |
string | The person's current timezone offset from UTC. | |
about |
string | The 'about me' section of this person's profile. | |
cover |
string | The person's image path of this person's avatar . |
404
{
"name": "User does not exist.",
"message": "User does not exist.",
"url": "https://travel.moosocial.com/api/user/1000"
}
My Avatar¶
Post owner avatar .
User avatar
POST/user/me/avatar
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
qqfile |
image |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
string | success text | |
filename |
string | photo name | |
photo |
string | photo url | |
file_path |
string | photo FULL url |
400
Parameter | Type | Example | Description |
---|---|---|---|
error |
string | error text |
Get User Activities¶
Get user activities feed.
User Activities
GET/user/{id}/activities
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array of Activity objects.
404
{
"name": "Parameter error : User does not exist.",
"message": "Parameter error : User does not exist.",
"url": "https://travel.moosocial.com/api/user/100/activities"
}
Friend Lists¶
A person's friends.
Friend Lists
GET/user/{id}/friends
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofUser objects
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/friends"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/friends"
}
Blocked Lists¶
Get all single user's blocked
GET/user/{id}/blocked
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofUser objects
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/blocked"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/blocked"
}
User Blogs Created¶
The photo blogs this person has created.
User Blogs Created
GET/user/{id}/blogs
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofBlog object
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/blogs"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/blogs"
}
User Topics Created¶
The photo topics this person has created.
User Topics Created
GET/user/{id}/topics
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofTopic object
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/topics"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/topics"
}
User Albums Created¶
The photo albums this person has created
User Albums Created
GET/user/{id}/albums
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofAlbum object
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/albums"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/albums"
}
Attending Events¶
Returns the events this person is attending.
Attending Events
GET/user/{id}/events
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofEvent objects
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/events"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/events"
}
Group Members¶
The groups that a person is a member of.
Group Members
GET/user/{id}/groups
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofGroup object
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/groups"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/groups"
}
Photo Tagged¶
Shows all photos this person is tagged in.
Photo Tagged
GET/user/{id}/photos
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofPhoto object
404
{
"name": "Photo not found.",
"message": "Photo not found.",
"url": "https://travel.moosocial.com/api/user/100/photos?page=1"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/photos?page=1000"
}
Profile Picture¶
This person's profile picture.
Profile Picture
GET/user/{user-id}/photos/picture
Permission
Because profile pictures are always public on mooSocial, this call does not require any access token.
Parameter | Type | Example | Description |
---|---|---|---|
type |
enum{square,small,normal,large} | You use this to get a pre-specified size of picture. | |
height |
int | Restrict the picture height to this size in pixels. | |
width |
int | Restrict the picture width to this size in pixels. When height and width are both used, the image will be scaled as close to the dimensions as possible and then cropped down |
200
Parameter | Type | Example | Description |
---|---|---|---|
url |
string | The URL of the profile photo. | |
height |
int | Picture height in pixels. height and width are only returned when specified as modifiers. | |
width |
int | Picture width in pixels. |
User's video¶
All videos this person created.
User's video
GET/user/{id}/videos
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | default value is 1 | |
id |
int | User id |
200
An array ofVideo objects
404
{
"name": "User not exist.",
"message": "User not exist.",
"url": "https://travel.moosocial.com/api/user/100/videos"
}
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/10/videos"
}
Get GCM Token¶
Registering an ID issued by the GCM connection servers to the client app that allows it to receive messages
View detail here
GCM Token
POST/user/me/gcm/token
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
token |
string | REQUIRED - GCM token | |
language |
string | OPTIONAL - default is eng |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
404
{
errorCode : "GCM_token_is_emtpy"
name : "GCM Token is emtpy"
message : GCM Token is emtpy
url : https://travel.moosocial.com/user/me/gcm/token
}
Delete GCM Token¶
Delete GCM Token.
Delete GCM Token
POST/user/me/gcm/token/delete
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
token |
string | REQUIRED - GCM token |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
404
{
errorCode : "GCM_token_is_emtpy"
name : "GCM Token is emtpy"
message : GCM Token is emtpy
url : https://travel.moosocial.com/user/me/gcm/token/delete
}
Delete Token
DELETE/user/me/gcm/token
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
token |
string | REQUIRED - GCM token |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
404
{
errorCode : "GCM_token_is_emtpy"
name : "GCM Token is emtpy"
message : GCM Token is emtpy
url : https://travel.moosocial.com/user/me/gcm/token/
}
User Register¶
Receiving an token security from the server that uses it for registering new user ( It will help to protect the 'public' part of a REST service from spam? )
User Register
GET/user/register
Permission
It is a public api
200
Parameter | Type | Example | Description |
---|---|---|---|
key |
string | AUTO defind , reuturn key string | |
birthday_require |
boolean | CORE defind , return TRUE or FALSE | |
disable_registration |
boolean | CORE defind , return TRUE or FALSE | |
require_gender |
boolean | CORE defind , return TRUE or FALSE | |
show_gender_signup |
boolean | CORE defind , return TRUE or FALSE | |
enable_unspecified_gender |
boolean | CORE defind , return TRUE or FALSE | |
show_birthday_signup |
boolean | CORE defind , return TRUE or FALSE |
Sign up an account.¶
Sign up an account.
POST/user/register
Permission
It is a public api
Parameter | Type | Example | Description |
---|---|---|---|
key |
number | Get from '/user/register' api via 'GET' method | |
security_token |
string | md5(Api.api_secret_key + key) | |
email |
string | Required | |
password |
string | Required - Password must have at least 6 characters | |
password2 |
string | Required - Verify password , need match with password | |
name |
string | Required | |
gender |
string | OPTIONAL - ( Male , Female ) , can be blank . | |
birthday |
string | OPTIONAL - Can be blank | |
registration_code |
string | OPTIONAL |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
400
{
errorCode : "key_is_not_empty"
name : "Key is not empty!"
message : "Key is not empty!"
url : https://travel.moosocial.com/user/register
}
{
errorCode : "key_is_not_invalid"
name : "Key is not invalid!"
message : "Key is not invalid!"
url : https://travel.moosocial.com/user/register
}
{
errorCode : "security_token_is_invalid"
name : "Security token is invalid"
message : "Security token is invalid"
url : https://travel.moosocial.com/user/register
}
User Forgot¶
Set key for reset password form
User Forgot
GET/user/forgot
Permission
It is a public api
200
Parameter | Type | Example | Description |
---|---|---|---|
key |
string | AUTO defind , reuturn key string |
Forgot Password¶
Reset and Send forgot password email to email user .
Send forgot password
POST/user/forgot
Permission
It is a public api
Parameter | Type | Example | Description |
---|---|---|---|
key |
string | REQUIRED | |
email |
string | REQUIRED - Email user |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
400
{
errorCode : "key_is_not_empty"
name : "Key is not empty!"
message : "Key is not empty!"
url : https://travel.moosocial.com/user/forgot
}
{
errorCode : "key_is_not_invalid"
name : "Key is not invalid!"
message : "Key is not invalid!"
url : https://travel.moosocial.com/user/forgot
}
{
errorCode : "email_does_not_exist"
name : "Email does not exist"
message : "Email does not exist"
url : https://travel.moosocial.com/user/forgot
}
401
{
errorCode : "key_is_expired"
name : "Key is expired!"
message : "Key is expired!"
url : https://travel.moosocial.com/user/forgot
}
Follow user¶
Follow user
POSTuser/follow
Follow user
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | User id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
400
{
"name": "Already Followed",
"message": "Already Followed",
"url": "https://travel.moosocial.com/api/user/follow"
}
404
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/follow"
}
UnFollow user¶
UnFollow user
POSTuser/unfollow
UnFollow user
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | User id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
400
{
"name": "Already UnFollowed",
"message": "Already UnFollowed",
"url": "https://travel.moosocial.com/api/user/unfollow"
}
404
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/unfollow"
}
Block user¶
Block user
POSTuser/block
Block user
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | User id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
400
{
"name": "You cannot block to yourself",
"message": "You cannot block to yourself",
"url": "https://travel.moosocial.com/api/user/block"
}
{
"name": "You already block this user",
"message": "You already block this user",
"url": "https://travel.moosocial.com/api/user/block"
}
404
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/block"
}
UnBlock user¶
UnBlock user
POSTuser/unblock
UnBlock user
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
user_id |
int | User id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when done |
400
{
"name": "This user is not blocked by you",
"message": "This user is not blocked by you",
"url": "https://travel.moosocial.com/api/user/unblock"
}
{
"name": "You cannot unblock to yourself",
"message": "You cannot unblock to yourself",
"url": "https://travel.moosocial.com/api/user/unblock"
}
404
{
"name": "User not found.",
"message": "User not found.",
"url": "https://travel.moosocial.com/api/user/unblock"
}
Blog¶
All action related to blog plugin
Blog Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Blog id | |
title |
string | Blog title | |
body |
string | Blog body | |
thumbnail |
string |
A array of blog thumbnail .
|
|
categoryId |
int | Blog category id | |
privacy |
int | 1 |
The privacy settings of the post.
|
commentCount |
int | Total comment count on a blog | |
shareCount |
int | Total share count on a blog | |
likeCount |
int | Total like count on a blog | |
dislikeCount |
int | Total dislike count on a blog | |
userId |
int | Owner id | |
userName |
string | Owner name | |
userUrl |
string | Owner link to profile | |
url |
string | Blog url | |
published |
datetime | Created time | |
publishedTranslated |
datetime | The time the post was initially published with text translation | |
type |
string | Type of blog object (Blog_Blog) | |
shareAction |
string |
Action type when share detail of Blog (blog_item_detail) It will be used in api blog/{blog_id} |
|
isViewerLiked |
boolean |
Return TRUE if current user liked this blog It will be used in api blog/{blog_id} |
|
isViewerDisliked |
boolean |
Return TRUE if current user disliked this blog It will be used in api blog/{blog_id} |
Get All Blog¶
Get all blog
GETblog/all
Get an array of all blogs
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of blog object
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/all"
}
Get My Blog¶
Get my blog
GETblog/my
Get an array of my blogs
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of blog object
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/my"
}
Get Friends Blog¶
Get friends blog
GETblog/friends
Get an array of friends blogs
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of blog object
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/friends"
}
Get Popular Blog¶
Get popular blog
GETblog/popular
Get an array of popular blogs
Permission
It's required a user access token. How to use
200
An array of blog object
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/popular"
}
Browse blog from a category¶
Browse blog from a category
GETblog/category/{category_id}
Get blog from a category
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
Parameter | Type | Example | Description |
---|---|---|---|
category_id |
int | category id |
200
An array of blog object
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/category/5"
}
View Blog Detail¶
Get blog detail
GETblog/{blog_id}
View blog detail by blog id
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
blog_id |
int | Blog id |
200
Parameter | Type | Example | Description |
---|---|---|---|
All fields of blog object |
All fields of blog object |
||
canEdit |
boolean | Edit permission | |
canDelete |
boolean | Delete permission |
401
{
"errorCode": "friends_only",
"name": "Only friends of the poster can view this item",
"message": "Only friends of the poster can view this item",
"url": "https://travel.moosocial.com/api/blog/2"
}
{
"errorCode": "only_me",
"name": "Only the poster can view this item",
"message": "Only the poster can view this item",
"url": "https://travel.moosocial.com/api/blog/3"
}
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/4000"
}
Filter blog¶
Filter blog
POSTblog/filter
Filter blog by keyword
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | Keyword to search | |
page |
int | Page number |
200
An array ofblog object
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/filter"
}
Create blog¶
Create blog
POSTblog/create
Create a blog
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
title |
string | REQUIRED | Blog title | |
body |
string | REQUIRED | Blog body | |
thumbnail |
file | Thumbnail of blog , is the path which is uploaded by using the api /file | |
tags |
string |
Blog tag , seperate by comma ex : this,is,blog,tag |
|
category_id |
int |
Blog category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "blog title is missing.",
"message": "blog title is missing.",
"url": "https://travel.moosocial.com/api/blog/create"
}
{
"name": "blog body is missing.",
"message": "blog body is missing.",
"url": "https://travel.moosocial.com/api/blog/create"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/blog/create"
}
Edit blog¶
Edit blog
POSTblog/edit
Edit a blog
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Blog id | |
title |
string | REQUIRED | Blog title | |
body |
string | REQUIRED | Blog body | |
thumbnail |
file | Thumbnail of blog , is the path which is uploaded by using the api /file | |
tags |
string |
Blog tag , seperate by comma ex : this,is,blog,tag |
|
category_id |
int |
Blog category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "blog title is missing.",
"message": "blog title is missing.",
"url": "https://travel.moosocial.com/api/blog/edit"
}
{
"name": "blog body is missing.",
"message": "blog body is missing.",
"url": "https://travel.moosocial.com/api/blog/edit"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/blog/edit"
}
Edit blog
PUTblog/{id}
Edit a blog
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Blog id | |
title |
string | REQUIRED | Blog title | |
body |
string | REQUIRED | Blog body | |
thumbnail |
file | Thumbnail of blog , is the path which is uploaded by using the api /file | |
tags |
string |
Blog tag , seperate by comma ex : this,is,blog,tag |
|
category_id |
int |
Blog category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "blog title is missing.",
"message": "blog title is missing.",
"url": "https://travel.moosocial.com/api/blog/10"
}
{
"name": "blog body is missing.",
"message": "blog body is missing.",
"url": "https://travel.moosocial.com/api/blog/10"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/blog/10"
}
Delete Blog¶
Delete Blog
Delete blog
POST/blog/delete/{blog_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
blog_id |
int | Blog id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/blog/delete/2"
}
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/delete/20000"
}
Delete blog
DELETE/blog/delete/{blog_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
blog_id |
int | Blog id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/blog/delete/2"
}
404
{
"name": "Blog not found",
"message": "Blog not found",
"url": "https://travel.moosocial.com/api/blog/delete/20000"
}
Topic¶
All action related to topic plugin
Topic Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | topic id | |
title |
string | topic title | |
body |
string | topic body | |
thumbnail |
string |
A array of topic thumbnail .
|
|
caterogyId |
int | topic category id | |
commentCount |
int | Total comment count on a topic | |
shareCount |
int | Total share count on a topic | |
likeCount |
int | Total like count on a topic | |
dislikecount |
int | Total dislike count on a topic | |
userId |
int | Owner id | |
userName |
string | Owner name | |
userUrl |
string | Owner link to profile | |
url |
string | Topic url | |
published |
datetime | Created time | |
publishedTranslated |
datetime | Created time with format . | |
type |
datetime | Type of topic object (Topic_Topic) | |
shareAction |
string |
Action type when share detail of Topic (topic_item_detail) It will be used in api topic/{topic_id} |
|
isViewerLiked |
boolean | Return TRUE if current user liked this topic It will be used in api topic/{topic_id} |
|
isViewerDisliked |
boolean |
Return TRUE if current user disliked this topic It will be used in api topic/{topic_id} |
Get All topic¶
Get all topic
GETtopic/all
Get an array of all topics
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of topic object
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/all"
}
Get My topic¶
Get my topic
GETtopic/my
Get an array of my topics
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of topic object
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/my"
}
Get Friends topic¶
Get friends topic
GETtopic/friends
Get an array of friends topics
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of topic object
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/friends"
}
Get Popular topic¶
Get popular topic
GETtopic/popular
Get an array of popular topics
Permission
It's required a user access token. How to use
200
An array of topic object
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/popular"
}
View topic¶
Get topic detail
GETtopic/{topic_id}
View topic detail by topic id
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | topic id |
200
Parameter | Type | Example | Description |
---|---|---|---|
allowAction |
boolean | Current user can comment, like , share on this topic or not (In case topic is locked) | |
groupId |
int | Group id when posted topic in a group | |
groupName |
string | Group name when posted topic in a group | |
groupUrl |
string | Group url when posted topic in a group | |
canEdit |
boolean | ||
canDelete |
boolean |
401
{
"errorCode": "friends_only",
"name": "Only friends of the poster can view this item",
"message": "Only friends of the poster can view this item",
"url": "https://travel.moosocial.com/api/topic/2"
}
{
"errorCode": "only_me",
"name": "Only the poster can view this item",
"message": "Only the poster can view this item",
"url": "https://travel.moosocial.com/api/topic/3"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/4000"
}
Browse topic from a group¶
Browse topic from a group
GETtopic/group/{group_id}
Get topic from a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | Group id | |
page |
int | Paging |
200
An array of topic object
400
{
"errorCode": "not_group_member",
"name": "Only group members can view topics",
"message": "Only group members can view topics",
"url": "https://travel.moosocial.com/api/topic/group/2"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/group/5"
}
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/topic/group/20000"
}
Browse topic from a category¶
Browse topic from a category
GETtopic/category/{category_id}
Get topic from a category
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
category_id |
int | category id | |
page |
int | Paging |
200
An array of topic object
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/category/5"
}
Pin a topic¶
Pin a topic
POSTtopic/pin/{topic_id}
Pin a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | Topic id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Topic already pinned",
"message": "Topic already pinned",
"url": "https://travel.moosocial.com/api/topic/pin/2"
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/topic/pin/1"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/pin/500"
}
Unpin a topic¶
Unpin a topic
POSTtopic/unpin/{topic_id}
Unpin a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | Topic id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Topic already unpinned",
"message": "Topic already unpinned",
"url": "https://travel.moosocial.com/api/topic/unpin/2"
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/topic/unpin/1"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/unpin/500"
}
Lock a topic¶
Lock a topic
POSTtopic/lock/{topic_id}
Lock a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | Topic id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Topic already locked",
"message": "Topic already locked",
"url": "https://travel.moosocial.com/api/topic/lock/2"
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/topic/lock/1"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/lock/500"
}
Unlock a topic¶
Unlock a topic
POSTtopic/unlock/{topic_id}
Unlock a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | Topic id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Topic already unlocked",
"message": "Topic already unlocked",
"url": "https://travel.moosocial.com/api/topic/unlock/2"
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/topic/unlock/1"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/unlock/500"
}
Filter topic¶
Filter topic
POSTtopic/filter
Filter topic by keyword
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | Keyword to search | |
page |
int | Paging |
200
An array of topic object
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/filter"
}
Create topic¶
Create topic
POSTtopic/create
Create a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
title |
string | REQUIRED | topic title | |
body |
string | REQUIRED | topic body | |
thumbnail |
file | Thumbnail of blog , is the path which is uploaded by using the api /file | |
tags |
string |
topic tag , seperate by comma ex : this,is,topic,tag |
|
category_id |
int |
topic category id |
|
group_id |
int |
Group id when create topic in a group |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success | |
id |
int | topic id |
400
{
"name": "topic title is missing.",
"message": "topic title is missing.",
"url": "https://travel.moosocial.com/api/topic/create"
}
{
"name": "topic body is missing.",
"message": "topic body is missing.",
"url": "https://travel.moosocial.com/api/topic/create"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/topic/create"
}
Edit topic¶
Edit topic
POSTtopic/edit
Edit a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | topic id | |
title |
string | REQUIRED | topic title | |
body |
string | REQUIRED | topic body | |
thumbnail |
file | Thumbnail of blog , is the path which is uploaded by using the api /file | |
tags |
string |
topic tag , seperate by comma ex : this,is,topic,tag |
|
category_id |
int |
topic category id |
|
group_id |
int |
group id |
200
{
"success": true,
"id": 10,
}
400
{
"name": "topic title is missing.",
"message": "topic title is missing.",
"url": "https://travel.moosocial.com/api/topic/edit"
}
{
"name": "topic body is missing.",
"message": "topic body is missing.",
"url": "https://travel.moosocial.com/api/topic/edit"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/topic/edit"
}
{
"name": "You are not member of this group.",
"message": "You are not member of this group.",
"url": "https://travel.moosocial.com/api/topic/edit"
}
Edit topic
PUTtopic/{id}
Edit a topic
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | topic id | |
title |
string | REQUIRED | topic title | |
body |
string | REQUIRED | topic body | |
thumbnail |
file | Thumbnail of blog , is the path which is uploaded by using the api /file | |
tags |
string |
topic tag , seperate by comma ex : this,is,topic,tag |
|
category_id |
int |
topic category id |
|
group_id |
int |
group id |
200
{
"success": true,
"id": 10,
}
400
{
"name": "topic title is missing.",
"message": "topic title is missing.",
"url": "https://travel.moosocial.com/api/topic/2"
}
{
"name": "topic body is missing.",
"message": "topic body is missing.",
"url": "https://travel.moosocial.com/api/topic/1"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/topic/1"
}
{
"name": "You are not member of this group.",
"message": "You are not member of this group.",
"url": "https://travel.moosocial.com/api/topic/1"
}
Delete topic¶
Delete topic
Delete topic
POST/topic/delete/{topic_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | topic id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/topic/delete/2"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/delete/20000"
}
Delete topic
DELETE/topic/delete/{topic_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
topic_id |
int | topic id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/topic/delete/2"
}
404
{
"name": "topic not found",
"message": "topic not found",
"url": "https://travel.moosocial.com/api/topic/delete/20000"
}
video¶
All action related to video plugin
video Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | video id | |
published |
datetime | Video created time | |
publishedTranslated |
datetime | The time the post was initially published with text translation | |
title |
string | video title | |
description |
string | video description | |
thumbnail |
string |
A array of video thumbnail .
|
|
url |
string | Video url | |
videoType |
string | Type of video only allow( youtube | vimeo ) | |
videoSourceId |
string | Ex: youtube : 34PmUiKPrQg | Video source ID |
caterogyId |
int | video category id | |
privacy |
int | 1 |
The privacy settings of the post.
|
commentCount |
int | Total comment count on a video | |
shareCount |
int | Total share count on a video | |
likeCount |
int | Total like count on a video | |
dislikeCount |
int | Total dislike count on a video | |
userId |
int | Owner id | |
userName |
string | Owner name | |
userUrl |
string | Owner link to profile | |
userAvatar |
string |
An array of owner's avatar
|
|
type |
string | Type of video object (Video_Video) | |
shareAction |
string |
Action type when share detail of Video (video_item_detail) It will be used in api video/{video_id} |
|
isViewerLiked |
boolean | Return TRUE if current user liked this photo It will be used in api video/{video_id} |
|
isViewerDisliked |
boolean |
Return TRUE if current user disliked this photo It will be used in api video/{video_id} |
Get All video¶
Get all video
GETvideo/all
Get an array of all videos
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of video object
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/all"
}
Get My video¶
Get my video
GETvideo/my
Get an array of my videos
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of video object
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/my"
}
Get Friends video¶
Get friends video
GETvideo/friends
Get an array of friends videos
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of video object
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/friends"
}
Get Popular video¶
Get popular video
GETvideo/popular
Get an array of popular videos
Permission
It's required a user access token. How to use
200
An array of video object
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/popular"
}
Browse video from a category¶
Browse video from a category
GETvideo/category/{category_id}
Get video from a category
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
category_id |
int | category id | |
page |
int | Paging |
200
An array of video object
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/category/5"
}
Browse video from a group¶
Browse video from a group
GETvideo/group/{group_id}
Get video from a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id | |
page |
int | Paging |
200
An array of video object
400
{
"name": "Only group members can view topics",
"message": "Only group members can view topics",
"url": "https://travel.moosocial.com/api/video/group/5"
}
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/group/5"
}
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/video/group/5"
}
View video detail by video id¶
View video detail by video id
GETvideo/{video_id}
View video detail by video id
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
video_id |
int | video id |
200
Parameter | Type | Example | Description |
---|---|---|---|
groupId |
int | Group id when posted video in a group | |
groupName |
string | Group name when posted video in a group | |
groupUrl |
string | Group url when posted video in a group | |
pcUpload |
boolean | Return true when video upload by Upload Video Plugin | |
videoSource |
string | Video source when upload by Upload Video Plugin | |
categoryId |
int | ||
categoryName |
string | ||
canEdit |
boolean | ||
canDelete |
boolean |
401
{
"name": "Only friends of the poster can view this item",
"message": "Only friends of the poster can view this item",
"url": "https://travel.moosocial.com/api/video/5"
}
{
"name": "Only the poster can view this item",
"message": "Only the poster can view this item",
"url": "https://travel.moosocial.com/api/video/5"
}
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/5"
}
Filter video¶
Filter video
POSTvideo/filter
Filter video by keyword
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | Keyword to search | |
page |
int | Paging |
200
An array of video object
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/filter"
}
Fetch video¶
Fetch video
POSTvideo/fetch
Fetch a video by url
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
source |
string | Type of video ( youtube | vimeo ) | |
url |
link |
youtube : https://www.youtube.com/watch?v=sbfks7HdRoE vimeo : https://vimeo.com/180525552 |
Url of video |
group_id |
int |
Group id when fetch video in a group |
200
Parameter | Type | Example | Description |
---|---|---|---|
source |
string | Video source ( youtube | vimeo ) | |
sourceId |
string | Video source id | |
title |
string | Title of video parsed by video's source | |
description |
string | Description of video parsed by video's source | |
privacy |
int | Privacy of video ( default : 1) | |
thumb |
link | Video thumb |
400
{
"name": Invalid URL. Please try again.,
"message": Invalid URL. Please try again.,
"url": "https://travel.moosocial.com/api/video/fetch"
}
Save video¶
Save video
POSTvideo/save
Save a video
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
source |
string | Type of video ( youtube | vimeo ) | |
source_id |
string | Video source id | |
title |
string | OPTIONAL | IF title set blank , title of video will be set by title of url video | |
description |
string | OPTIONAL | IF video description is blank , description will be set by description of url video | |
tags |
string |
video tag , seperate by comma ex : this,is,video,tag |
|
category_id |
int |
video category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
|
group_id |
int |
Group id when save video in a group |
|
thumb |
link |
Video thumb |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success | |
id |
int | Video id |
400
{
"name": video category is missing.,
"message": video category is missing.,
"url": "https://travel.moosocial.com/api/video/create"
}
{
"name": No special characters ( /,?,#,%,...) allowed in Tags,
"message": No special characters ( /,?,#,%,...) allowed in Tags,
"url": "https://travel.moosocial.com/api/video/create"
}
401
{
"errorCode": "not_group_member",
"name": You are not member of this group.,
"message": You are not member of this group.,
"url": "https://travel.moosocial.com/api/video/create"
}
Edit video¶
Edit video
POSTvideo/edit
Edit a video
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
string | video id | |
title |
string | OPTIONAL | IF title set blank , title of video will be set by title of url video | |
description |
string | OPTIONAL | IF video description is blank , description will be set by description of url video | |
tags |
string |
video tag , seperate by comma ex : this,is,video,tag |
|
category_id |
int |
video category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
|
group_id |
int |
video group id |
200
{
"success": true,
"id": 10,
}
400
{
"name": video category is missing.,
"message": video category is missing.,
"url": "https://travel.moosocial.com/api/video/edit"
}
{
"name": No special characters ( /,?,#,%,...) allowed in Tags,
"message": No special characters ( /,?,#,%,...) allowed in Tags,
"url": "https://travel.moosocial.com/api/video/edit"
}
401
{
"errorCode": "not_group_member",
"name": You are not member of this group.,
"message": You are not member of this group.,
"url": "https://travel.moosocial.com/api/video/edit"
}
Edit video
PUTvideo/{id}
Edit a video
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
string | video id | |
title |
string | OPTIONAL | IF title set blank , title of video will be set by title of url video | |
description |
string | OPTIONAL | IF video description is blank , description will be set by description of url video | |
tags |
string |
video tag , seperate by comma ex : this,is,video,tag |
|
category_id |
int |
video category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
|
group_id |
int |
video group id |
200
{
"success": true,
"id": 10,
}
400
{
"name": video category is missing.,
"message": video category is missing.,
"url": "https://travel.moosocial.com/api/video/1"
}
{
"name": No special characters ( /,?,#,%,...) allowed in Tags,
"message": No special characters ( /,?,#,%,...) allowed in Tags,
"url": "https://travel.moosocial.com/api/video/1"
}
401
{
"errorCode": "not_group_member",
"name": You are not member of this group.,
"message": You are not member of this group.,
"url": "https://travel.moosocial.com/api/video/1"
}
Delete video¶
Delete video
Delete video
POST/video/delete/{video_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
video_id |
int | video id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/video/delete/2"
}
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/delete/20000"
}
Delete video
DELETE/video/{video_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
video_id |
int | video id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/video/2"
}
404
{
"name": "video not found",
"message": "video not found",
"url": "https://travel.moosocial.com/api/video/20000"
}
Album¶
All action related to album plugin
album Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | album id | |
published |
datetime | Date created | |
publishedTranslated |
datetime | The time the post was initially published with text translation | |
title |
string | album title | |
description |
string | Album description | |
thumbnail |
array |
A array of album thumbnail .
|
|
categoryId |
int | album category id | |
categoryName |
string | album category name | |
type |
string | Album type | |
url |
link | Album link | |
privacy |
int | 1 |
The privacy settings of the post.
|
commentCount |
int | Total comment count on a album | |
likeCount |
int | Total like count on a album | |
dislikeCount |
int | Total dislike count on a album | |
userId |
int | Owner id | |
userName |
string | Owner name | |
shareAction |
string | Action type when share detail of Album (album_item_detail) It will be used in api album/{album_id} |
|
isViewerLiked |
string | Return TRUE if current user liked this album It will be used in api album/{album_id} |
|
isViewerDisliked |
string | Return TRUE if current user disliked this album It will be used in api album/{album_id} |
|
photoCount |
string | Number of photo | |
photoObject |
string |
An array of photo in current album
|
|
canUploadPhoto |
boolean | Show If current user has permission to upload photo or not |
Get All album¶
Get all album
GETalbum/all
Get an array of all albums
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Paging |
200
An array of album object
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/all"
}
Get My album¶
Get my album
GETalbum/my
Get an array of my albums
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of album object
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/my"
}
Get Friends album¶
Get friends album
GETalbum/friends
Get an array of friends albums
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of album object
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/friends"
}
Get Popular album¶
Get popular album
GETalbum/popular
Get an array of popular albums
Permission
It's required a user access token. How to use
200
An array of album object
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/popular"
}
Browse album from a category¶
Browse album from a category
GETalbum/category/{category_id}
Get album from a category
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
category_id |
int | category id | |
page |
int | Page number |
200
An array of album object
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/category/5"
}
Filter album¶
Filter album
POSTalbum/filter
Filter album by keyword
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | Keyword to search | |
page |
string | Page number |
200
An array ofalbum object
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/filter"
}
View album Detail¶
Get album detail
GETalbum/{album_id}
View album detail by album id
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
album_id |
int | album id |
200
Parameter | Type | Example | Description |
---|---|---|---|
Album object |
object | ||
Photo object |
object |
An array of photo belong to album id Photo object |
|
canEdit |
boolean | Edit permission | |
canDelete |
boolean | Delete permission |
401
{
"errorCode": "friends_only",
"name": "Only friends of the poster can view this item",
"message": "Only friends of the poster can view this item",
"url": "https://travel.moosocial.com/api/album/2"
}
{
"errorCode": "only_me",
"name": "Only the poster can view this item",
"message": "Only the poster can view this item",
"url": "https://travel.moosocial.com/api/album/3"
}
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/4000"
}
Create album¶
Create album
POSTalbum/create
Create a album
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
title |
string | REQUIRED | album title | |
description |
string | REQUIRED | album description | |
tags |
string |
album tag , seperate by comma ex : this,is,album,tag |
|
category_id |
int |
REQUIRED | album category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "album title is missing.",
"message": "album title is missing.",
"url": "https://travel.moosocial.com/api/album/create"
}
{
"name": "album body is missing.",
"message": "album body is missing.",
"url": "https://travel.moosocial.com/api/album/create"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/album/create"
}
Edit album¶
Edit album
POSTalbum/edit
Edit a album
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
id | album id | |
title |
string | REQUIRED | album title | |
description |
string | REQUIRED | album description | |
tags |
string |
album tag , seperate by comma ex : this,is,album,tag |
|
category_id |
int |
REQUIRED | album category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "album title is missing.",
"message": "album title is missing.",
"url": "https://travel.moosocial.com/api/album/edit"
}
{
"name": "album body is missing.",
"message": "album body is missing.",
"url": "https://travel.moosocial.com/api/album/edit"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/album/edit"
}
Edit album
PUTalbum/{id}
Edit a album
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
id | album id | |
title |
string | REQUIRED | album title | |
description |
string | REQUIRED | album description | |
tags |
string |
album tag , seperate by comma ex : this,is,album,tag |
|
category_id |
int |
REQUIRED | album category id |
|
privacy |
int |
The actual number privacy settings of the post.
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "album title is missing.",
"message": "album title is missing.",
"url": "https://travel.moosocial.com/api/album/12"
}
{
"name": "album body is missing.",
"message": "album body is missing.",
"url": "https://travel.moosocial.com/api/album/12"
}
{
"name": "No special characters ( /,?,#,%,...) allowed in Tags",
"message": "No special characters ( /,?,#,%,...) allowed in Tags",
"url": "https://travel.moosocial.com/api/album/1"
}
Set album cover image¶
Set album cover image
POSTalbum/setcover
Set album cover image
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Album id | |
photo_id |
int | Photo id |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Photo not belong to this album.",
"message": "Photo not belong to this album.",
"url": "https://travel.moosocial.com/api/album/setcover"
}
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/setcover"
}
{
"name": "Photo not found",
"message": "Photo not found",
"url": "https://travel.moosocial.com/api/album/setcover"
}
Delete album¶
Delete album
Delete album
POST/album/delete/{album_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
album_id |
int | album id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/album/delete/2"
}
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/delete/20000"
}
Delete album
DELETE/album/{album_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
album_id |
int | album id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/album/2"
}
404
{
"name": "album not found",
"message": "album not found",
"url": "https://travel.moosocial.com/api/album/20000"
}
Photo¶
All action related to photo plugin
Photo Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Photo id | |
published |
datetime | photo date created | |
publishedTranslated |
datetime | photo date created with translation | |
caption |
string | photo caption | |
thumbnail | array |
An array of photo thumbnail . .
|
|
privacy |
int | 1 |
The privacy settings of the post.
|
type |
string | Photo type | |
url |
link | Photo url | |
commentCount |
int | Total comment count on a photo | |
likeCount |
int | Total like count on a photo | |
dislikeCount |
int | Total dislike count on a photo | |
userId |
int | Owner id | |
userName |
string | Owner name | |
albumType |
string | Type of Album | |
nextPhotoId |
int | Photo Id of next photo in same album | |
prePhotoId |
int | Photo Id of previous photo in same album | |
isViewerLiked |
boolean | Return TRUE if current user liked this photo It will be used in api photo/{photo_id} |
|
isViewerDisliked |
boolean | Return TRUE if current user disliked this photo It will be used in api photo/{photo_id} |
|
shareAction |
string | Action type when share detail of Photo (photo_item_detail) It will be used in api photo/{photo_id} |
Browse photo from a group¶
Browse group photo
GETphoto/group/{group_id}
Browse group photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | Group id | |
page |
int | Page number |
200
An array of photo object
404
{
"name": "photo not found",
"message": "photo not found",
"url": "https://travel.moosocial.com/api/photo/group/{group_id}"
}
Browse photo from an album¶
Browse album photo
GETphoto/album/{album_id}
Browse album photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
album_id |
int | Album id | |
page |
int | Page number |
200
An array of photo object
404
{
"name": "photo not found",
"message": "photo not found",
"url": "https://travel.moosocial.com/api/photo/album/{album_id}"
}
View tagged photo album by person¶
View tagged photo album by person
GETphoto/tagAlbumPhoto/{photo_id}?uid={uid}
View tagged photo album by person
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | Photo id | |
page |
int | Page number | |
uid |
int | User id that current user view |
200
An array of photo object
404
{
"name": "photo not found",
"message": "photo not found",
"url": "https://travel.moosocial.com/api/photo/tagAlbumPhoto/5000?uid=100"
}
{
"name": "user not found",
"message": "user not found",
"url": "https://travel.moosocial.com/api/photo/tagAlbumPhoto/5?uid=10000"
}
View single photo¶
View single photo
GETphoto/{photo_id}
Browse a photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | Photo id |
200
Parameter | Type | Example | Description |
---|---|---|---|
canView |
boolean | Current user can view this photo or not | |
viewMessage |
string | Display message when user do not have permission to view | |
setCover |
boolean | True if it's user's cover | |
setAvatar |
boolean | True if it's user's avatar | |
canRotate |
boolean | ||
canDelete |
boolean |
404
{
"name": "photo not found",
"message": "photo not found",
"url": "https://travel.moosocial.com/api/photo/{photo_id}"
}
Upload photo in a group¶
Upload photo in a group
POSTphoto/group/upload
Upload photo in a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
target_id |
int | group id | |
photos |
object | An array of Photo path which is uploaded by using the api :/file |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Please select photo",
"message": "Please select photo",
"url": "https://travel.moosocial.com/api/photo/group/upload"
}
401
{
"name": "This is a private group",
"message": "This is a private group",
"url": "https://travel.moosocial.com/api/photo/group/upload"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/photo/group/upload"
}
Tag people to a Photo¶
Tag people to a Photo
POSTphoto/tag
Tag people to a Photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | Photo id | |
uid |
int | User id | |
value |
string | Text value when tagged | |
style |
string |
Position of tagged user . Ex : left: 458px; top:400px |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success | |
id |
int | Return tagged id when success |
400
{
"name": "Duplicated tag!",
"message": "Duplicated tag!",
"url": "https://travel.moosocial.com/api/photo/tag"
}
404
{
"name": "Photo not found",
"message": "Photo not found",
"url": "https://travel.moosocial.com/api/photo/tag"
}
{
"name": "User not found",
"message": "User not found",
"url": "https://travel.moosocial.com/api/photo/tag"
}
Remove tag people to a Photo¶
Remove tag people to a Photo
POSTphoto/removetag
Remove tag from a photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
tag_id |
int | Tagged id |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
404
{
"name": "Not tagged yet.",
"message": "Not tagged yet.",
"url": "https://travel.moosocial.com/api/photo/removetag"
}
Set Profile Cover Photo¶
Set Profile Cover Photo
POSTphoto/setcover
Set Profile Cover Photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | Photo id |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
404
{
"name": "Photo not found",
"message": "Photo not found",
"url": "https://travel.moosocial.com/api/photo/setcover"
}
Set photo as profile picture¶
Set photo as profile picture
POSTphoto/setprofilepicture
Set photo as profile picture
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | Photo id |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
404
{
"name": "Photo not found",
"message": "Photo not found",
"url": "https://travel.moosocial.com/api/photo/setprofilepicture"
}
Delete photo¶
Delete photo
Delete photo
POST/photo/delete/{photo_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | photo id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/photo/delete/2"
}
404
{
"name": "photo not found",
"message": "photo not found",
"url": "https://travel.moosocial.com/api/photo/delete/20000"
}
Delete photo
DELETE/photo/{photo_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
photo_id |
int | photo id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/photo/2"
}
404
{
"name": "photo not found",
"message": "photo not found",
"url": "https://travel.moosocial.com/api/photo/20000"
}
Save album photo¶
Save album photo
POSTphoto/album/save
Save album photo
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
type |
string | REQUIRED Photo type | |
target_id |
int | REQUIRED Id of album | |
photos |
string | REQUIRED A list of photo url, separated by comma by using file/album |
200
Parameter | Type | Example | Description |
---|---|---|---|
success |
boolean | Return TRUE when success |
400
{
"name": "Missing parameter : Album cound not be found",
"message": "Missing parameter : Album cound not be found",
"url": "https://travel.moosocial.com/api/album/save"
}
401
{
"name": "Missing parameter : Type is REQUIRED",
"message": "Missing parameter : Type is REQUIRED",
"url": "https://travel.moosocial.com/api/album/save"
}
{
"name": "Target id is REQUIRED",
"message": "Target id is REQUIRED",
"url": "https://travel.moosocial.com/api/album/save"
}
{
"name": "Missing parameter : Photos is REQUIRED",
"message": "Missing parameter : Photos is REQUIRED",
"url": "https://travel.moosocial.com/api/album/save"
}
Group¶
All action related to group plugin
Group Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | group id | |
name |
string | group name | |
description |
string | group description | |
thumbnail |
array |
An array of group thumbnail .
|
|
url |
string | group url | |
memberCount |
int | Number of member in this group | |
privacy |
int | 1 |
The privacy settings of the post.
|
published |
datetime | Group created datetime. | |
publishedTranslated |
datetime | Group created datetime with translation. |
Get All group¶
Get all group
GETgroup/all
Get an array of all groups
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/all"
}
Get My group¶
Get my group
GETgroup/my
Get an array of my groups
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/my"
}
Get Friends group¶
Get friends group
GETgroup/friends
Get an array of friends groups
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/friends"
}
Get Popular group¶
Get popular group
GETgroup/popular
Get an array of popular groups
Permission
It's required a user access token. How to use
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/popular"
}
Get Featured Group¶
Get featured group
GETgroup/featured
Get feature group
Permission
It's required a user access token. How to use
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/featured"
}
Get group that current user joned¶
Get group that current user joned
GETgroup/join
Get group that current user joned
Permission
It's required a user access token. How to use
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/join"
}
Browse group from a category¶
Browse group from a category
GETgroup/category/{category_id}
Get group from a category
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
category_id |
int | category id |
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/category/5"
}
Browse group member¶
Browse group member
GETgroup/member/{group_id}
Browse group member
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
int | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
400
{
"name": "This is private group. Only group members can view",
"message": "This is private group. Only group members can view",
"url": "https://travel.moosocial.com/api/group/member/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/member/5"
}
{
"name": "Group member not found",
"message": "Group member not found",
"url": "https://travel.moosocial.com/api/group/member/200"
}
Browse group activity¶
Browse group activity
GETgroup/activity/{group_id}
Browse group activity
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
An array of activity feed
400
{
"name": "This is private group. Only group activitys can view",
"message": "This is private group. Only group activitys can view",
"url": "https://travel.moosocial.com/api/group/activity/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/activity/5"
}
{
"name": "There are no new feeds to view at this time.",
"message": "There are no new feeds to view at this time.",
"url": "https://travel.moosocial.com/api/group/activity/200"
}
Browse group admin¶
Browse group admin
GETgroup/admin/{group_id}
Browse group admin
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
int | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
400
{
"name": "This is private group. Only group admins can view",
"message": "This is private group. Only group admins can view",
"url": "https://travel.moosocial.com/api/group/admin/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/admin/5"
}
Get group detail by id¶
Get group detail by id
GETgroup/{group_id}
Get group detail by id
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | group id | |
name |
string | group name | |
published |
datetime | Group created datetime. | |
publishedTranslated |
datetime | Group created datetime with translation. | |
description |
string | group description | |
thumbnail |
string |
An array of group thumbnail .
|
|
featured |
boolean | Return TRUE when group is featured , FALSE when not feature . | |
groupUserCount |
int | Total member of this group | |
categoryId |
int | Group category id | |
categoryName |
string | Group category name | |
privacy |
int | 1 |
The privacy settings of the post.
|
joinRequest |
int | Total join request count | |
photoCount |
int | Total photo of group count | |
topicCount |
int | Total topic of group count | |
videoCount |
int | Total video of group count | |
userCreateId |
int | Group create user id | |
userCreateName |
string | Group create user name | |
shareAction |
string | Action type when share detail of Group (group_item_detail) | |
type |
string | Type of group (Group_Group) | |
isViewTopicGroup |
boolean | ||
isViewVideoGroup |
boolean | ||
mooapp_hide_what_new |
boolean | ||
visibleJoin |
boolean | ||
visibleRequest |
boolean | ||
canPostFeed |
boolean | ||
adminList |
array | An array of users | |
memberList |
array | An array of users | |
canReport |
boolean | ||
canView |
boolean | ||
canInvite |
boolean | ||
canEdit |
boolean | ||
canDelete |
boolean | ||
canLeave |
boolean | ||
canShare |
boolean |
400
{
"name": "This is private group. Only group admins can view",
"message": "This is private group. Only group admins can view",
"url": "https://travel.moosocial.com/api/group/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/5"
}
Leave group¶
Leave group
GETgroup/leave/{group_id}
Leave group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "You are group admin so can not leave this group.",
"message": "You are group admin so can not leave this group.",
"url": "https://travel.moosocial.com/api/group/leave/5"
}
404
{
"name": "You not in this group.",
"message": "You not in this group.",
"url": "https://travel.moosocial.com/api/group/leave/5"
}
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/leave/200"
}
Feature group¶
Feature group
GETgroup/feature/{group_id}
Feature group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Only admin can feature group.",
"message": "Only admin can feature group.",
"url": "https://travel.moosocial.com/api/group/feature/5"
}
{
"name": "You are not allowed feature private group.",
"message": "You are not allowed feature private group.",
"url": "https://travel.moosocial.com/api/group/feature/5"
}
{
"name": "Group featured already.",
"message": "Group featured already.",
"url": "https://travel.moosocial.com/api/group/feature/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/feature/200"
}
Unfeature group¶
Unfeature group
GETgroup/unfeature/{group_id}
Unfeature group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | Group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Only admin can unfeature group.",
"message": "Only admin can unfeature group.",
"url": "https://travel.moosocial.com/api/group/unfeature/5"
}
{
"name": "You are not allowed unfeature private group.",
"message": "You are not allowed unfeature private group.",
"url": "https://travel.moosocial.com/api/group/unfeature/5"
}
{
"name": "Group unfeatured already.",
"message": "Group unfeatured already.",
"url": "https://travel.moosocial.com/api/group/unfeature/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/unfeature/200"
}
Send request to join a group¶
Send request to join a group
POSTgroup/join/request/{group_id}
Send request to join a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | Group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Already joined..",
"message": "Already joined..",
"url": "https://travel.moosocial.com/api/group/join/request/5"
}
{
"name": "This is a private group. You must be invited by a group admin in order to join",
"message": "This is a private group. You must be invited by a group admin in order to join",
"url": "https://travel.moosocial.com/api/group/join/request/5"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/join/request/200"
}
Browse all join request from a group¶
Browse all join request from a group
GETgroup/join/{group_id}
Browse all join request from a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | Group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
rId |
int | Request id | |
id |
int | User id | |
name |
string | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/join/request/200"
}
{
"name": "Group request not found",
"message": "Group request not found",
"url": "https://travel.moosocial.com/api/group/join/request/200"
}
Accept join request¶
Accept join request
POSTgroup/join/accept/{request_id}
Accept join request
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
request_id |
int | Group request id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "Joined already.",
"message": "Joined already.",
"url": "https://travel.moosocial.com/api/group/join/accept/5"
}
404
{
"name": "Group request not found",
"message": "Group request not found",
"url": "https://travel.moosocial.com/api/group/join/accept/200"
}
Turn group notification on¶
Turn group notification on
GETgroup/notification/on/{group_id}
Turn group notification on
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | Group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "This is private group. Only group members can view",
"message": "This is private group. Only group members can view",
"url": "https://travel.moosocial.com/api/group/notification/on/5"
}
{
"name": "Group notification on already",
"message": "Group notification on already",
"url": "https://travel.moosocial.com/api/group/notification/on/200"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/notification/on/200"
}
Turn group notificatioff off¶
Turn group notificatioff off
POSTgroup/notification/off/{group_id}
Turn group notificatioff off
Permissioff
It's required a user access token. How to use
Parameter | Type | Example | Descriptioff |
---|---|---|---|
group_id |
int | Group id |
200
Parameter | Type | Example | Descriptioff |
---|---|---|---|
message |
string | Return message when success |
400
{
"name": "This is private group. Only group members can view",
"message": "This is private group. Only group members can view",
"url": "https://travel.moosocial.com/api/group/notificatioff/off/5"
}
{
"name": "Group notification off already",
"message": "Group notification off already",
"url": "https://travel.moosocial.com/api/group/notificatioff/off/200"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/notificatioff/off/200"
}
Filter group¶
Filter group
POSTgroup/filter
Filter group by keyword
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | Keyword to search | |
page |
int | Page number |
200
An array of group object
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/filter"
}
Invite friend to a group¶
Invite friend to a group
POSTgroup/invite
Invite friend to a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
emails |
string |
Invite by email . Enter their emails below (separated by commas) Limit 10 email addresses per request |
|
friends |
string | Invite by user id . Enter their id (separated by commas) |
|
group_id |
int | Group id |
200
Parameter | Type | Example | Description |
---|---|---|---|
meesage |
string | Return message when success |
400
{
"name": "Please insert friend id or email to invite .",
"message": "Please insert friend id or email to invite .",
"url": "https://travel.moosocial.com/api/group/invite"
}
{
"name": "This is private group. Only group members can view",
"message": "This is private group. Only group members can view",
"url": "https://travel.moosocial.com/api/group/invite"
}
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/filter"
}
{
"name": "You not in this group.",
"message": "You not in this group.",
"url": "https://travel.moosocial.com/api/group/filter"
}
Create group¶
Create group
POSTgroup/create
Create a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
name |
string | REQUIRED | Group name | |
description |
string | REQUIRED | Group description | |
photo |
file | Thumbnail of group , is the path which is uploaded by using the api /file | |
category_id |
int |
REQUIRED | Category Id |
|
type |
int |
The privacy settings of group
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "Group category is missing.",
"message": "Group category is missing.",
"url": "https://travel.moosocial.com/api/group/create"
}
{
"name": "Group name is missing.",
"message": "Group name is missing.",
"url": "https://travel.moosocial.com/api/group/create"
}
{
"name": "Group description is missing.",
"message": "Group description is missing.",
"url": "https://travel.moosocial.com/api/group/create"
}
Edit group¶
Edit group
POSTgroup/edit
Edit a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
string | REQUIRED | Group id | |
name |
string | REQUIRED | Group name | |
description |
string | REQUIRED | Group description | |
photo |
file | Thumbnail of group , is the path which is uploaded by using the api /file | |
category_id |
int |
REQUIRED | Category Id |
|
type |
int |
The privacy settings of group
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "Group category is missing.",
"message": "Group category is missing.",
"url": "https://travel.moosocial.com/api/group/edit"
}
{
"name": "Group name is missing.",
"message": "Group name is missing.",
"url": "https://travel.moosocial.com/api/group/edit"
}
{
"name": "Group description is missing.",
"message": "Group description is missing.",
"url": "https://travel.moosocial.com/api/group/edit"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/edit"
}
Edit group
PUTgroup/{group_id}
Edit a group
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | REQUIRED | Group id | |
name |
string | REQUIRED | Group name | |
description |
string | REQUIRED | Group description | |
photo |
file | Thumbnail of group , is the path which is uploaded by using the api /file | |
category_id |
int |
REQUIRED | Category Id |
|
type |
int |
The privacy settings of group
|
200
{
"success": true,
"id": 10,
}
400
{
"name": "Group category is missing.",
"message": "Group category is missing.",
"url": "https://travel.moosocial.com/api/group/12"
}
{
"name": "Group name is missing.",
"message": "Group name is missing.",
"url": "https://travel.moosocial.com/api/group/11"
}
{
"name": "Group description is missing.",
"message": "Group description is missing.",
"url": "https://travel.moosocial.com/api/group/11"
}
404
{
"name": "Group not found",
"message": "Group not found",
"url": "https://travel.moosocial.com/api/group/edit"
}
Delete join request from a group¶
Delete join request from a group
Delete join request from a group
POST/group/join/delete/{request_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
request_id |
int | Join request id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/join/group/delete/2"
}
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/join/delete/20000"
}
Delete group
DELETE/group/join/{request_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
request_id |
int | Join request id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/group/join/2"
}
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/join/20000"
}
Delete group¶
Delete group
Delete group
POST/group/delete/{group_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/group/delete/2"
}
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/delete/20000"
}
Delete group
DELETE/group/{group_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
group_id |
int | group id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/group/2"
}
404
{
"name": "group not found",
"message": "group not found",
"url": "https://travel.moosocial.com/api/group/20000"
}
event¶
All action related to event plugin
event Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | event id | |
eventDate |
datetime | Event created date | |
title |
string | event title | |
thumbnail |
string |
A array of event thumbnail .
|
|
totalAttending |
int | Total user attending this event | |
privacy |
int | 1 |
The privacy settings of the post.
|
fromTime |
datetime | Time event start | |
fromTimeFormat |
datetime | Time event start has been shortened | |
toTime |
datetime | Time event end | |
toTimeFormat |
datetime | Time event end has been shortened | |
location |
string | Event location | |
address |
string | Event address | |
url |
string | Event url |
Get upcoming event¶
Get upcoming event
GETevent/upcoming
Get an array of upcoming events
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/upcoming"
}
Get my upcoming event¶
Get my upcoming event
GETevent/myupcoming
Get an array of my upcoming events
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/myupcoming"
}
Get my past event¶
Get my past event
GETevent/mypast
Get an array of my past events
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/mypast"
}
Get friend attending event¶
Get friend attending event
GETevent/friendattend
Get an array of friend attending events
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/friendattend"
}
Get past event¶
Get past event
GETevent/past
Get an array of past events
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
page |
int | Page number |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/past"
}
Get event by category¶
Get event by category
GETevent/category/{category_id}
Get an array of events by category
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
category_id |
int | Category id | |
page |
int | Page number |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/category/4"
}
Get activity of event¶
Get activity of event
GETevent/activity/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id |
200
An array of activity feed
400
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/activity/7"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/activity/4"
}
{
"name": "There are no new feeds to view at this time.",
"message": "There are no new feeds to view at this time.",
"url": "https://travel.moosocial.com/api/event/activity/5"
}
Get member who will attending this event¶
Get member who will attending this event
GETevent/rsvp/attend/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id | |
page |
int | Page number |
200
An array of user information .
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
string | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
400
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/rsvp/attend/3"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/rsvp/attend/5"
}
{
"name": "user not found",
"message": "user not found",
"url": "https://travel.moosocial.com/api/event/rsvp/attend/9"
}
Get member who will maybe attending this event¶
Get member who will maybe attending this event
GETevent/rsvp/maybe/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id | |
page |
int | Page number |
200
An array of user information .
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
string | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
400
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/rsvp/maybe/3"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/rsvp/maybe/5"
}
{
"name": "user not found",
"message": "user not found",
"url": "https://travel.moosocial.com/api/event/rsvp/maybe/9"
}
Get member who will not attend this event¶
Get member who will not attend this event
GETevent/rsvp/no/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id |
200
An array of user information .
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
string | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
400
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/rsvp/no/3"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/rsvp/no/5"
}
{
"name": "user not found",
"message": "user not found",
"url": "https://travel.moosocial.com/api/event/rsvp/no/9"
}
Get all member who is wating respone to this event¶
Get all member who is wating respone to this event
GETevent/rsvp/wait/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id | |
page |
int | Page number |
200
An array of user information .
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | User id | |
name |
string | User name | |
avatar |
object | The list of person's image path of this person's avatar . | |
profile_url |
link | Link to profile of user |
400
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/rsvp/wait/3"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/rsvp/wait/5"
}
{
"name": "user not found",
"message": "user not found",
"url": "https://travel.moosocial.com/api/event/rsvp/wait/9"
}
Get event detail by id¶
Get event detail by id
GETevent/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id |
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | event id | |
eventDate |
datetime | Event created date | |
title |
string | event title | |
thumbnail |
string |
A array of event thumbnail .
|
|
totalAttending |
int | Total user attending this event | |
privacy |
int | 1 |
The privacy settings of the post.
|
fromTime |
datetime | Time event start | |
fromTimeFormat |
datetime | Time event start has been shortened | |
toTime |
datetime | Time event end | |
toTimeFormat |
datetime | Time event end has been shortened | |
location |
string | Event location | |
address |
string | Event address | |
url |
string | Event url | |
categoryId |
int | Event Category id | |
createId |
int | User Id | |
categoryName |
string | Event category name | |
createName |
string | Created user name | |
shareAction |
string | Action type when share detail of Event (event_item_detail) | |
type |
string | Type of Event (Event_Event) | |
myRSVP |
string | My RSVP | |
canEdit |
boolean | Edit permission | |
canDelete |
boolean | Delete permission | |
canInvite |
boolean | Invite permission | |
canShare |
boolean | Share permission | |
attendUser |
array | Array of users | |
notAttendUser |
array | Array of users | |
maybeUser |
array | Array of users | |
awaitingUser |
array | Array of users | |
mooapp_hide_what_new |
boolean |
400
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/3"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/500"
}
Filter event¶
Filter event
POSTevent/filter
Filter event by keyword
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | Keyword to search |
200
An array of event object
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/filter"
}
Invite friend to a event¶
Invite friend to a event
POSTevent/invite
Invite friend to a event
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
emails |
string |
Invite by email . Enter their emails below (separated by commas) Limit 10 email addresses per request |
|
friends |
string | Invite by user id . Enter their id (separated by commas) |
|
event_id |
int | event id |
200
Parameter | Type | Example | Description |
---|---|---|---|
meesage |
string | Return message when success |
400
{
"name": "Please insert friend id or email to invite .",
"message": "Please insert friend id or email to invite .",
"url": "https://travel.moosocial.com/api/event/invite"
}
{
"name": "This is private event. Only event members can view",
"message": "This is private event. Only event members can view",
"url": "https://travel.moosocial.com/api/event/invite"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/invite"
}
{
"name": "You not in this event.",
"message": "You not in this event.",
"url": "https://travel.moosocial.com/api/event/invite"
}
Submit RSVP¶
Submit RSVP to current event
POSTevent/rsvp
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
rsvp |
int |
Value of your reponse to this event YES : 1, NO : 2, MAYBE : 3 |
|
event_id |
int | event id |
200
Parameter | Type | Example | Description |
---|---|---|---|
meesage |
string | Return message when success |
|
id |
int | Event rsvp id |
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/rsvp"
}
Create event¶
Create event
POSTevent/create
Create a event
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
title |
string | REQUIRED | event title | |
description |
string | REQUIRED | event description | |
photo |
file | Thumbnail of event , is the path which is uploaded by using the api /file | |
category_id |
int |
REQUIRED | Category Id |
|
privacy |
int |
The actual number privacy settings of the post.
|
|
location |
string |
Event location |
|
address |
string |
Event address |
|
from |
datetime |
REQUIRED | Event start date |
|
from_time |
datetime |
Event start time |
|
to |
datetime |
REQUIRED | Event end date |
|
to_time |
datetime |
Event end time |
|
timezone |
string |
Event timezone |
200
{
"success": true,
"id": 10,
}
400
{
"name": "event category is missing.",
"message": "event category is missing.",
"url": "https://travel.moosocial.com/api/event/create"
}
{
"name": "event title is missing.",
"message": "event title is missing.",
"url": "https://travel.moosocial.com/api/event/create"
}
{
"name": "event description is missing.",
"message": "event description is missing.",
"url": "https://travel.moosocial.com/api/event/create"
}
{
"name": "Event date start is missing.",
"message": "Event date start is missing.",
"url": "https://travel.moosocial.com/api/event/create"
}
{
"name": "Event date end is missing.",
"message": "Event date end is missing.",
"url": "https://travel.moosocial.com/api/event/create"
}
Edit event¶
Edit event
POSTevent/edit
Edit a event
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
string | REQUIRED | event id | |
title |
string | REQUIRED | event title | |
description |
string | REQUIRED | event description | |
photo |
file | Thumbnail of event , is the path which is uploaded by using the api /file | |
category_id |
int |
REQUIRED | Category Id |
|
privacy |
int |
The actual number privacy settings of the post.
|
|
location |
string |
Event location |
|
address |
string |
Event address |
|
from |
datetime |
REQUIRED | Event start date |
|
from_time |
datetime |
Event start time |
|
to |
datetime |
REQUIRED | Event end date |
|
to_time |
datetime |
Event end time |
|
timezone |
string |
Event timezone |
200
{
"success": true,
"id": 10,
}
400
{
"name": "event category is missing.",
"message": "event category is missing.",
"url": "https://travel.moosocial.com/api/event/edit"
}
{
"name": "event title is missing.",
"message": "event title is missing.",
"url": "https://travel.moosocial.com/api/event/edit"
}
{
"name": "event description is missing.",
"message": "event description is missing.",
"url": "https://travel.moosocial.com/api/event/edit"
}
{
"name": "Event date start is missing.",
"message": "Event date start is missing.",
"url": "https://travel.moosocial.com/api/event/edit"
}
{
"name": "Event date end is missing.",
"message": "Event date end is missing.",
"url": "https://travel.moosocial.com/api/event/edit"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/edit"
}
Edit event
PUTevent/{id}
Edit a event
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
string | REQUIRED | event id | |
title |
string | REQUIRED | event title | |
description |
string | REQUIRED | event description | |
photo |
file | Thumbnail of event , is the path which is uploaded by using the api /file | |
category_id |
int |
REQUIRED | Category Id |
|
privacy |
int |
The actual number privacy settings of the post.
|
|
location |
string |
Event location |
|
address |
string |
Event address |
|
from |
datetime |
REQUIRED | Event start date |
|
from_time |
datetime |
Event start time |
|
to |
datetime |
REQUIRED | Event end date |
|
to_time |
datetime |
Event end time |
|
timezone |
string |
Event timezone |
200
{
"success": true,
"id": 10,
}
400
{
"name": "event category is missing.",
"message": "event category is missing.",
"url": "https://travel.moosocial.com/api/event/1"
}
{
"name": "event title is missing.",
"message": "event title is missing.",
"url": "https://travel.moosocial.com/api/event/1"
}
{
"name": "event description is missing.",
"message": "event description is missing.",
"url": "https://travel.moosocial.com/api/event/3"
}
{
"name": "Event date start is missing.",
"message": "Event date start is missing.",
"url": "https://travel.moosocial.com/api/event/2"
}
{
"name": "Event date end is missing.",
"message": "Event date end is missing.",
"url": "https://travel.moosocial.com/api/event/3"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/4"
}
Delete event¶
Delete event
Delete event
POST/event/delete/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/event/delete/2"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/delete/20000"
}
Delete event
DELETE/event/{event_id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
event_id |
int | event id |
200
{
"success": true,
}
401
{
"name": "Access denied",
"message": "Access denied",
"url": "https://travel.moosocial.com/api/event/2"
}
404
{
"name": "event not found",
"message": "event not found",
"url": "https://travel.moosocial.com/api/event/20000"
}
Report¶
Report an item like blog, topic, video , ...
Report an items¶
Report an items
POST{objectType}/report
Report an item like blog, topic, video , ...
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
objectType |
string |
Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
|
target_id |
int | object id (blog_id , user_id , photo_id .....) |
|
reason |
string | Reason text why you report this object |
200
Parameter | Type | Example | Description |
---|---|---|---|
meesage |
string | Return message when success |
400
{
"name": "Reason is required",
"message": "Reason is required",
"url": "https://travel.moosocial.com/api/Blog_Blog/report"
}
{
"name": "duplicated report",
"message": "duplicated report",
"url": "https://travel.moosocial.com/api/Topic_Topic/report"
}
401
{
"errorCode": "friends_only",
"name": "Only friends of the poster can view this item",
"message": "Only friends of the poster can view this item",
"url": "https://travel.moosocial.com/api/Blog_Blog/report"
}
404
{
"name": "items not exist.",
"message": "items not exist.",
"url": "https://travel.moosocial.com/api/Blog_Blog/report"
}
Notification¶
Notification Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Notification id | |
unread |
boolean | The notification's read/unread status | |
action |
string | The notification's action | |
from |
array | An array from user that "sent" or make action to notification .
|
|
created_time |
datetime | When the notification was created. | |
updated_time |
datetime | When the notification was last updated. | |
title |
string | The message text in the notification. | |
link |
string | The URL that clicking on the notification would take someone. | |
link |
string | The URL that clicking on the notification would take someone. | |
object |
object | The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification. |
Notification Unread¶
An individual unread mooSocial notification .
Notification Unread
GET/notification/{notification-id}
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
string | The notification's id | |
from |
User|Group|Event | The entity (user, group, event, etc.) that 'sent', or is the source of the notification. | |
to |
User | The entity that received the notification. | |
created_time |
datetime | When the notification was created. | |
updated_time |
datetime | When the notification was last updated. | |
title |
string | The message text in the notification. | |
link |
string | The URL that clicking on the notification would take someone. | |
unread |
int | Indicates that the notification is unread. Note that 'read' notifications will not be accessible. | |
object |
object | The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification. |
Updated Notification¶
Updating a unread mooSocial notification .
Updated Notification
POST/notification/{notification-id}
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
unread |
boolean | REQUIRED. Value MUST be set to false. |
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return DONE when success |
Notification Count¶
Gets the count of unread notification and message of owner user .
Notification Count
GET/notification/me
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
count_notification |
int | The number of unread notification of owner user | |
count_conversation |
int | The number of unread conversation of owner user. |
Notification Show All ¶
Gets unread/read notification and message of owner user .
Show all Notification
GET/notification/me/show
Permission
It's required a user access token. How to use
200
An array of notification object
404
{
errorCode : "notification_not_found"
name : "Notification not found"
message : "Notification not found"
url : https://travel.moosocial.com/notification/me/show
}
Notification Clear All ¶
Clear all notifications of owner user
Notification Clear All
GET/api/notification/me/clear
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return DONE when success |
Notification Delete One¶
Clear one notification of owner user
Notification Delete One
POST/notification/me/delete
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | REQUIRED |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return DONE when success |
400
{
errorCode : missing_parameter_id_is_REQUIRED
name : "Missing parameter : id is REQUIRED"
message : "Missing parameter : id is REQUIRED"
url : https://travel.moosocial.com/notification/me/delete
}
401
{
errorCode : "access_denied"
name : "Access denied"
message : "Access denied"
url : https://travel.moosocial.com/notification/me/delete
}
Conversation¶
Conversation Object¶
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | Message id | |
from |
array | An array from user that "sent" message.
|
|
to |
array | An array of user that received the message, include content .
|
Conversation All¶
Conversation All
GET/message/{id}
An individual unread mooSocial message
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
int | The message's id. | |
from |
User|Group|Event | The entity (user, group, event, etc.) that 'sent', or is the source of the message. | |
to |
User | The entity that received the notification. | |
created_time |
datetime | When the message was created. | |
updated_time |
datetime | When the message was last updated. | |
subject |
string | The subject text in the notification. | |
message |
string | The message text in the message. | |
link |
string | The URL that clicking on the message would take someone. | |
unread |
boolean | Indicates that the message is unread. Note that 'read' message will not be accessible. | |
object |
Object | The object (this can be a post, a photo, a comment, etc.) that was the subject of the message. |
All message¶
Gets all message of owner user .
All message from current user
GET/message/me/show
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
filter |
string | Message filter type : first : frist 10 message more : load more message all : load all message (default) |
|
page |
int | Message page |
200
An array of message object
404
{
errorCode : "message_not_found"
name : "Message not found"
message : "Message not found"
url : https://travel.moosocial.com/message/me/show
}
Update message status.¶
Update message status.
Update message
POST/message/:id
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
unread |
int | Message status ( 0 | 1) |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return DONE when success | |
id |
int | Message id |
Search ¶
Search Keyword¶
Search Keyword
GET/search/{keyword}
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
id |
id | The item's id. | |
url |
string | The url link to entry | |
avatar |
string | The image of entry | |
owner_id |
string | The user id of entry | |
title_1 |
string | The intro text of entry | |
title_2 |
string | The addition intro text of entry | |
created |
string | Created Time | |
type |
string | The entrie type. |
Search Keyword Post¶
Search Keyword Post
POST/search
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
keyword |
string | REQUIRED |
200
It is same as GET /search/{keyword}
Bookmark Plugin ¶
Bookmark plugin api
Bookmark an item¶
Bookmark an item
POSTbookmark/add_bookmark
Bookmark a feed , blog , topic ,...
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
object_id |
int | Object id (activity_id , comment_id , photo_id .....) | |
object_type |
string | Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
Remove bookmark¶
Remove bookmark an items
POSTbookmark/remove_bookmark
Remove bookmark a feed , blog , topic ,...
Permission
It's required a user access token. How to use
Parameter | Type | Example | Description |
---|---|---|---|
object_id |
int | Object id (activity_id , comment_id , photo_id .....) | |
object_type |
string | Object type can be (activity | core_activity_comment | comment | Blog_Blog | Photo_Album | Photo_Photo | Video_Video | Topic_Topic | .... ) |
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | Return message when success |
App Settings ¶
App Settings¶
App Settings
GET/setting/all
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | success | |
setting |
array |
|
Api Workflow ¶
Api workflow when some special function being enabled
Offline Mode Enabled¶
Response detail when enable offline mode and call api
Permission
It's required a user access token. How to use
200
Parameter | Type | Example | Description |
---|---|---|---|
message |
string | success | |
setting |
array |
|
Subscription Enabled¶
Workflow when your site enable subscription function and current user does not pass subscription requirement
Permission
It's required a user access token. How to use
402
User did not select subscription package or expired .
{
"name": "Please select a subscription package",
"message": "Please select a subscription package",
"url": "https://travel.moosocial.com/api/album/all"
}
402
User already chose package but not payment yet
{
"name": "Please select a Payment Gateway",
"message": "Please select a Payment Gateway",
"url": "https://travel.moosocial.com/api/album/all"
}
Comment¶
All action related to comment plugin
View comment from item¶
Get comment from an item like feed , topic , blog, video, photo...
{objectType}/comment/{item_id}
Permission
It's required a user access token. How to use
objectType
item_id
200
{ id : 100 userId : 2 userName : Admin userNameHtml : Admin image : { "600": "https://travel.moosocial.com/uploads/users/avatar/user_id/prefix_name.jpg", "50_square": "https://travel.moosocial.com/uploads/users/avatar/user_id/prefix_name.jpg", "100_square": "https://travel.moosocial.com/uploads/users/avatar/user_id/prefix_name.jpg", "200_square": "https://travel.moosocial.com/uploads/users/avatar/user_id/prefix_name.jpg" } edited : false message : comment to album likeCount : 0 dislikeCount : 0 published : 2016-08-31 04:12:08 publishedTranslated : 2016-08-31 04:12:08 thumbnails : { "200_square": "https://travel.moosocial.com/uploads/comments/thumbnail/image.jpg", "default": "https://travel.moosocial.com/uploads/comments/thumbnail/image.jpg", } isLoadmore : false isGiftImage : false }
400
{ name : This photo not allow to comment message : This photo not allow to comment url : https://travel.moosocial.com/Photo_Photo/comment/120 }
404
{ name : Comment not found. message : Comment not found. url : https://travel.moosocial.com/Photo_Photo/comment/120 }
Get list of edited comment¶
Get list of edited comment.
{objectType}/comment/{item_id}/edited/{comment_id}
Permission
It's required a user access token. How to use
objectType
item_id
comment_id
200
editCount
editObject
{ id : 100 userId : 2 userName : Admin content : This is an edited comment created : 2016-08-31 04:12:08 status : Added photo attachment. }
400
{ name : This photo not allow to comment message : This photo not allow to comment url : https://travel.moosocial.com/Photo_Photo/comment/116/edited/51 }
Share new comment¶
Share new comment
{objectType}/comment
Permission
It's required a user access token. How to use
objectType
id
text
photo
200
success
data
400
{ name : "Comment can not be empty" message : "Comment can not be empty" url : https://travel.moosocial.com/blog/comment }
{ errorCode : "not_group_member" name : "This photo is in a group . Only group members can leave comment" message : "This photo is in a group . Only group members can leave comment" url : https://travel.moosocial.com/photo/comment }
{ errorCode : "topic_is_blocked" name : "This topic has been locked" message : "This topic has been locked" url : https://travel.moosocial.com/topic/comment }
401
{ name : "Access denied" message : "Access denied" url : https://travel.moosocial.com/conversation/comment }
{ name : "Only friends of the poster can view this item" message : "Only friends of the poster can view this item" url : https://travel.moosocial.com/blog/comment }
404
{ name : "items not exist." message : "items not exist." url : https://travel.moosocial.com/blog/comment }
Edit a comment¶
Edit a comment on module like Topic , Photo , Blog , Video ,....
{objectType}/comment/edit
Permission
It's required a user access token. How to use
objectType
id
comment_id
text
photo
200
success
400
{ name : "Comment can not be empty." message : "Comment can not be empty." url : https://travel.moosocial.com/Blog_Blog/comment/edit }
404
{ name : "Comment not found." message : "Comment not found." url : https://travel.moosocial.com/Blog_Blog/comment/edit }
{objectType}/comment
Permission
It's required a user access token. How to use
objectType
id
comment_id
text
photo
200
success
400
{ name : "Comment can not be empty." message : "Comment can not be empty." url : https://travel.moosocial.com/Blog_Blog/comment }
404
{ name : "Comment not found." message : "Comment not found." url : https://travel.moosocial.com/Blog_Blog/comment }
Delete a comment¶
Delete a comment on module like Topic , Photo , Blog , Video ,....
{objectType}/comment/delete
Permission
It's required a user access token. How to use
objectType
item_id
comment_id
200
message
404
{ name : "Comment not found." message : "Comment not found." url : https://travel.moosocial.com/blog/comment/delete }
{objectType}/comment
Permission
It's required a user access token. How to use
objectType
item_id
comment_id
200
success
404
{ name : "Comment not found." message : "Comment not found." url : https://travel.moosocial.com/blog/comment/ }