You are here

function opigno_collaborative_workspaces_create_collaborative_workspace in Opigno Moxtra App 7

1 call to opigno_collaborative_workspaces_create_collaborative_workspace()
opigno_collaborative_workspaces_form_create_validate in modules/opigno_collaborative_workspaces/includes/opigno_collaborative_workspaces.node_form.inc

File

modules/opigno_collaborative_workspaces/includes/opigno_collaborative_workspaces.api.inc, line 61

Code

function opigno_collaborative_workspaces_create_collaborative_workspace($uid, $collab_workspace_name, $auto_handle_response = true) {
  $url = opigno_collaborative_workspaces_get_create_collaborative_workspace_uri($uid);
  $data = array(
    'name' => $collab_workspace_name,
    'restricted' => true,
    'conversation' => true,
  );
  $response = opigno_moxtra_app_api_post_json($url, json_encode($data), 'application/json');
  if ($auto_handle_response) {
    return opigno_collaborative_workspaces_handle_response_errors($response, __FUNCTION__);
  }
  else {
    return $response;
  }
}