<reponame>Pluxbox/radiomanager-python-client<filename>radiomanager_sdk/api/broadcast_api.py
# coding: utf-8

"""
    RadioManager

    RadioManager  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: <EMAIL>
    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 radiomanager_sdk.api_client import ApiClient


class BroadcastApi(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 create_broadcast(self, data, **kwargs):  # noqa: E501
        """Create broadcast.  # noqa: E501

        Create broadcast.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_broadcast(data, async=True)
        >>> result = thread.get()

        :param async bool
        :param BroadcastDataInput data: Data **(Required)** (required)
        :return: PostSuccess
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.create_broadcast_with_http_info(data, **kwargs)  # noqa: E501
        else:
            (data) = self.create_broadcast_with_http_info(data, **kwargs)  # noqa: E501
            return data

    def create_broadcast_with_http_info(self, data, **kwargs):  # noqa: E501
        """Create broadcast.  # noqa: E501

        Create broadcast.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_broadcast_with_http_info(data, async=True)
        >>> result = thread.get()

        :param async bool
        :param BroadcastDataInput data: Data **(Required)** (required)
        :return: PostSuccess
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['data']  # noqa: E501
        all_params.append('async')
        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 create_broadcast" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'data' is set
        if ('data' not in params or
                params['data'] is None):
            raise ValueError("Missing the required parameter `data` when calling `create_broadcast`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostSuccess',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 delete_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Delete broadcast by id  # noqa: E501

        Delete broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.delete_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete broadcast by id  # noqa: E501

        Delete broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async')
        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 delete_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `delete_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # 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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Success',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Get broadcast by id  # noqa: E501

        Get broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get broadcast by id  # noqa: E501

        Get broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'external_station_id']  # noqa: E501
        all_params.append('async')
        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 get_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'external_station_id' in params:
            query_params.append(('_external_station_id', params['external_station_id']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResult',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_current_broadcast(self, **kwargs):  # noqa: E501
        """Get current Broadcast  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_current_broadcast(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_current_broadcast_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_current_broadcast_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_current_broadcast_with_http_info(self, **kwargs):  # noqa: E501
        """Get current Broadcast  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_current_broadcast_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_current_broadcast" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/current', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResult',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_daily_epg(self, **kwargs):  # noqa: E501
        """Get daily EPG  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_daily_epg(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_daily_epg_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_daily_epg_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_daily_epg_with_http_info(self, **kwargs):  # noqa: E501
        """Get daily EPG  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_daily_epg_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['date', 'withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_daily_epg" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'date' in params:
            query_params.append(('date', params['date']))  # noqa: E501
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/epg/daily', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EPGResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_epg_by_date(self, **kwargs):  # noqa: E501
        """Get EPG by date  # noqa: E501

        Get EPG by date  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_epg_by_date(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_epg_by_date_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_epg_by_date_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_epg_by_date_with_http_info(self, **kwargs):  # noqa: E501
        """Get EPG by date  # noqa: E501

        Get EPG by date  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_epg_by_date_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['date', 'withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_epg_by_date" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'date' in params:
            query_params.append(('date', params['date']))  # noqa: E501
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/epg', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EPGResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_next_broadcast(self, **kwargs):  # noqa: E501
        """Get next Broadcast  # noqa: E501

        Get next Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_next_broadcast(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_next_broadcast_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_next_broadcast_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_next_broadcast_with_http_info(self, **kwargs):  # noqa: E501
        """Get next Broadcast  # noqa: E501

        Get next Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_next_broadcast_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_next_broadcast" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/next', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResult',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_weekly_epg(self, **kwargs):  # noqa: E501
        """Get weekly EPG  # noqa: E501

        Get weekly EPG  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_weekly_epg(async=True)
        >>> result = thread.get()

        :param async bool
        :param str date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_weekly_epg_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_weekly_epg_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_weekly_epg_with_http_info(self, **kwargs):  # noqa: E501
        """Get weekly EPG  # noqa: E501

        Get weekly EPG  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_weekly_epg_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['date', 'withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_weekly_epg" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'date' in params:
            query_params.append(('date', params['date']))  # noqa: E501
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/epg/weekly', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EPGResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 list_broadcasts(self, **kwargs):  # noqa: E501
        """Get all broadcasts.  # noqa: E501

        List all broadcasts.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_broadcasts(async=True)
        >>> result = thread.get()

        :param async bool
        :param int page: Current page *(Optional)*
        :param int program_id: Search on Program ID *(Optional)* `(Relation)`
        :param int block_id: Search on Block ID *(Optional)* `(Relation)`
        :param int model_type_id: Search on ModelType ID *(Optional)* `(Relation)`
        :param int tag_id: Search on Tag ID *(Optional)* `(Relation)`
        :param int presenter_id: Search on Presenter ID *(Optional)* `(Relation)`
        :param int genre_id: Search on Genre ID *(Optional)* `(Relation)`
        :param int item_id: Search on Item ID *(Optional)* `(Relation)`
        :param datetime start_min: Minimum start date *(Optional)*
        :param datetime start_max: Maximum start date *(Optional)*
        :param int limit: Results per page *(Optional)*
        :param str order_by: Field to order the results *(Optional)*
        :param str order_direction: Direction of ordering *(Optional)*
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.list_broadcasts_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.list_broadcasts_with_http_info(**kwargs)  # noqa: E501
            return data

    def list_broadcasts_with_http_info(self, **kwargs):  # noqa: E501
        """Get all broadcasts.  # noqa: E501

        List all broadcasts.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_broadcasts_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param int page: Current page *(Optional)*
        :param int program_id: Search on Program ID *(Optional)* `(Relation)`
        :param int block_id: Search on Block ID *(Optional)* `(Relation)`
        :param int model_type_id: Search on ModelType ID *(Optional)* `(Relation)`
        :param int tag_id: Search on Tag ID *(Optional)* `(Relation)`
        :param int presenter_id: Search on Presenter ID *(Optional)* `(Relation)`
        :param int genre_id: Search on Genre ID *(Optional)* `(Relation)`
        :param int item_id: Search on Item ID *(Optional)* `(Relation)`
        :param datetime start_min: Minimum start date *(Optional)*
        :param datetime start_max: Maximum start date *(Optional)*
        :param int limit: Results per page *(Optional)*
        :param str order_by: Field to order the results *(Optional)*
        :param str order_direction: Direction of ordering *(Optional)*
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['page', 'program_id', 'block_id', 'model_type_id', 'tag_id', 'presenter_id', 'genre_id', 'item_id', 'start_min', 'start_max', 'limit', 'order_by', 'order_direction', 'external_station_id']  # noqa: E501
        all_params.append('async')
        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 list_broadcasts" % key
                )
            params[key] = val
        del params['kwargs']

        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `list_broadcasts`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'limit' in params and params['limit'] > 50:  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `list_broadcasts`, must be a value less than or equal to `50`")  # noqa: E501
        if 'limit' in params and params['limit'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `list_broadcasts`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'program_id' in params:
            query_params.append(('program_id', params['program_id']))  # noqa: E501
        if 'block_id' in params:
            query_params.append(('block_id', params['block_id']))  # noqa: E501
        if 'model_type_id' in params:
            query_params.append(('model_type_id', params['model_type_id']))  # noqa: E501
        if 'tag_id' in params:
            query_params.append(('tag_id', params['tag_id']))  # noqa: E501
        if 'presenter_id' in params:
            query_params.append(('presenter_id', params['presenter_id']))  # noqa: E501
        if 'genre_id' in params:
            query_params.append(('genre_id', params['genre_id']))  # noqa: E501
        if 'item_id' in params:
            query_params.append(('item_id', params['item_id']))  # noqa: E501
        if 'start_min' in params:
            query_params.append(('start-min', params['start_min']))  # noqa: E501
        if 'start_max' in params:
            query_params.append(('start-max', params['start_max']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order-by', params['order_by']))  # noqa: E501
        if 'order_direction' in params:
            query_params.append(('order-direction', params['order_direction']))  # noqa: E501
        if 'external_station_id' in params:
            query_params.append(('_external_station_id', params['external_station_id']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 print_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Print broadcast by id with template  # noqa: E501

        Print broadcast by id with template  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.print_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int template_id: Search on template ID *(Optional)*
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.print_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.print_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def print_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Print broadcast by id with template  # noqa: E501

        Print broadcast by id with template  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.print_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int template_id: Search on template ID *(Optional)*
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'template_id']  # noqa: E501
        all_params.append('async')
        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 print_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `print_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `print_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'template_id' in params:
            query_params.append(('template_id', params['template_id']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/print/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 update_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Update broadcast by id  # noqa: E501

        Update broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param BroadcastDataInput data: Data *(Optional)*
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.update_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Update broadcast by id  # noqa: E501

        Update broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param BroadcastDataInput data: Data *(Optional)*
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']  # noqa: E501
        all_params.append('async')
        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 update_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `update_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `update_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/{id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Success',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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)

# coding: utf-8

"""
    RadioManager

    RadioManager  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: <EMAIL>
    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 radiomanager_sdk.api_client import ApiClient


class BroadcastApi(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 create_broadcast(self, data, **kwargs):  # noqa: E501
        """Create broadcast.  # noqa: E501

        Create broadcast.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_broadcast(data, async=True)
        >>> result = thread.get()

        :param async bool
        :param BroadcastDataInput data: Data **(Required)** (required)
        :return: PostSuccess
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.create_broadcast_with_http_info(data, **kwargs)  # noqa: E501
        else:
            (data) = self.create_broadcast_with_http_info(data, **kwargs)  # noqa: E501
            return data

    def create_broadcast_with_http_info(self, data, **kwargs):  # noqa: E501
        """Create broadcast.  # noqa: E501

        Create broadcast.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_broadcast_with_http_info(data, async=True)
        >>> result = thread.get()

        :param async bool
        :param BroadcastDataInput data: Data **(Required)** (required)
        :return: PostSuccess
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['data']  # noqa: E501
        all_params.append('async')
        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 create_broadcast" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'data' is set
        if ('data' not in params or
                params['data'] is None):
            raise ValueError("Missing the required parameter `data` when calling `create_broadcast`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostSuccess',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 delete_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Delete broadcast by id  # noqa: E501

        Delete broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.delete_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete broadcast by id  # noqa: E501

        Delete broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async')
        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 delete_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `delete_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # 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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Success',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Get broadcast by id  # noqa: E501

        Get broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get broadcast by id  # noqa: E501

        Get broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'external_station_id']  # noqa: E501
        all_params.append('async')
        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 get_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'external_station_id' in params:
            query_params.append(('_external_station_id', params['external_station_id']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResult',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_current_broadcast(self, **kwargs):  # noqa: E501
        """Get current Broadcast  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_current_broadcast(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_current_broadcast_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_current_broadcast_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_current_broadcast_with_http_info(self, **kwargs):  # noqa: E501
        """Get current Broadcast  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_current_broadcast_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_current_broadcast" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/current', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResult',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_daily_epg(self, **kwargs):  # noqa: E501
        """Get daily EPG  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_daily_epg(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_daily_epg_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_daily_epg_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_daily_epg_with_http_info(self, **kwargs):  # noqa: E501
        """Get daily EPG  # noqa: E501

        Get current Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_daily_epg_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['date', 'withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_daily_epg" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'date' in params:
            query_params.append(('date', params['date']))  # noqa: E501
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/epg/daily', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EPGResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_epg_by_date(self, **kwargs):  # noqa: E501
        """Get EPG by date  # noqa: E501

        Get EPG by date  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_epg_by_date(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_epg_by_date_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_epg_by_date_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_epg_by_date_with_http_info(self, **kwargs):  # noqa: E501
        """Get EPG by date  # noqa: E501

        Get EPG by date  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_epg_by_date_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['date', 'withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_epg_by_date" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'date' in params:
            query_params.append(('date', params['date']))  # noqa: E501
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/epg', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EPGResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_next_broadcast(self, **kwargs):  # noqa: E501
        """Get next Broadcast  # noqa: E501

        Get next Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_next_broadcast(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_next_broadcast_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_next_broadcast_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_next_broadcast_with_http_info(self, **kwargs):  # noqa: E501
        """Get next Broadcast  # noqa: E501

        Get next Broadcast  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_next_broadcast_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: BroadcastResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_next_broadcast" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/next', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResult',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 get_weekly_epg(self, **kwargs):  # noqa: E501
        """Get weekly EPG  # noqa: E501

        Get weekly EPG  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_weekly_epg(async=True)
        >>> result = thread.get()

        :param async bool
        :param str date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_weekly_epg_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_weekly_epg_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_weekly_epg_with_http_info(self, **kwargs):  # noqa: E501
        """Get weekly EPG  # noqa: E501

        Get weekly EPG  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_weekly_epg_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str date: Date *(Optional)*
        :param bool withunpublished: Show Unpublished *(Optional)*
        :return: EPGResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['date', 'withunpublished']  # noqa: E501
        all_params.append('async')
        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 get_weekly_epg" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'date' in params:
            query_params.append(('date', params['date']))  # noqa: E501
        if 'withunpublished' in params:
            query_params.append(('withunpublished', params['withunpublished']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/epg/weekly', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EPGResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 list_broadcasts(self, **kwargs):  # noqa: E501
        """Get all broadcasts.  # noqa: E501

        List all broadcasts.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_broadcasts(async=True)
        >>> result = thread.get()

        :param async bool
        :param int page: Current page *(Optional)*
        :param int program_id: Search on Program ID *(Optional)* `(Relation)`
        :param int block_id: Search on Block ID *(Optional)* `(Relation)`
        :param int model_type_id: Search on ModelType ID *(Optional)* `(Relation)`
        :param int tag_id: Search on Tag ID *(Optional)* `(Relation)`
        :param int presenter_id: Search on Presenter ID *(Optional)* `(Relation)`
        :param int genre_id: Search on Genre ID *(Optional)* `(Relation)`
        :param int item_id: Search on Item ID *(Optional)* `(Relation)`
        :param datetime start_min: Minimum start date *(Optional)*
        :param datetime start_max: Maximum start date *(Optional)*
        :param int limit: Results per page *(Optional)*
        :param str order_by: Field to order the results *(Optional)*
        :param str order_direction: Direction of ordering *(Optional)*
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.list_broadcasts_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.list_broadcasts_with_http_info(**kwargs)  # noqa: E501
            return data

    def list_broadcasts_with_http_info(self, **kwargs):  # noqa: E501
        """Get all broadcasts.  # noqa: E501

        List all broadcasts.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_broadcasts_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param int page: Current page *(Optional)*
        :param int program_id: Search on Program ID *(Optional)* `(Relation)`
        :param int block_id: Search on Block ID *(Optional)* `(Relation)`
        :param int model_type_id: Search on ModelType ID *(Optional)* `(Relation)`
        :param int tag_id: Search on Tag ID *(Optional)* `(Relation)`
        :param int presenter_id: Search on Presenter ID *(Optional)* `(Relation)`
        :param int genre_id: Search on Genre ID *(Optional)* `(Relation)`
        :param int item_id: Search on Item ID *(Optional)* `(Relation)`
        :param datetime start_min: Minimum start date *(Optional)*
        :param datetime start_max: Maximum start date *(Optional)*
        :param int limit: Results per page *(Optional)*
        :param str order_by: Field to order the results *(Optional)*
        :param str order_direction: Direction of ordering *(Optional)*
        :param int external_station_id: Query on a different (content providing) station *(Optional)*
        :return: BroadcastResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['page', 'program_id', 'block_id', 'model_type_id', 'tag_id', 'presenter_id', 'genre_id', 'item_id', 'start_min', 'start_max', 'limit', 'order_by', 'order_direction', 'external_station_id']  # noqa: E501
        all_params.append('async')
        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 list_broadcasts" % key
                )
            params[key] = val
        del params['kwargs']

        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `list_broadcasts`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'limit' in params and params['limit'] > 50:  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `list_broadcasts`, must be a value less than or equal to `50`")  # noqa: E501
        if 'limit' in params and params['limit'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `list_broadcasts`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'program_id' in params:
            query_params.append(('program_id', params['program_id']))  # noqa: E501
        if 'block_id' in params:
            query_params.append(('block_id', params['block_id']))  # noqa: E501
        if 'model_type_id' in params:
            query_params.append(('model_type_id', params['model_type_id']))  # noqa: E501
        if 'tag_id' in params:
            query_params.append(('tag_id', params['tag_id']))  # noqa: E501
        if 'presenter_id' in params:
            query_params.append(('presenter_id', params['presenter_id']))  # noqa: E501
        if 'genre_id' in params:
            query_params.append(('genre_id', params['genre_id']))  # noqa: E501
        if 'item_id' in params:
            query_params.append(('item_id', params['item_id']))  # noqa: E501
        if 'start_min' in params:
            query_params.append(('start-min', params['start_min']))  # noqa: E501
        if 'start_max' in params:
            query_params.append(('start-max', params['start_max']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order-by', params['order_by']))  # noqa: E501
        if 'order_direction' in params:
            query_params.append(('order-direction', params['order_direction']))  # noqa: E501
        if 'external_station_id' in params:
            query_params.append(('_external_station_id', params['external_station_id']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BroadcastResults',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 print_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Print broadcast by id with template  # noqa: E501

        Print broadcast by id with template  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.print_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int template_id: Search on template ID *(Optional)*
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.print_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.print_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def print_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Print broadcast by id with template  # noqa: E501

        Print broadcast by id with template  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.print_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param int template_id: Search on template ID *(Optional)*
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'template_id']  # noqa: E501
        all_params.append('async')
        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 print_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `print_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `print_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'template_id' in params:
            query_params.append(('template_id', params['template_id']))  # noqa: E501

        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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/print/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 update_broadcast_by_id(self, id, **kwargs):  # noqa: E501
        """Update broadcast by id  # noqa: E501

        Update broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_broadcast_by_id(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param BroadcastDataInput data: Data *(Optional)*
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.update_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_broadcast_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_broadcast_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Update broadcast by id  # noqa: E501

        Update broadcast by id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_broadcast_by_id_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: ID of Broadcast **(Required)** (required)
        :param BroadcastDataInput data: Data *(Optional)*
        :return: Success
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']  # noqa: E501
        all_params.append('async')
        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 update_broadcast_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `update_broadcast_by_id`")  # noqa: E501

        if 'id' in params and params['id'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `update_broadcast_by_id`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['API Key']  # noqa: E501

        return self.api_client.call_api(
            '/broadcasts/{id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Success',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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)
# coding: utf-8 RadioManager      RadioManager  # noqa: E501      OpenAPI spec version: 2.0     Contact: <EMAIL>     Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library 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 # noqa: E501 Create broadcast.  # noqa: E501          Create broadcast.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.create_broadcast(data, async=True)         >>> result = thread.get()          :param async bool         :param BroadcastDataInput data: Data **(Required)** (required)         :return: PostSuccess                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Create broadcast.  # noqa: E501          Create broadcast.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.create_broadcast_with_http_info(data, async=True)         >>> result = thread.get()          :param async bool         :param BroadcastDataInput data: Data **(Required)** (required)         :return: PostSuccess                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'data' is set # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete broadcast by id  # noqa: E501          Delete broadcast by id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.delete_broadcast_by_id(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :return: Success                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Delete broadcast by id  # noqa: E501          Delete broadcast by id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.delete_broadcast_by_id_with_http_info(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :return: Success                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get broadcast by id  # noqa: E501          Get broadcast by id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_broadcast_by_id(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :param int external_station_id: Query on a different (content providing) station *(Optional)*         :return: BroadcastResult                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get broadcast by id  # noqa: E501          Get broadcast by id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_broadcast_by_id_with_http_info(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :param int external_station_id: Query on a different (content providing) station *(Optional)*         :return: BroadcastResult                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get current Broadcast  # noqa: E501          Get current Broadcast  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_current_broadcast(async=True)         >>> result = thread.get()          :param async bool         :param bool withunpublished: Show Unpublished *(Optional)*         :return: BroadcastResult                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get current Broadcast  # noqa: E501          Get current Broadcast  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_current_broadcast_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param bool withunpublished: Show Unpublished *(Optional)*         :return: BroadcastResult                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get daily EPG  # noqa: E501          Get current Broadcast  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_daily_epg(async=True)         >>> result = thread.get()          :param async bool         :param datetime date: Date *(Optional)*         :param bool withunpublished: Show Unpublished *(Optional)*         :return: EPGResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get daily EPG  # noqa: E501          Get current Broadcast  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_daily_epg_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param datetime date: Date *(Optional)*         :param bool withunpublished: Show Unpublished *(Optional)*         :return: EPGResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get EPG by date  # noqa: E501          Get EPG by date  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_epg_by_date(async=True)         >>> result = thread.get()          :param async bool         :param datetime date: Date *(Optional)*         :param bool withunpublished: Show Unpublished *(Optional)*         :return: EPGResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get EPG by date  # noqa: E501          Get EPG by date  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_epg_by_date_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param datetime date: Date *(Optional)*         :param bool withunpublished: Show Unpublished *(Optional)*         :return: EPGResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get next Broadcast  # noqa: E501          Get next Broadcast  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_next_broadcast(async=True)         >>> result = thread.get()          :param async bool         :param bool withunpublished: Show Unpublished *(Optional)*         :return: BroadcastResult                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get next Broadcast  # noqa: E501          Get next Broadcast  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_next_broadcast_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param bool withunpublished: Show Unpublished *(Optional)*         :return: BroadcastResult                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get weekly EPG  # noqa: E501          Get weekly EPG  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_weekly_epg(async=True)         >>> result = thread.get()          :param async bool         :param str date: Date *(Optional)*         :param bool withunpublished: Show Unpublished *(Optional)*         :return: EPGResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get weekly EPG  # noqa: E501          Get weekly EPG  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_weekly_epg_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param str date: Date *(Optional)*         :param bool withunpublished: Show Unpublished *(Optional)*         :return: EPGResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get all broadcasts.  # noqa: E501          List all broadcasts.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.list_broadcasts(async=True)         >>> result = thread.get()          :param async bool         :param int page: Current page *(Optional)*         :param int program_id: Search on Program ID *(Optional)* `(Relation)`         :param int block_id: Search on Block ID *(Optional)* `(Relation)`         :param int model_type_id: Search on ModelType ID *(Optional)* `(Relation)`         :param int tag_id: Search on Tag ID *(Optional)* `(Relation)`         :param int presenter_id: Search on Presenter ID *(Optional)* `(Relation)`         :param int genre_id: Search on Genre ID *(Optional)* `(Relation)`         :param int item_id: Search on Item ID *(Optional)* `(Relation)`         :param datetime start_min: Minimum start date *(Optional)*         :param datetime start_max: Maximum start date *(Optional)*         :param int limit: Results per page *(Optional)*         :param str order_by: Field to order the results *(Optional)*         :param str order_direction: Direction of ordering *(Optional)*         :param int external_station_id: Query on a different (content providing) station *(Optional)*         :return: BroadcastResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get all broadcasts.  # noqa: E501          List all broadcasts.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.list_broadcasts_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param int page: Current page *(Optional)*         :param int program_id: Search on Program ID *(Optional)* `(Relation)`         :param int block_id: Search on Block ID *(Optional)* `(Relation)`         :param int model_type_id: Search on ModelType ID *(Optional)* `(Relation)`         :param int tag_id: Search on Tag ID *(Optional)* `(Relation)`         :param int presenter_id: Search on Presenter ID *(Optional)* `(Relation)`         :param int genre_id: Search on Genre ID *(Optional)* `(Relation)`         :param int item_id: Search on Item ID *(Optional)* `(Relation)`         :param datetime start_min: Minimum start date *(Optional)*         :param datetime start_max: Maximum start date *(Optional)*         :param int limit: Results per page *(Optional)*         :param str order_by: Field to order the results *(Optional)*         :param str order_direction: Direction of ordering *(Optional)*         :param int external_station_id: Query on a different (content providing) station *(Optional)*         :return: BroadcastResults                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Print broadcast by id with template  # noqa: E501          Print broadcast by id with template  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.print_broadcast_by_id(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :param int template_id: Search on template ID *(Optional)*         :return: str                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Print broadcast by id with template  # noqa: E501          Print broadcast by id with template  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.print_broadcast_by_id_with_http_info(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :param int template_id: Search on template ID *(Optional)*         :return: str                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Update broadcast by id  # noqa: E501          Update broadcast by id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.update_broadcast_by_id(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :param BroadcastDataInput data: Data *(Optional)*         :return: Success                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Update broadcast by id  # noqa: E501          Update broadcast by id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.update_broadcast_by_id_with_http_info(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: ID of Broadcast **(Required)** (required)         :param BroadcastDataInput data: Data *(Optional)*         :return: Success                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501