public class SpaceAPI extends BaseAPI
| Constructor and Description |
|---|
SpaceAPI(ResourceFactory resourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
SpaceCreateResponse |
createSpace(SpaceCreate data)
Add a new space to an organization.
|
void |
endSpaceMembership(int spaceId,
int userId)
Ends the users membership on the space, can also be called for members in
state invited.
|
List<SpaceMember> |
getActiveMembers(int spaceId)
Returns the active members of the given space.
|
List<SpaceMember> |
getEndedMembers(int spaceId)
Returns a list of the members that have been removed from the space.
|
Space |
getSpace(int spaceId)
Get the space with the given id
|
SpaceWithOrganization |
getSpaceByURL(String url)
Returns the space and organization with the given full URL.
|
SpaceMember |
getSpaceMembership(int spaceId,
int userId)
Used to get the details of an active users membership of a space.
|
List<SpaceWithOrganization> |
getTopSpaces(Integer limit)
Returns the top spaces for the user
|
void |
updateSpace(int spaceId,
SpaceUpdate data)
Updates the space with the given id
|
void |
updateSpaceMembership(int spaceId,
int userId,
Role role)
Updates a space membership with another role
|
getResourceFactorypublic SpaceAPI(ResourceFactory resourceFactory)
public SpaceCreateResponse createSpace(SpaceCreate data)
data - The data for the new spacepublic Space getSpace(int spaceId)
spaceId - The id of the spacepublic void updateSpace(int spaceId,
SpaceUpdate data)
spaceId - The id of the space to updatedata - The updated data of the spacepublic SpaceWithOrganization getSpaceByURL(String url)
url - The full URL of the spacepublic SpaceMember getSpaceMembership(int spaceId, int userId)
spaceId - The id of the spaceuserId - The ud of the userpublic void updateSpaceMembership(int spaceId,
int userId,
Role role)
spaceId - The id of the spaceuserId - The id of the userrole - The new role for the membershippublic void endSpaceMembership(int spaceId,
int userId)
spaceId - The id of the spaceuserId - The id of the userpublic List<SpaceMember> getActiveMembers(int spaceId)
spaceId - The id of the spacepublic List<SpaceMember> getEndedMembers(int spaceId)
spaceId - The id of the spacepublic List<SpaceWithOrganization> getTopSpaces(Integer limit)
limit - The max number of members to return, defaults to 6Copyright © 2014. All Rights Reserved.