# coding: utf-8

"""
    Emby Server API

    Explore the Emby Server API  # noqa: E501

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

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from embyapi.api_client import ApiClient


class ScripterXAPIApi(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 delete_scripterx_packages_by_installationid_by_function(self, installation_id, function, **kwargs):  # noqa: E501
        """delete_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_scripterx_packages_by_installationid_by_function(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
            return data

    def delete_scripterx_packages_by_installationid_by_function_with_http_info(self, installation_id, function, **kwargs):  # noqa: E501
        """delete_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/{installationId}/{function}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_scripterx_changelog(self, **kwargs):  # noqa: E501
        """get_scripterx_changelog  # noqa: E501

        Retrieve ScripterX Change Log --- Requires authentication as user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_changelog(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_changelog_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_changelog_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_scripterx_changelog_with_http_info(self, **kwargs):  # noqa: E501
        """get_scripterx_changelog  # noqa: E501

        Retrieve ScripterX Change Log --- Requires authentication as user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_changelog_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_scripterx_changelog" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/ChangeLog', '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_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_scripterx_packages_by_installationid_by_function(self, installation_id, function, **kwargs):  # noqa: E501
        """get_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_by_installationid_by_function(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
            return data

    def get_scripterx_packages_by_installationid_by_function_with_http_info(self, installation_id, function, **kwargs):  # noqa: E501
        """get_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def get_scripterx_packages_getconfiginterface_by_installationid(self, installation_id, **kwargs):  # noqa: E501
        """get_scripterx_packages_getconfiginterface_by_installationid  # noqa: E501

        Get ScripterX Package Config Interface --- Requires authentication as user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_getconfiginterface_by_installationid(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_packages_getconfiginterface_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_packages_getconfiginterface_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
            return data

    def get_scripterx_packages_getconfiginterface_by_installationid_with_http_info(self, installation_id, **kwargs):  # noqa: E501
        """get_scripterx_packages_getconfiginterface_by_installationid  # noqa: E501

        Get ScripterX Package Config Interface --- Requires authentication as user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_getconfiginterface_by_installationid_with_http_info(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/GetConfigInterface/{installationId}', '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_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_scripterx_packages_info_by_installationid(self, installation_id, **kwargs):  # noqa: E501
        """Get Installed Package Information  # noqa: E501

        Get Installed Package Information --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_info_by_installationid(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: EmbyScripterXPackagesPackageInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_packages_info_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_packages_info_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
            return data

    def get_scripterx_packages_info_by_installationid_with_http_info(self, installation_id, **kwargs):  # noqa: E501
        """Get Installed Package Information  # noqa: E501

        Get Installed Package Information --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_info_by_installationid_with_http_info(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: EmbyScripterXPackagesPackageInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

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

    def get_scripterx_packages_instances_by_packageid(self, package_id, **kwargs):  # noqa: E501
        """Get a list of Installed Packages with PackageId  # noqa: E501

        Get a list of Installed Packages with PackageId --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_instances_by_packageid(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: (required)
        :return: list[EmbyScripterXPackagesPackageInfo]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_packages_instances_by_packageid_with_http_info(package_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_packages_instances_by_packageid_with_http_info(package_id, **kwargs)  # noqa: E501
            return data

    def get_scripterx_packages_instances_by_packageid_with_http_info(self, package_id, **kwargs):  # noqa: E501
        """Get a list of Installed Packages with PackageId  # noqa: E501

        Get a list of Installed Packages with PackageId --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_instances_by_packageid_with_http_info(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: (required)
        :return: list[EmbyScripterXPackagesPackageInfo]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'package_id' in params:
            path_params['packageId'] = params['package_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

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

    def get_scripterx_packages_reload_by_installationid(self, installation_id, **kwargs):  # noqa: E501
        """get_scripterx_packages_reload_by_installationid  # noqa: E501

        Reload a ScripterX Package Instance --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_reload_by_installationid(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: EmbyScripterXPackagesPackageReloadResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_packages_reload_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_packages_reload_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
            return data

    def get_scripterx_packages_reload_by_installationid_with_http_info(self, installation_id, **kwargs):  # noqa: E501
        """get_scripterx_packages_reload_by_installationid  # noqa: E501

        Reload a ScripterX Package Instance --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_reload_by_installationid_with_http_info(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: EmbyScripterXPackagesPackageReloadResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

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

    def get_scripterx_packages_remove_by_installationid(self, installation_id, **kwargs):  # noqa: E501
        """get_scripterx_packages_remove_by_installationid  # noqa: E501

        Uninstall a ScripterX Package --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_remove_by_installationid(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: EmbyScripterXPackagesPackageUninstallResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_scripterx_packages_remove_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_scripterx_packages_remove_by_installationid_with_http_info(installation_id, **kwargs)  # noqa: E501
            return data

    def get_scripterx_packages_remove_by_installationid_with_http_info(self, installation_id, **kwargs):  # noqa: E501
        """get_scripterx_packages_remove_by_installationid  # noqa: E501

        Uninstall a ScripterX Package --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_scripterx_packages_remove_by_installationid_with_http_info(installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :return: EmbyScripterXPackagesPackageUninstallResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

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

    def head_scripterx_packages_by_installationid_by_function(self, installation_id, function, **kwargs):  # noqa: E501
        """head_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.head_scripterx_packages_by_installationid_by_function(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.head_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.head_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
            return data

    def head_scripterx_packages_by_installationid_by_function_with_http_info(self, installation_id, function, **kwargs):  # noqa: E501
        """head_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.head_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/{installationId}/{function}', 'HEAD',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def options_scripterx_packages_by_installationid_by_function(self, installation_id, function, **kwargs):  # noqa: E501
        """options_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.options_scripterx_packages_by_installationid_by_function(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.options_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.options_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
            return data

    def options_scripterx_packages_by_installationid_by_function_with_http_info(self, installation_id, function, **kwargs):  # noqa: E501
        """options_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.options_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/{installationId}/{function}', 'OPTIONS',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def patch_scripterx_packages_by_installationid_by_function(self, installation_id, function, **kwargs):  # noqa: E501
        """patch_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.patch_scripterx_packages_by_installationid_by_function(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.patch_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.patch_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, **kwargs)  # noqa: E501
            return data

    def patch_scripterx_packages_by_installationid_by_function_with_http_info(self, installation_id, function, **kwargs):  # noqa: E501
        """patch_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.patch_scripterx_packages_by_installationid_by_function_with_http_info(installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/{installationId}/{function}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_scripterx_packages_by_installationid_by_function(self, body, installation_id, function, **kwargs):  # noqa: E501
        """post_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_scripterx_packages_by_installationid_by_function(body, installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_scripterx_packages_by_installationid_by_function_with_http_info(body, installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.post_scripterx_packages_by_installationid_by_function_with_http_info(body, installation_id, function, **kwargs)  # noqa: E501
            return data

    def post_scripterx_packages_by_installationid_by_function_with_http_info(self, body, installation_id, function, **kwargs):  # noqa: E501
        """post_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_scripterx_packages_by_installationid_by_function_with_http_info(body, installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'installation_id', 'function']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/{installationId}/{function}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_scripterx_packages_saveconfig_by_installationid(self, body, installation_id, **kwargs):  # noqa: E501
        """Save Package Configuration  # noqa: E501

        Save Package Configuration --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_scripterx_packages_saveconfig_by_installationid(body, installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :param str installation_id: (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_scripterx_packages_saveconfig_by_installationid_with_http_info(body, installation_id, **kwargs)  # noqa: E501
        else:
            (data) = self.post_scripterx_packages_saveconfig_by_installationid_with_http_info(body, installation_id, **kwargs)  # noqa: E501
            return data

    def post_scripterx_packages_saveconfig_by_installationid_with_http_info(self, body, installation_id, **kwargs):  # noqa: E501
        """Save Package Configuration  # noqa: E501

        Save Package Configuration --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_scripterx_packages_saveconfig_by_installationid_with_http_info(body, installation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :param str installation_id: (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/SaveConfig/{installationId}', 'POST',
            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_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_scripterx_packages_upload(self, body, **kwargs):  # noqa: E501
        """Upload ZIP Package to ScripterX  # noqa: E501

        Upload ZIP Package to ScripterX --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_scripterx_packages_upload(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :return: EmbyScripterXPackagesPackageInstallerResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_scripterx_packages_upload_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_scripterx_packages_upload_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_scripterx_packages_upload_with_http_info(self, body, **kwargs):  # noqa: E501
        """Upload ZIP Package to ScripterX  # noqa: E501

        Upload ZIP Package to ScripterX --- Requires authentication as administrator  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_scripterx_packages_upload_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :return: EmbyScripterXPackagesPackageInstallerResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['apikeyauth', 'embyauth']  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/Upload', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EmbyScripterXPackagesPackageInstallerResult',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def put_scripterx_packages_by_installationid_by_function(self, body, installation_id, function, **kwargs):  # noqa: E501
        """put_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_scripterx_packages_by_installationid_by_function(body, installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.put_scripterx_packages_by_installationid_by_function_with_http_info(body, installation_id, function, **kwargs)  # noqa: E501
        else:
            (data) = self.put_scripterx_packages_by_installationid_by_function_with_http_info(body, installation_id, function, **kwargs)  # noqa: E501
            return data

    def put_scripterx_packages_by_installationid_by_function_with_http_info(self, body, installation_id, function, **kwargs):  # noqa: E501
        """put_scripterx_packages_by_installationid_by_function  # noqa: E501

        No authentication required  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_scripterx_packages_by_installationid_by_function_with_http_info(body, installation_id, function, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Object body: Binary stream (required)
        :param str installation_id: (required)
        :param str function: (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'installation_id', 'function']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'installation_id' in params:
            path_params['installationId'] = params['installation_id']  # noqa: E501
        if 'function' in params:
            path_params['function'] = params['function']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/ScripterX/Packages/{installationId}/{function}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
