Skip to content

Latest commit

 

History

History
168 lines (118 loc) · 5.08 KB

GroupApi.md

File metadata and controls

168 lines (118 loc) · 5.08 KB

Flat\APIClient\GroupApi

All URIs are relative to https://api.flat.io/v2

Method HTTP request Description
getGroupDetails GET /groups/{group} Get group information
getGroupScores GET /groups/{group}/scores List group's scores
listGroupUsers GET /groups/{group}/users List group's users

getGroupDetails

\Flat\APIClient\Model\GroupDetails getGroupDetails($group)

Get group information

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Flat\APIClient\Api\GroupApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$group = "group_example"; // string | Unique identifier of a Flat group

try {
    $result = $apiInstance->getGroupDetails($group);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupApi->getGroupDetails: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
group string Unique identifier of a Flat group

Return type

\Flat\APIClient\Model\GroupDetails

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getGroupScores

\Flat\APIClient\Model\ScoreDetails[] getGroupScores($group, $parent)

List group's scores

Get the list of scores shared with a group.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Flat\APIClient\Api\GroupApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$group = "group_example"; // string | Unique identifier of a Flat group
$parent = "parent_example"; // string | Filter the score forked from the score id `parent`

try {
    $result = $apiInstance->getGroupScores($group, $parent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupApi->getGroupScores: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
group string Unique identifier of a Flat group
parent string Filter the score forked from the score id `parent` [optional]

Return type

\Flat\APIClient\Model\ScoreDetails[]

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listGroupUsers

\Flat\APIClient\Model\UserPublic[] listGroupUsers($group)

List group's users

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Flat\APIClient\Api\GroupApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$group = "group_example"; // string | Unique identifier of a Flat group

try {
    $result = $apiInstance->listGroupUsers($group);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupApi->listGroupUsers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
group string Unique identifier of a Flat group

Return type

\Flat\APIClient\Model\UserPublic[]

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]