-
Notifications
You must be signed in to change notification settings - Fork 0
API ROUTES
KC Liang edited this page Oct 14, 2019
·
7 revisions
The documentation below outlines how to use the routes contained in this API. http://myvmlab.senecacollege.ca:6556/api + (/ROUTE_NAME)
Registers a new user. Return's true if successfull.
Http Request Body
{
"userEmail": "",
"userFirstName": "",
"userLastName": "",
"userPassword": ""
}
Login a user and return token in the response header under the name "authentication".
Http Request Body
{
"userEmail": "",
"userPassword": ""
}
Gets all groups, returns a JSON array of all the groups.
Get group by id, returns a JSON object of the selected group.
Add a group by sending a JSON object in the body.
Http Request Body
{
"groupName": "Test Group"
}
Update group by id by sending a JSON object in the body.
Http Request Body
{
"groupName": "Test Group"
}
Delete group by sending the group id.
Add a group member to a group
Http Request Body
{
"newGroupMember": userId
}
Add a group member to a event
Http Request Body
{
"newGroupMember": groupMemberId
}
Add a new mark to a group
Http Request Body
{
markName: "",
markLocations: {
locationAddress: "",
loactionPriceRange: 0,
additionalInformation: "",
locationImageSet: [
{
locationImageData: "",
locationImageContentType: ""
}
]
},
geometry: { "coordinates": [0, 0] },
groupMarkCreatedBy: groupMemberId
}
Add Group Post
Http Request Body
{
"postTitle": "",
"postContent": "",
"postCreatedBy": groupMemberFId
}
Add Group Event
Http Request Body
{
eventName: "",
eventDescription: "",
eventMembers: [groupMemberId],
eventMark: groupMarkId
}
Add custom mark category
Http Request Body
{
"customMarkCategoryName": ""
}
Add Group Chat Room
Http Request Body
{
"chatRoomName": "",
"chatRoomMembers": [groupMemberId],
"chatRoomCreatedBy": groupMemberId
}
Add Group Member to Chat Room
Add Chat Message to chatRoom
Http Request Body
{
"messageBody": "",
"messageCreatedBy": groupMemberId
}
Get Group Mark, returns the Mark JSON Object.
Get Group Post, returns the Post JSON Object.
Get Group Event, returns the Event JSON Object.
Get custom mark category to event, returns the custom mark category JSON Object.
Get Group Chat Room, returns the Chat Room JSON Object.
Update Group Mark
Http Request Body
{
markName: "",
markLocations: {
locationAddress: "",
loactionPriceRange: 0,
additionalInformation: "",
locationImageSet: [
{
locationImageData: "",
locationImageContentType: ""
}
]
},
geometry: { "coordinates": [0, 0] },
groupMarkCreatedBy: groupMemberId
}
Update Group Post
Http Request Body
{
"postTitle": "",
"postContent": "",
"postCreatedBy": groupMemberFId
}
Update Group Event
Http Request Body
{
eventName: "",
eventDescription: "",
eventMembers: [groupMemberId],
eventMark: groupMarkId
}
Update Group custom mark category to event
Http Request Body
{
"customMarkCategoryName": ""
}
Update Group chat Room
Http Request Body
{
"chatRoomName": "",
"chatRoomMembers": [groupMemberId],
"chatRoomCreatedBy": groupMemberId
}
Update chat message
Http Request Body
{
"messageBody": "",
"messageCreatedBy": groupMemberId
}
Delete group member, returns { success: true }
Delete group member from event, returns the groupEvents JSON object.
delete custom mark category to event, returns the group JSON object.
delete group Mark, returns the groupMarks JSON object.
delete Group Post, returns the groupFeed JSON object.
delete Group Event, returns the groupEvents JSON object.
delete Group, returns the group JSON array.
delete Group Chat Room, returns the groupChat JSON object.
delete Chat Messages, returns the chatRoom JSON object as "groupChat" and the JSON array of messages for the chatRoom as "messages".
delete Group Member From Chat Room, returns the chatRoom JSON object.
Get all groupRoles, this will return a JSON array of groupRoles.
Get groupRoles by id, this will return the JSON object of groupRoles.
Create a groupRoles by sending a JSON object in the body.
{
groupRoleName: "",
groupRolePermisionLevel: 0
}
Update groupRoles by its id, by sending a JSON object in the body.
{
groupRoleName: "",
groupRolePermisionLevel: 0
}
Delete groupRoles by sending the groupRoles id, returns deleted groupRoles JSON object.
Get user account information using JWT for identification, this will return the JSON object for the user.
Update the user using JWT for identification, by sending a JSON object in the body.
{
"userEmail": "",
"userFirstName": "",
"userLastName": "",
"userPassword": "",
"googleId": "",
"userImages": [{ "userImageData": "", "userImageContentType": "" }]
}
Delete user using JWT for identification, returns deleted user JSON object.
WARNING: ADMIN USE ONLY: SHOULD INTERACT WITH GROUP MEMBER THROUGH GROUP
Get all groupMember, this will return a JSON array of groupMember.
Get groupMember by id, this will return the JSON object of groupMember.
Create a groupMember by sending a JSON object in the body.
{
user: userId,
group: groupId,
groupMemberRole: groupRoleId
}
Update groupMember by its id, by sending a JSON object in the body.
{
user: userId,
group: groupId,
groupMemberRole: groupRoleId
}
Delete groupMember by sending the groupMember id, returns deleted groupMember JSON object.
WARNING: ADMIN USE ONLY: SHOULD INTERACT WITH GROUP EVENTS THROUGH GROUP
Get all groupEvent, this will return a JSON array of groupEvent.
Get groupEvent by id, this will return the JSON object of groupEvent.
Create a groupEvent by sending a JSON object in the body.
{
eventName: "",
eventDescription: "",
eventMembers: [groupMemberID],
eventMark: markId
}
Update groupEvent by its id, by sending a JSON object in the body.
{
eventName: "",
eventDescription: "",
eventMembers: [groupMemberID],
eventMark: markId
}
Delete groupEvent by sending the groupEvent id, returns deleted groupEvent JSON object.
WARNING: ADMIN USE ONLY: SHOULD INTERACT WITH GROUP FEED THROUGH GROUP
Get all groupFeed, this will return a JSON array of groupFeed.
Get groupFeed by id, this will return the JSON object of groupFeed.
Create a groupFeed by sending a JSON object in the body.
{
"group": groupId,
"groupPosts": [{
"postTitle": "",
"postContent": "",
"postCreatedBy": memberId
}]
}
Update groupFeed by its id, by sending a JSON object in the body.
{
eventName: "",
eventDescription: "",
eventMembers: [groupMemberID],
eventMark: markId
}
Delete groupFeed by sending the groupFeed id, returns deleted groupFeed JSON object.
WARNING: ADMIN USE ONLY: SHOULD INTERACT WITH GROUP MARKS THROUGH GROUP
Get all groupMark, this will return a JSON array of groupMark.
Get groupMark by id, this will return the JSON object of groupMark.
Create a groupMark by sending a JSON object in the body.
{
markName: "",
markLocations: {
locationAddress: "",
loactionPriceRange: 0,
additionalInformation: "",
locationImageSet: [
{
locationImageData: "",
locationImageContentType: ""
}
]
},
geometry: { "coordinates": [0, 0] },
groupMarkCreatedBy: groupMemberId
}
Update groupMark by its id, by sending a JSON object in the body.
{
markName: "",
markLocations: {
locationAddress: "",
loactionPriceRange: 0,
additionalInformation: "",
locationImageSet: [
{
locationImageData: "",
locationImageContentType: ""
}
]
},
geometry: { "coordinates": [0, 0] },
groupMarkCreatedBy: groupMemberId
}
Delete groupMark by sending the groupMark id, returns deleted groupMark JSON object.