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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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.

@Test(enabled = true)
@Parameters({ "appId", "appSecret","space2Id" })
public void addMembersToSpace(String appId, String appSecret, String space2Id, String space2Name) throws WWException, UnsupportedEncodingException {
    WWClient client = WWClient.buildClientApplicationAccess(appId, appSecret, new WWAuthenticationEndpoint());
    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