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

        <div lang=\"ja\">自動入札設定を追加します。</div> <div lang=\"en\">Creates the Auto bidding.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bidding_strategy_service_add_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param BiddingStrategyServiceOperation bidding_strategy_service_operation:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(BiddingStrategyServiceMutateResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'bidding_strategy_service_operation'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'bidding_strategy_service_operation' in local_var_params:
            body_params = local_var_params['bidding_strategy_service_operation']
        # 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 = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/BiddingStrategyService/add', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BiddingStrategyServiceMutateResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def campaign_export_service_get_export_fields_get_with_http_info(
            self, **kwargs):  # noqa: E501
        """campaign_export_service_get_export_fields_get  # noqa: E501

        <div lang=\"ja\">エクスポートできるフィールドを照会します。</div> <div lang=\"en\">Obtains the fields which can export.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.campaign_export_service_get_export_fields_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(CampaignExportServiceGetExportFieldsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = []
        all_params.extend([
            'async_req', '_return_http_data_only', '_preload_content',
            '_request_timeout'
        ])

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method campaign_export_service_get_export_fields_get"
                    % key)
            local_var_params[key] = val
        del local_var_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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/CampaignExportService/getExportFields',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=
            'CampaignExportServiceGetExportFieldsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Exemplo n.º 3
0
    def ad_group_webpage_service_add_post_with_http_info(
            self, **kwargs):  # noqa: E501
        """ad_group_webpage_service_add_post  # noqa: E501

        <div lang=\"ja\">広告グループにPageFeedItemを配信、又は、除外として設定します。<br> ※1リクエストで異なるキャンペーン配下の広告グループに対してWebページ情報の設定が可能です。<br> ※1リクエスト内で同一のadGroupIdに同一組み合わせのWebpageParameterを設定できません。</div> <div lang=\"en\">Set allowed or excluded settings of PageFeedItem for ad group.<br> ∗ With one request, web page information can be set for ad group under different campaign.<br> ∗ Within one request, you can not set the same combination WebpageParameter to the same adGroupId.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ad_group_webpage_service_add_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param AdGroupWebpageServiceOperation ad_group_webpage_service_operation:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(AdGroupWebpageServiceMutateResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['ad_group_webpage_service_operation']
        all_params.extend([
            'async_req', '_return_http_data_only', '_preload_content',
            '_request_timeout'
        ])

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'ad_group_webpage_service_operation' in local_var_params:
            body_params = local_var_params[
                'ad_group_webpage_service_operation']
        # 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 = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/AdGroupWebpageService/add',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AdGroupWebpageServiceMutateResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Exemplo n.º 4
0
    def ad_group_feed_service_set_post_with_http_info(self, **kwargs):  # noqa: E501
        """ad_group_feed_service_set_post  # noqa: E501

        <div lang=\"ja\">広告グループにFeedItem情報を追加・更新・解除(削除)します。更新は常に上書きされるため追加分を含めて更新する必要があります。<br> ・FeedItem情報を解除するときは空の情報で更新します。<br> ・1リクエストで異なるキャンペーン配下の広告グループに対してFeedItem情報の設定が可能です。<br> ・1つの広告グループに設定できるFeedItem情報は、QUICKLINKS、CALLEXTENSIONでそれぞれ20件までです。<br> ・CALLEXTENSIONについては1広告グループあたり1件の設定をお薦めします。<br> ・1リクエスト内で同一のadGroupIdに複数のFeedItem情報を設定できません。</div> <div lang=\"en\">Add, update or release(remove) FeedItem information of ad group.<br> Update will overwrite the old information, so have to include the additional information on every updates.<br> ・To release FeedItem information, update with blank data.<br> ・It is possible to set FeedItem information to ad groups in different campaigns by single request.<br> ・FeedItem information that can be set for a single ad group is up to 20 for each QUICKLINKS, CALLEXTENSION.<br> ・As for CALLEXTENSION, We recommend setting only one phone number per ad group.<br> ・It is not possible to set multiple FeedItem information to an adGroupId by single request.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ad_group_feed_service_set_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param AdGroupFeedServiceOperation ad_group_feed_service_operation:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(AdGroupFeedServiceMutateResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'ad_group_feed_service_operation'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'ad_group_feed_service_operation' in local_var_params:
            body_params = local_var_params['ad_group_feed_service_operation']
        # 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 = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/AdGroupFeedService/set', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AdGroupFeedServiceMutateResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Exemplo n.º 5
0
    def bid_landscape_service_get_post_with_http_info(self, **kwargs):  # noqa: E501
        """bid_landscape_service_get_post  # noqa: E501

        <div lang=\"ja\">入札単価を変更したときのインプレッションやクリックの変化を予測します。<br> 一度に指定できるクライテリアは最大100個です。</div> <div lang=\"en\">Estimate the change of an impression and a click when a bid price is changed.<br> The maximum value of the selector criteria is 100.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bid_landscape_service_get_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param BidLandscapeServiceSelector bid_landscape_service_selector:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(BidLandscapeServiceGetResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'bid_landscape_service_selector'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'bid_landscape_service_selector' in local_var_params:
            body_params = local_var_params['bid_landscape_service_selector']
        # 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 = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/BidLandscapeService/get', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BidLandscapeServiceGetResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Exemplo n.º 6
0
    def offline_conversion_service_upload_post_with_http_info(
            self, account_id, upload_type, upload_file_name,
            **kwargs):  # noqa: E501
        """offline_conversion_service_upload_post  # noqa: E501

        <div lang=\"ja\">オフラインコンバージョンデータのアップロード処理を実施します。</div> <div lang=\"en\">Execute upload offline conversion data.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.offline_conversion_service_upload_post_with_http_info(account_id, upload_type, upload_file_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int account_id: <div lang=\"ja\">アカウントIDです。</div> <div lang=\"en\">Account ID.</div>  (required)
        :param str upload_type: <div lang=\"ja\">OfflineConversionUploadTypeは、アップロードする方法の種類を表します。</div><div lang=\"en\">OfflineConversionUploadType describes kind of upload method.</div><hr> <code>NEW</code> - <div lang=\"ja\">新規ファイルのアップロードです。</div><div lang=\"en\">New upload.</div> <code>ADJUSTMENT</code> - <div lang=\"ja\">調整用ファイルのアップロードです。</div><div lang=\"en\">Adjustment upload.</div>  (required)
        :param str upload_file_name: <div lang=\"ja\">アップロードファイル名です。</div> <div lang=\"en\">Upload file name.</div>  (required)
        :param file file:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(OfflineConversionServiceUploadResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['account_id', 'upload_type', 'upload_file_name', 'file']
        all_params.extend([
            'async_req', '_return_http_data_only', '_preload_content',
            '_request_timeout'
        ])

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method offline_conversion_service_upload_post" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'account_id' is set
        if self.api_client.client_side_validation and (
                'account_id' not in local_var_params or  # noqa: E501
                local_var_params['account_id'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `account_id` when calling `offline_conversion_service_upload_post`"
            )  # noqa: E501
        # verify the required parameter 'upload_type' is set
        if self.api_client.client_side_validation and (
                'upload_type' not in local_var_params or  # noqa: E501
                local_var_params['upload_type'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `upload_type` when calling `offline_conversion_service_upload_post`"
            )  # noqa: E501
        # verify the required parameter 'upload_file_name' is set
        if self.api_client.client_side_validation and (
                'upload_file_name' not in local_var_params or  # noqa: E501
                local_var_params['upload_file_name'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `upload_file_name` when calling `offline_conversion_service_upload_post`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'account_id' in local_var_params and local_var_params[
                'account_id'] is not None:  # noqa: E501
            query_params.append(
                ('accountId', local_var_params['account_id']))  # noqa: E501
        if 'upload_type' in local_var_params and local_var_params[
                'upload_type'] is not None:  # noqa: E501
            query_params.append(
                ('uploadType', local_var_params['upload_type']))  # noqa: E501
        if 'upload_file_name' in local_var_params and local_var_params[
                'upload_file_name'] is not None:  # noqa: E501
            query_params.append(
                ('uploadFileName',
                 local_var_params['upload_file_name']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file' in local_var_params:
            local_var_files['file'] = local_var_params['file']  # noqa: E501

        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
                ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/OfflineConversionService/upload',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OfflineConversionServiceUploadResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Exemplo n.º 7
0
    def page_feed_item_service_upload_post_with_http_info(
            self, account_id, upload_type, feed_id, **kwargs):  # noqa: E501
        """page_feed_item_service_upload_post  # noqa: E501

        <div lang=\"ja\">ページフィードアイテムのアップロード処理を実施します。</div> <div lang=\"en\">Executes upload page feed item.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.page_feed_item_service_upload_post_with_http_info(account_id, upload_type, feed_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int account_id: <div lang=\"ja\">アカウントIDです。</div> <div lang=\"en\">Account ID.</div>  (required)
        :param str upload_type: <div lang=\"ja\">PageFeedItemUploadTypeは、アップロードする方法の種類を表します。</div> <div lang=\"en\">PageFeedItemUploadType displays kind of upload method.</div> <hr> <code>NEW_OR_REPLACE</code> - <div lang=\"ja\">新規登録または、すべて置き換える場合の設定</div><div lang=\"en\">New registration or replace all.</div> <code>MODIFY</code> - <div lang=\"ja\">既存のページフィードアイテムを更新</div><div lang=\"en\">Modify existing page feed item.</div>  (required)
        :param int feed_id: <div lang=\"ja\">フィードIDです。</div> <div lang=\"en\">Feed ID.</div>  (required)
        :param file file:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(PageFeedItemServiceUploadResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['account_id', 'upload_type', 'feed_id', 'file']
        all_params.extend([
            'async_req', '_return_http_data_only', '_preload_content',
            '_request_timeout'
        ])

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method page_feed_item_service_upload_post" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'account_id' is set
        if self.api_client.client_side_validation and (
                'account_id' not in local_var_params or  # noqa: E501
                local_var_params['account_id'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `account_id` when calling `page_feed_item_service_upload_post`"
            )  # noqa: E501
        # verify the required parameter 'upload_type' is set
        if self.api_client.client_side_validation and (
                'upload_type' not in local_var_params or  # noqa: E501
                local_var_params['upload_type'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `upload_type` when calling `page_feed_item_service_upload_post`"
            )  # noqa: E501
        # verify the required parameter 'feed_id' is set
        if self.api_client.client_side_validation and (
                'feed_id' not in local_var_params or  # noqa: E501
                local_var_params['feed_id'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `feed_id` when calling `page_feed_item_service_upload_post`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'account_id' in local_var_params and local_var_params[
                'account_id'] is not None:  # noqa: E501
            query_params.append(
                ('accountId', local_var_params['account_id']))  # noqa: E501
        if 'upload_type' in local_var_params and local_var_params[
                'upload_type'] is not None:  # noqa: E501
            query_params.append(
                ('uploadType', local_var_params['upload_type']))  # noqa: E501
        if 'feed_id' in local_var_params and local_var_params[
                'feed_id'] is not None:  # noqa: E501
            query_params.append(
                ('feedId', local_var_params['feed_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file' in local_var_params:
            local_var_files['file'] = local_var_params['file']  # noqa: E501

        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
                ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/PageFeedItemService/upload',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PageFeedItemServiceUploadResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Exemplo n.º 8
0
    def page_feed_item_service_get_review_summary_post_with_http_info(
            self, **kwargs):  # noqa: E501
        """page_feed_item_service_get_review_summary_post  # noqa: E501

        <div lang=\"ja\">登録されているページフィードアイテムの審査成績・状況のサマリーを取得します。</div> <div lang=\"en\">Gets registered approval records of page feed item and summary of each status.</div>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.page_feed_item_service_get_review_summary_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param PageFeedItemServiceReviewSummarySelector page_feed_item_service_review_summary_selector:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(PageFeedItemServiceGetReviewSummaryResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['page_feed_item_service_review_summary_selector']
        all_params.extend([
            'async_req', '_return_http_data_only', '_preload_content',
            '_request_timeout'
        ])

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'page_feed_item_service_review_summary_selector' in local_var_params:
            body_params = local_var_params[
                'page_feed_item_service_review_summary_selector']
        # 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 = ['oAuth']  # noqa: E501

        return self.api_client.call_api(
            '/PageFeedItemService/getReviewSummary',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=
            'PageFeedItemServiceGetReviewSummaryResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)