Skip to content

Latest commit

 

History

History
848 lines (624 loc) · 31.1 KB

DistrictApi.md

File metadata and controls

848 lines (624 loc) · 31.1 KB

TBAAPI.V3Client.Api.DistrictApi

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

List<Event> GetDistrictEvents (string districtKey, string ifModifiedSince = null)

Gets a list of events in the given district.

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictEventsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<Event> result = apiInstance.GetDistrictEvents(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictEvents: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<Event>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictEventsKeys

List<string> GetDistrictEventsKeys (string districtKey, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictEventsKeysExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<string> result = apiInstance.GetDistrictEventsKeys(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictEventsKeys: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictEventsSimple

List<EventSimple> GetDistrictEventsSimple (string districtKey, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictEventsSimpleExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<EventSimple> result = apiInstance.GetDistrictEventsSimple(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictEventsSimple: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<EventSimple>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictRankings

List<DistrictRanking> GetDistrictRankings (string districtKey, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictRankingsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<DistrictRanking> result = apiInstance.GetDistrictRankings(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictRankings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<DistrictRanking>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictTeams

List<Team> GetDistrictTeams (string districtKey, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictTeamsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<Team> result = apiInstance.GetDistrictTeams(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictTeams: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<Team>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictTeamsKeys

List<string> GetDistrictTeamsKeys (string districtKey, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictTeamsKeysExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<string> result = apiInstance.GetDistrictTeamsKeys(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictTeamsKeys: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictTeamsSimple

List<TeamSimple> GetDistrictTeamsSimple (string districtKey, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictTeamsSimpleExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var districtKey = districtKey_example;  // string | TBA District Key, eg `2016fim`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<TeamSimple> result = apiInstance.GetDistrictTeamsSimple(districtKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictTeamsSimple: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
districtKey string TBA District Key, eg `2016fim`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<TeamSimple>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetDistrictsByYear

List<DistrictList> GetDistrictsByYear (int year, string ifModifiedSince = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetDistrictsByYearExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var year = 56;  // int | Competition Year (or Season). Must be 4 digits.
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<DistrictList> result = apiInstance.GetDistrictsByYear(year, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetDistrictsByYear: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
year int Competition Year (or Season). Must be 4 digits.
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<DistrictList>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetEventDistrictPoints

EventDistrictPoints GetEventDistrictPoints (string eventKey, string ifModifiedSince = null)

Gets a list of team rankings for the Event.

Example

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetEventDistrictPointsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var eventKey = eventKey_example;  // string | TBA Event Key, eg `2016nytr`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                EventDistrictPoints result = apiInstance.GetEventDistrictPoints(eventKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetEventDistrictPoints: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
eventKey string TBA Event Key, eg `2016nytr`
ifModifiedSince string Value of the `Last-Modified` 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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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

GetTeamDistricts

List<DistrictList> GetTeamDistricts (string teamKey, string ifModifiedSince = null)

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

using System.Collections.Generic;
using System.Diagnostics;
using TBAAPI.V3Client.Api;
using TBAAPI.V3Client.Client;
using TBAAPI.V3Client.Model;

namespace Example
{
    public class GetTeamDistrictsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.thebluealliance.com/api/v3";
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("X-TBA-Auth-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-TBA-Auth-Key", "Bearer");

            var apiInstance = new DistrictApi(Configuration.Default);
            var teamKey = teamKey_example;  // string | TBA Team Key, eg `frc254`
            var ifModifiedSince = ifModifiedSince_example;  // string | Value of the `Last-Modified` header in the most recently cached response by the client. (optional) 

            try
            {
                List<DistrictList> result = apiInstance.GetTeamDistricts(teamKey, ifModifiedSince);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DistrictApi.GetTeamDistricts: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
teamKey string TBA Team Key, eg `frc254`
ifModifiedSince string Value of the `Last-Modified` header in the most recently cached response by the client. [optional]

Return type

List<DistrictList>

Authorization

apiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response * Cache-Control - The `Cache-Control` header, in particular the `max-age` value, contains the number of seconds the result should be considered valid for. During this time subsequent calls should return from the local cache directly.
* Last-Modified - Indicates the date and time the data returned was last updated. Used by clients in the `If-Modified-Since` request header.
304 Not Modified - Use Local Cached Value -
401 -

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