Skip to content

Latest commit

 

History

History
513 lines (348 loc) · 17.8 KB

DistrictApi.md

File metadata and controls

513 lines (348 loc) · 17.8 KB

tba_api_v3.api.DistrictApi

Load the API package

import 'package:tba_api_v3/api.dart';

All URIs are relative to https://www.thebluealliance.com/api/v3

Method HTTP request Description
getDistrictEvents GET /district/{district_key}/events
getDistrictEventsKeys GET /district/{district_key}/events/keys
getDistrictEventsSimple GET /district/{district_key}/events/simple
getDistrictRankings GET /district/{district_key}/rankings
getDistrictTeams GET /district/{district_key}/teams
getDistrictTeamsKeys GET /district/{district_key}/teams/keys
getDistrictTeamsSimple GET /district/{district_key}/teams/simple
getDistrictsByYear GET /districts/{year}
getEventDistrictPoints GET /event/{event_key}/district_points
getTeamDistricts GET /team/{team_key}/districts

getDistrictEvents

BuiltList getDistrictEvents(districtKey, ifNoneMatch)

Gets a list of events in the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictEvents(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictEvents: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<Event>

Authorization

apiKey

HTTP request headers

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

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

getDistrictEventsKeys

BuiltList getDistrictEventsKeys(districtKey, ifNoneMatch)

Gets a list of event keys for events in the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictEventsKeys(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictEventsKeys: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<String>

Authorization

apiKey

HTTP request headers

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

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

getDistrictEventsSimple

BuiltList getDistrictEventsSimple(districtKey, ifNoneMatch)

Gets a short-form list of events in the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictEventsSimple(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictEventsSimple: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<EventSimple>

Authorization

apiKey

HTTP request headers

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

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

getDistrictRankings

BuiltList getDistrictRankings(districtKey, ifNoneMatch)

Gets a list of team district rankings for the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictRankings(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictRankings: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<DistrictRanking>

Authorization

apiKey

HTTP request headers

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

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

getDistrictTeams

BuiltList getDistrictTeams(districtKey, ifNoneMatch)

Gets a list of Team objects that competed in events in the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictTeams(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictTeams: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<Team>

Authorization

apiKey

HTTP request headers

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

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

getDistrictTeamsKeys

BuiltList getDistrictTeamsKeys(districtKey, ifNoneMatch)

Gets a list of Team objects that competed in events in the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictTeamsKeys(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictTeamsKeys: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<String>

Authorization

apiKey

HTTP request headers

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

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

getDistrictTeamsSimple

BuiltList getDistrictTeamsSimple(districtKey, ifNoneMatch)

Gets a short-form list of Team objects that competed in events in the given district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictTeamsSimple(districtKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictTeamsSimple: $e\n');
}

Parameters

Name Type Description Notes
districtKey String TBA District Key, eg 2016fim
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<TeamSimple>

Authorization

apiKey

HTTP request headers

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

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

getDistrictsByYear

BuiltList getDistrictsByYear(year, ifNoneMatch)

Gets a list of districts and their corresponding district key, for the given year.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final int year = 56; // int | Competition Year (or Season). Must be 4 digits.
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getDistrictsByYear(year, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getDistrictsByYear: $e\n');
}

Parameters

Name Type Description Notes
year int Competition Year (or Season). Must be 4 digits.
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<DistrictList>

Authorization

apiKey

HTTP request headers

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

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

getEventDistrictPoints

EventDistrictPoints getEventDistrictPoints(eventKey, ifNoneMatch)

Gets a list of team rankings for the Event.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getEventDistrictPoints(eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getEventDistrictPoints: $e\n');
}

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

EventDistrictPoints

Authorization

apiKey

HTTP request headers

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

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

getTeamDistricts

BuiltList getTeamDistricts(teamKey, ifNoneMatch)

Gets an array of districts representing each year the team was in a district. Will return an empty array if the team was never in a district.

Example

import 'package:tba_api_v3/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

final api = TbaApiV3().getDistrictApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamDistricts(teamKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DistrictApi->getTeamDistricts: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<DistrictList>

Authorization

apiKey

HTTP request headers

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

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