public function LingotekApi::createCommunity in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::createCommunity()
- 7.2 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::createCommunity()
- 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::createCommunity()
- 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::createCommunity()
- 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::createCommunity()
Calls a Lingotek API to provision a new Community (account). Modified version of the request() method.
Return value
mixed On success, a stdClass object of the returned response data, FALSE on error.
File
- lib/
Drupal/ lingotek/ LingotekApi.php, line 1034 - Defines Drupal\lingotek\LingotekApi
Class
- LingotekApi
- @file Defines Drupal\lingotek\LingotekApi
Code
public function createCommunity($parameters = array(), $callback_url = NULL) {
$credentials = array(
'consumer_key' => LINGOTEK_AP_OAUTH_KEY,
'consumer_secret' => LINGOTEK_AP_OAUTH_SECRET,
);
if (isset($callback_url)) {
$parameters['callbackUrl'] = $callback_url;
}
$response = $this
->request('autoProvisionCommunity', $parameters, 'POST', $credentials);
return $response;
}