Page tree
Skip to end of metadata
Go to start of metadata

Members can be added to a Space through the "addSpaceMembers" mutation on a WWClient or WWGraphQLEndpoint. The method takes a List of SpaceMemberObject objects. The SpaceMemberObject takes an id for the person and permissions. The permissions are not yet in use, so just pass a blank string. The methods return an ArrayList of members IDs added.

addSpaceMembers
@Test(enabled = true)
@Parameters({ "appId", "appSecret","space2Id", "profileId" })
public void addMembersToSpace(String appId, String appSecret, String space2Id, String profileId) throws WWException, UnsupportedEncodingException {
    WWClient client = WWClient.buildClientApplicationAccess(appId, appSecret, new WWAuthenticationEndpoint());
    client.authenticate();
    List<SpaceMemberObject> members = new ArrayList<SpaceMemberObject>();
    SpaceMemberObject obj = new SpaceMemberObject("1281ac4d-74f1-4aaa-bbb7-29123410aaa3", "");
    List<String> ids = client.addSpaceMembers(space2Id, members);
    assert ids.size() == 1;
}
  • No labels
Write a comment…