# coding: utf-8

"""
    Golf v2

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from sportsdata.golf_v2.api_client import ApiClient


class DefaultApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def current_season(self, format, **kwargs):  # noqa: E501
        """Current Season  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.current_season(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: GolfV2Season
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.current_season_with_http_info(format, **kwargs)  # noqa: E501
        else:
            (data) = self.current_season_with_http_info(format, **kwargs)  # noqa: E501
            return data

    def current_season_with_http_info(self, format, **kwargs):  # noqa: E501
        """Current Season  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.current_season_with_http_info(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: GolfV2Season
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method current_season" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `current_season`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/CurrentSeason', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GolfV2Season',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def dfs_slates(self, format, tournamentid, **kwargs):  # noqa: E501
        """DFS Slates  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.dfs_slates(format, tournamentid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>58</code>, <code>61</code>, etc. (required)
        :return: list[GolfV2DfsSlate]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.dfs_slates_with_http_info(format, tournamentid, **kwargs)  # noqa: E501
        else:
            (data) = self.dfs_slates_with_http_info(format, tournamentid, **kwargs)  # noqa: E501
            return data

    def dfs_slates_with_http_info(self, format, tournamentid, **kwargs):  # noqa: E501
        """DFS Slates  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.dfs_slates_with_http_info(format, tournamentid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>58</code>, <code>61</code>, etc. (required)
        :return: list[GolfV2DfsSlate]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'tournamentid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method dfs_slates" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `dfs_slates`")  # noqa: E501
        # verify the required parameter 'tournamentid' is set
        if ('tournamentid' not in params or
                params['tournamentid'] is None):
            raise ValueError("Missing the required parameter `tournamentid` when calling `dfs_slates`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'tournamentid' in params:
            path_params['tournamentid'] = params['tournamentid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/DfsSlatesByTournament/{tournamentid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2DfsSlate]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def injuries(self, format, **kwargs):  # noqa: E501
        """Injuries  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.injuries(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Injury]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.injuries_with_http_info(format, **kwargs)  # noqa: E501
        else:
            (data) = self.injuries_with_http_info(format, **kwargs)  # noqa: E501
            return data

    def injuries_with_http_info(self, format, **kwargs):  # noqa: E501
        """Injuries  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.injuries_with_http_info(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Injury]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method injuries" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `injuries`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/Injuries', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2Injury]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def injuries_historical(self, format, **kwargs):  # noqa: E501
        """Injuries (Historical)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.injuries_historical(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Injury]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.injuries_historical_with_http_info(format, **kwargs)  # noqa: E501
        else:
            (data) = self.injuries_historical_with_http_info(format, **kwargs)  # noqa: E501
            return data

    def injuries_historical_with_http_info(self, format, **kwargs):  # noqa: E501
        """Injuries (Historical)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.injuries_historical_with_http_info(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Injury]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method injuries_historical" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `injuries_historical`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/InjuriesByHistorical', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2Injury]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def leaderboard(self, format, tournamentid, **kwargs):  # noqa: E501
        """Leaderboard  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.leaderboard(format, tournamentid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>58</code>, <code>61</code>, etc. (required)
        :return: GolfV2Leaderboard
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.leaderboard_with_http_info(format, tournamentid, **kwargs)  # noqa: E501
        else:
            (data) = self.leaderboard_with_http_info(format, tournamentid, **kwargs)  # noqa: E501
            return data

    def leaderboard_with_http_info(self, format, tournamentid, **kwargs):  # noqa: E501
        """Leaderboard  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.leaderboard_with_http_info(format, tournamentid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>58</code>, <code>61</code>, etc. (required)
        :return: GolfV2Leaderboard
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'tournamentid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method leaderboard" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `leaderboard`")  # noqa: E501
        # verify the required parameter 'tournamentid' is set
        if ('tournamentid' not in params or
                params['tournamentid'] is None):
            raise ValueError("Missing the required parameter `tournamentid` when calling `leaderboard`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'tournamentid' in params:
            path_params['tournamentid'] = params['tournamentid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/Leaderboard/{tournamentid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GolfV2Leaderboard',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def news(self, format, **kwargs):  # noqa: E501
        """News  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.news(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2News]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.news_with_http_info(format, **kwargs)  # noqa: E501
        else:
            (data) = self.news_with_http_info(format, **kwargs)  # noqa: E501
            return data

    def news_with_http_info(self, format, **kwargs):  # noqa: E501
        """News  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.news_with_http_info(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2News]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method news" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `news`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/News', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2News]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def news_by_date(self, format, _date, **kwargs):  # noqa: E501
        """News by Date  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.news_by_date(format, _date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str _date: The date of the game(s). <br>Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>. (required)
        :return: list[GolfV2News]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.news_by_date_with_http_info(format, _date, **kwargs)  # noqa: E501
        else:
            (data) = self.news_by_date_with_http_info(format, _date, **kwargs)  # noqa: E501
            return data

    def news_by_date_with_http_info(self, format, _date, **kwargs):  # noqa: E501
        """News by Date  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.news_by_date_with_http_info(format, _date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str _date: The date of the game(s). <br>Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>. (required)
        :return: list[GolfV2News]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', '_date']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method news_by_date" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `news_by_date`")  # noqa: E501
        # verify the required parameter '_date' is set
        if ('_date' not in params or
                params['_date'] is None):
            raise ValueError("Missing the required parameter `_date` when calling `news_by_date`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if '_date' in params:
            path_params['date'] = params['_date']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/NewsByDate/{date}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2News]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def news_by_player(self, format, playerid, **kwargs):  # noqa: E501
        """News by Player  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.news_by_player(format, playerid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str playerid: Unique FantasyData Player ID. Example:<code>40000019</code>. (required)
        :return: list[GolfV2News]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.news_by_player_with_http_info(format, playerid, **kwargs)  # noqa: E501
        else:
            (data) = self.news_by_player_with_http_info(format, playerid, **kwargs)  # noqa: E501
            return data

    def news_by_player_with_http_info(self, format, playerid, **kwargs):  # noqa: E501
        """News by Player  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.news_by_player_with_http_info(format, playerid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str playerid: Unique FantasyData Player ID. Example:<code>40000019</code>. (required)
        :return: list[GolfV2News]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'playerid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method news_by_player" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `news_by_player`")  # noqa: E501
        # verify the required parameter 'playerid' is set
        if ('playerid' not in params or
                params['playerid'] is None):
            raise ValueError("Missing the required parameter `playerid` when calling `news_by_player`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'playerid' in params:
            path_params['playerid'] = params['playerid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/NewsByPlayerID/{playerid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2News]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def player(self, format, playerid, **kwargs):  # noqa: E501
        """Player  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player(format, playerid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str playerid: Unique FantasyData Player ID. Example:<code>40000019</code>. (required)
        :return: GolfV2Player
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.player_with_http_info(format, playerid, **kwargs)  # noqa: E501
        else:
            (data) = self.player_with_http_info(format, playerid, **kwargs)  # noqa: E501
            return data

    def player_with_http_info(self, format, playerid, **kwargs):  # noqa: E501
        """Player  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_with_http_info(format, playerid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str playerid: Unique FantasyData Player ID. Example:<code>40000019</code>. (required)
        :return: GolfV2Player
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'playerid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method player" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `player`")  # noqa: E501
        # verify the required parameter 'playerid' is set
        if ('playerid' not in params or
                params['playerid'] is None):
            raise ValueError("Missing the required parameter `playerid` when calling `player`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'playerid' in params:
            path_params['playerid'] = params['playerid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/Player/{playerid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GolfV2Player',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def player_season_stats_w_world_golf_rankings(self, format, season, **kwargs):  # noqa: E501
        """Player Season Stats (w/ World Golf Rankings)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_season_stats_w_world_golf_rankings(format, season, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str season: Year of the season. <br>Examples: <code>2016</code>, <code>2017</code>. (required)
        :return: list[GolfV2PlayerSeason]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.player_season_stats_w_world_golf_rankings_with_http_info(format, season, **kwargs)  # noqa: E501
        else:
            (data) = self.player_season_stats_w_world_golf_rankings_with_http_info(format, season, **kwargs)  # noqa: E501
            return data

    def player_season_stats_w_world_golf_rankings_with_http_info(self, format, season, **kwargs):  # noqa: E501
        """Player Season Stats (w/ World Golf Rankings)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_season_stats_w_world_golf_rankings_with_http_info(format, season, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str season: Year of the season. <br>Examples: <code>2016</code>, <code>2017</code>. (required)
        :return: list[GolfV2PlayerSeason]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'season']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method player_season_stats_w_world_golf_rankings" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `player_season_stats_w_world_golf_rankings`")  # noqa: E501
        # verify the required parameter 'season' is set
        if ('season' not in params or
                params['season'] is None):
            raise ValueError("Missing the required parameter `season` when calling `player_season_stats_w_world_golf_rankings`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'season' in params:
            path_params['season'] = params['season']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/PlayerSeasonStats/{season}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2PlayerSeason]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def player_tournament_projected_stats_w_draftkings_salaries(self, format, tournamentid, **kwargs):  # noqa: E501
        """Player Tournament Projected Stats (w/ DraftKings Salaries)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_tournament_projected_stats_w_draftkings_salaries(format, tournamentid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>78</code>, <code>79</code>, <code>80</code>, etc. (required)
        :return: list[GolfV2PlayerTournamentProjection]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.player_tournament_projected_stats_w_draftkings_salaries_with_http_info(format, tournamentid, **kwargs)  # noqa: E501
        else:
            (data) = self.player_tournament_projected_stats_w_draftkings_salaries_with_http_info(format, tournamentid, **kwargs)  # noqa: E501
            return data

    def player_tournament_projected_stats_w_draftkings_salaries_with_http_info(self, format, tournamentid, **kwargs):  # noqa: E501
        """Player Tournament Projected Stats (w/ DraftKings Salaries)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_tournament_projected_stats_w_draftkings_salaries_with_http_info(format, tournamentid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>78</code>, <code>79</code>, <code>80</code>, etc. (required)
        :return: list[GolfV2PlayerTournamentProjection]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'tournamentid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method player_tournament_projected_stats_w_draftkings_salaries" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `player_tournament_projected_stats_w_draftkings_salaries`")  # noqa: E501
        # verify the required parameter 'tournamentid' is set
        if ('tournamentid' not in params or
                params['tournamentid'] is None):
            raise ValueError("Missing the required parameter `tournamentid` when calling `player_tournament_projected_stats_w_draftkings_salaries`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'tournamentid' in params:
            path_params['tournamentid'] = params['tournamentid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/PlayerTournamentProjectionStats/{tournamentid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2PlayerTournamentProjection]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def player_tournament_stats_by_player(self, format, tournamentid, playerid, **kwargs):  # noqa: E501
        """Player Tournament Stats By Player  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_tournament_stats_by_player(format, tournamentid, playerid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>58</code>, <code>61</code>, etc. (required)
        :param str playerid: Unique FantasyData Player ID. Example:<code>40000019</code>. (required)
        :return: GolfV2PlayerTournament
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.player_tournament_stats_by_player_with_http_info(format, tournamentid, playerid, **kwargs)  # noqa: E501
        else:
            (data) = self.player_tournament_stats_by_player_with_http_info(format, tournamentid, playerid, **kwargs)  # noqa: E501
            return data

    def player_tournament_stats_by_player_with_http_info(self, format, tournamentid, playerid, **kwargs):  # noqa: E501
        """Player Tournament Stats By Player  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.player_tournament_stats_by_player_with_http_info(format, tournamentid, playerid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str tournamentid: The TournamentID of a tournament.  TournamentIDs can be found in the Tournaments API.  Valid entries are <code>58</code>, <code>61</code>, etc. (required)
        :param str playerid: Unique FantasyData Player ID. Example:<code>40000019</code>. (required)
        :return: GolfV2PlayerTournament
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'tournamentid', 'playerid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method player_tournament_stats_by_player" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `player_tournament_stats_by_player`")  # noqa: E501
        # verify the required parameter 'tournamentid' is set
        if ('tournamentid' not in params or
                params['tournamentid'] is None):
            raise ValueError("Missing the required parameter `tournamentid` when calling `player_tournament_stats_by_player`")  # noqa: E501
        # verify the required parameter 'playerid' is set
        if ('playerid' not in params or
                params['playerid'] is None):
            raise ValueError("Missing the required parameter `playerid` when calling `player_tournament_stats_by_player`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'tournamentid' in params:
            path_params['tournamentid'] = params['tournamentid']  # noqa: E501
        if 'playerid' in params:
            path_params['playerid'] = params['playerid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/PlayerTournamentStatsByPlayer/{tournamentid}/{playerid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GolfV2PlayerTournament',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def players(self, format, **kwargs):  # noqa: E501
        """Players  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.players(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Player]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.players_with_http_info(format, **kwargs)  # noqa: E501
        else:
            (data) = self.players_with_http_info(format, **kwargs)  # noqa: E501
            return data

    def players_with_http_info(self, format, **kwargs):  # noqa: E501
        """Players  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.players_with_http_info(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Player]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method players" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `players`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/Players', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2Player]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def schedule(self, format, **kwargs):  # noqa: E501
        """Schedule  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.schedule(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Tournament]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.schedule_with_http_info(format, **kwargs)  # noqa: E501
        else:
            (data) = self.schedule_with_http_info(format, **kwargs)  # noqa: E501
            return data

    def schedule_with_http_info(self, format, **kwargs):  # noqa: E501
        """Schedule  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.schedule_with_http_info(format, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :return: list[GolfV2Tournament]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method schedule" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `schedule`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/Tournaments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2Tournament]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def schedule_by_season(self, format, season, **kwargs):  # noqa: E501
        """Schedule by Season  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.schedule_by_season(format, season, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str season: Year of the season. <br>Examples: <code>2016</code>, <code>2017</code>. (required)
        :return: list[GolfV2Tournament]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.schedule_by_season_with_http_info(format, season, **kwargs)  # noqa: E501
        else:
            (data) = self.schedule_by_season_with_http_info(format, season, **kwargs)  # noqa: E501
            return data

    def schedule_by_season_with_http_info(self, format, season, **kwargs):  # noqa: E501
        """Schedule by Season  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.schedule_by_season_with_http_info(format, season, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>. (required)
        :param str season: Year of the season. <br>Examples: <code>2016</code>, <code>2017</code>. (required)
        :return: list[GolfV2Tournament]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['format', 'season']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method schedule_by_season" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'format' is set
        if ('format' not in params or
                params['format'] is None):
            raise ValueError("Missing the required parameter `format` when calling `schedule_by_season`")  # noqa: E501
        # verify the required parameter 'season' is set
        if ('season' not in params or
                params['season'] is None):
            raise ValueError("Missing the required parameter `season` when calling `schedule_by_season`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'format' in params:
            path_params['format'] = params['format']  # noqa: E501
        if 'season' in params:
            path_params['season'] = params['season']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apiKeyHeader', 'apiKeyQuery']  # noqa: E501

        return self.api_client.call_api(
            '/{format}/Tournaments/{season}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GolfV2Tournament]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
