|
5 | 5 |
|
6 | 6 | This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
|
7 | 7 |
|
8 |
| - The version of the OpenAPI document: 1.18.2 |
| 8 | + The version of the OpenAPI document: 1.19.0 |
9 | 9 |
|
10 | 10 | Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11 | 11 |
|
|
22 | 22 | from typing_extensions import Annotated
|
23 | 23 | from datetime import datetime
|
24 | 24 |
|
25 |
| -from pydantic import Field, StrictBool, StrictInt, StrictStr |
| 25 | +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr |
26 | 26 |
|
27 |
| -from typing import List, Optional |
| 27 | +from typing import List, Optional, Union |
28 | 28 |
|
29 | 29 | from cbbd.models.play_info import PlayInfo
|
30 | 30 | from cbbd.models.play_type_info import PlayTypeInfo
|
@@ -793,6 +793,162 @@ def get_plays_by_team_with_http_info(self, season : Annotated[StrictInt, Field(.
|
793 | 793 | collection_formats=_collection_formats,
|
794 | 794 | _request_auth=_params.get('_request_auth'))
|
795 | 795 |
|
| 796 | + @validate_arguments |
| 797 | + def get_plays_by_tournament(self, tournament : Annotated[StrictStr, Field(..., description="Required tournament filter (e.g. NCAA, NIT, etc)")], season : Annotated[Union[StrictFloat, StrictInt], Field(..., description="Required season filter")], shooting_plays_only : Annotated[Optional[StrictBool], Field(description="Optional filter to only return shooting plays")] = None, **kwargs) -> List[PlayInfo]: # noqa: E501 |
| 798 | + """get_plays_by_tournament # noqa: E501 |
| 799 | +
|
| 800 | + Retrieve all plays for a given tournament and season # noqa: E501 |
| 801 | + This method makes a synchronous HTTP request by default. To make an |
| 802 | + asynchronous HTTP request, please pass async_req=True |
| 803 | +
|
| 804 | + >>> thread = api.get_plays_by_tournament(tournament, season, shooting_plays_only, async_req=True) |
| 805 | + >>> result = thread.get() |
| 806 | +
|
| 807 | + :param tournament: Required tournament filter (e.g. NCAA, NIT, etc) (required) |
| 808 | + :type tournament: str |
| 809 | + :param season: Required season filter (required) |
| 810 | + :type season: float |
| 811 | + :param shooting_plays_only: Optional filter to only return shooting plays |
| 812 | + :type shooting_plays_only: bool |
| 813 | + :param async_req: Whether to execute the request asynchronously. |
| 814 | + :type async_req: bool, optional |
| 815 | + :param _request_timeout: timeout setting for this request. |
| 816 | + If one number provided, it will be total request |
| 817 | + timeout. It can also be a pair (tuple) of |
| 818 | + (connection, read) timeouts. |
| 819 | + :return: Returns the result object. |
| 820 | + If the method is called asynchronously, |
| 821 | + returns the request thread. |
| 822 | + :rtype: List[PlayInfo] |
| 823 | + """ |
| 824 | + kwargs['_return_http_data_only'] = True |
| 825 | + if '_preload_content' in kwargs: |
| 826 | + message = "Error! Please call the get_plays_by_tournament_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 |
| 827 | + raise ValueError(message) |
| 828 | + return self.get_plays_by_tournament_with_http_info(tournament, season, shooting_plays_only, **kwargs) # noqa: E501 |
| 829 | + |
| 830 | + @validate_arguments |
| 831 | + def get_plays_by_tournament_with_http_info(self, tournament : Annotated[StrictStr, Field(..., description="Required tournament filter (e.g. NCAA, NIT, etc)")], season : Annotated[Union[StrictFloat, StrictInt], Field(..., description="Required season filter")], shooting_plays_only : Annotated[Optional[StrictBool], Field(description="Optional filter to only return shooting plays")] = None, **kwargs) -> ApiResponse: # noqa: E501 |
| 832 | + """get_plays_by_tournament # noqa: E501 |
| 833 | +
|
| 834 | + Retrieve all plays for a given tournament and season # noqa: E501 |
| 835 | + This method makes a synchronous HTTP request by default. To make an |
| 836 | + asynchronous HTTP request, please pass async_req=True |
| 837 | +
|
| 838 | + >>> thread = api.get_plays_by_tournament_with_http_info(tournament, season, shooting_plays_only, async_req=True) |
| 839 | + >>> result = thread.get() |
| 840 | +
|
| 841 | + :param tournament: Required tournament filter (e.g. NCAA, NIT, etc) (required) |
| 842 | + :type tournament: str |
| 843 | + :param season: Required season filter (required) |
| 844 | + :type season: float |
| 845 | + :param shooting_plays_only: Optional filter to only return shooting plays |
| 846 | + :type shooting_plays_only: bool |
| 847 | + :param async_req: Whether to execute the request asynchronously. |
| 848 | + :type async_req: bool, optional |
| 849 | + :param _preload_content: if False, the ApiResponse.data will |
| 850 | + be set to none and raw_data will store the |
| 851 | + HTTP response body without reading/decoding. |
| 852 | + Default is True. |
| 853 | + :type _preload_content: bool, optional |
| 854 | + :param _return_http_data_only: response data instead of ApiResponse |
| 855 | + object with status code, headers, etc |
| 856 | + :type _return_http_data_only: bool, optional |
| 857 | + :param _request_timeout: timeout setting for this request. If one |
| 858 | + number provided, it will be total request |
| 859 | + timeout. It can also be a pair (tuple) of |
| 860 | + (connection, read) timeouts. |
| 861 | + :param _request_auth: set to override the auth_settings for an a single |
| 862 | + request; this effectively ignores the authentication |
| 863 | + in the spec for a single request. |
| 864 | + :type _request_auth: dict, optional |
| 865 | + :type _content_type: string, optional: force content-type for the request |
| 866 | + :return: Returns the result object. |
| 867 | + If the method is called asynchronously, |
| 868 | + returns the request thread. |
| 869 | + :rtype: tuple(List[PlayInfo], status_code(int), headers(HTTPHeaderDict)) |
| 870 | + """ |
| 871 | + |
| 872 | + _params = locals() |
| 873 | + |
| 874 | + _all_params = [ |
| 875 | + 'tournament', |
| 876 | + 'season', |
| 877 | + 'shooting_plays_only' |
| 878 | + ] |
| 879 | + _all_params.extend( |
| 880 | + [ |
| 881 | + 'async_req', |
| 882 | + '_return_http_data_only', |
| 883 | + '_preload_content', |
| 884 | + '_request_timeout', |
| 885 | + '_request_auth', |
| 886 | + '_content_type', |
| 887 | + '_headers' |
| 888 | + ] |
| 889 | + ) |
| 890 | + |
| 891 | + # validate the arguments |
| 892 | + for _key, _val in _params['kwargs'].items(): |
| 893 | + if _key not in _all_params: |
| 894 | + raise ApiTypeError( |
| 895 | + "Got an unexpected keyword argument '%s'" |
| 896 | + " to method get_plays_by_tournament" % _key |
| 897 | + ) |
| 898 | + _params[_key] = _val |
| 899 | + del _params['kwargs'] |
| 900 | + |
| 901 | + _collection_formats = {} |
| 902 | + |
| 903 | + # process the path parameters |
| 904 | + _path_params = {} |
| 905 | + |
| 906 | + # process the query parameters |
| 907 | + _query_params = [] |
| 908 | + if _params.get('tournament') is not None: # noqa: E501 |
| 909 | + _query_params.append(('tournament', _params['tournament'])) |
| 910 | + |
| 911 | + if _params.get('season') is not None: # noqa: E501 |
| 912 | + _query_params.append(('season', _params['season'])) |
| 913 | + |
| 914 | + if _params.get('shooting_plays_only') is not None: # noqa: E501 |
| 915 | + _query_params.append(('shootingPlaysOnly', _params['shooting_plays_only'])) |
| 916 | + |
| 917 | + # process the header parameters |
| 918 | + _header_params = dict(_params.get('_headers', {})) |
| 919 | + # process the form parameters |
| 920 | + _form_params = [] |
| 921 | + _files = {} |
| 922 | + # process the body parameter |
| 923 | + _body_params = None |
| 924 | + # set the HTTP header `Accept` |
| 925 | + _header_params['Accept'] = self.api_client.select_header_accept( |
| 926 | + ['application/json']) # noqa: E501 |
| 927 | + |
| 928 | + # authentication setting |
| 929 | + _auth_settings = ['apiKey'] # noqa: E501 |
| 930 | + |
| 931 | + _response_types_map = { |
| 932 | + '200': "List[PlayInfo]", |
| 933 | + } |
| 934 | + |
| 935 | + return self.api_client.call_api( |
| 936 | + '/plays/tournament', 'GET', |
| 937 | + _path_params, |
| 938 | + _query_params, |
| 939 | + _header_params, |
| 940 | + body=_body_params, |
| 941 | + post_params=_form_params, |
| 942 | + files=_files, |
| 943 | + response_types_map=_response_types_map, |
| 944 | + auth_settings=_auth_settings, |
| 945 | + async_req=_params.get('async_req'), |
| 946 | + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 |
| 947 | + _preload_content=_params.get('_preload_content', True), |
| 948 | + _request_timeout=_params.get('_request_timeout'), |
| 949 | + collection_formats=_collection_formats, |
| 950 | + _request_auth=_params.get('_request_auth')) |
| 951 | + |
796 | 952 | @validate_arguments
|
797 | 953 | def get_substitutions_by_game(self, game_id : Annotated[StrictInt, Field(..., description="Game id filter")], **kwargs) -> List[PlayerSubsititution]: # noqa: E501
|
798 | 954 | """get_substitutions_by_game # noqa: E501
|
|
0 commit comments