All URIs are relative to https://api.flat.io/v2
Method | HTTP request | Description |
---|---|---|
get_group_details | GET /groups/{group} | Get group information |
get_group_scores | GET /groups/{group}/scores | List group's scores |
list_group_users | GET /groups/{group}/users | List group's users |
get_group_details(group)
Get group information
require 'time'
require 'flat_api'
# setup authorization
FlatApi.configure do |config|
# Configure OAuth2 access token for authorization: OAuth2
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = FlatApi::GroupApi.new
group = 'group_example' # String | Unique identifier of a Flat group
begin
# Get group information
result = api_instance.get_group_details(group)
p result
rescue FlatApi::ApiError => e
puts "Error when calling GroupApi->get_group_details: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_group_details_with_http_info(group)
begin
# Get group information
data, status_code, headers = api_instance.get_group_details_with_http_info(group)
p status_code # => 2xx
p headers # => { ... }
p data # => <GroupDetails>
rescue FlatApi::ApiError => e
puts "Error when calling GroupApi->get_group_details_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
group | String | Unique identifier of a Flat group |
- Content-Type: Not defined
- Accept: application/json
<Array> get_group_scores(group, opts)
List group's scores
Get the list of scores shared with a group.
require 'time'
require 'flat_api'
# setup authorization
FlatApi.configure do |config|
# Configure OAuth2 access token for authorization: OAuth2
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = FlatApi::GroupApi.new
group = 'group_example' # String | Unique identifier of a Flat group
opts = {
parent: 'parent_example' # String | Filter the score forked from the score id `parent`
}
begin
# List group's scores
result = api_instance.get_group_scores(group, opts)
p result
rescue FlatApi::ApiError => e
puts "Error when calling GroupApi->get_group_scores: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> get_group_scores_with_http_info(group, opts)
begin
# List group's scores
data, status_code, headers = api_instance.get_group_scores_with_http_info(group, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<ScoreDetails>>
rescue FlatApi::ApiError => e
puts "Error when calling GroupApi->get_group_scores_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
group | String | Unique identifier of a Flat group | |
parent | String | Filter the score forked from the score id `parent` | [optional] |
- Content-Type: Not defined
- Accept: application/json
<Array> list_group_users(group, opts)
List group's users
require 'time'
require 'flat_api'
# setup authorization
FlatApi.configure do |config|
# Configure OAuth2 access token for authorization: OAuth2
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = FlatApi::GroupApi.new
group = 'group_example' # String | Unique identifier of a Flat group
opts = {
source: 'googleClassroom' # String | Filter the users by their source
}
begin
# List group's users
result = api_instance.list_group_users(group, opts)
p result
rescue FlatApi::ApiError => e
puts "Error when calling GroupApi->list_group_users: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> list_group_users_with_http_info(group, opts)
begin
# List group's users
data, status_code, headers = api_instance.list_group_users_with_http_info(group, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<UserPublic>>
rescue FlatApi::ApiError => e
puts "Error when calling GroupApi->list_group_users_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
group | String | Unique identifier of a Flat group | |
source | String | Filter the users by their source | [optional] |
- Content-Type: Not defined
- Accept: application/json