(self, url_data, service_id, service_version)
return create_settings
Returns settings response json.

        :return: a JSON-serializable dictionary matching the format of the JSON
                 response for fastly_client.create_settings()
                 ("/service/<service_id>/version/<service_version>/settings)
                 request.
Returns settings response json.
Returns settings response json .
def create_settings(self, url_data, service_id, service_version):
        """
        Returns settings response json.

        :return: a JSON-serializable dictionary matching the format of the JSON
                 response for fastly_client.create_settings()
                 ("/service/<service_id>/version/<service_version>/settings)
                 request.
        """
        request_dict = {k: v[0] for k, v in url_data}

        create_settings = {
            "service_id": service_id,
            "version": service_version,
            "general.default_ttl": request_dict.get("general.default_ttl", 0),
            "general.default_host": request_dict.get("general.default_host", "")
        }

        if 'settings_list' not in self.fastly_cache[service_id]:
            self.fastly_cache[service_id]['settings_list'] = []

        self.fastly_cache[service_id][
            'settings_list'].append(create_settings)
        return create_settings
def create_settings ( self , url_data , service_id , service_version ) : request_dict = { k : v [ 0 ] for k , v in url_data } create_settings = { "service_id" : service_id , "version" : service_version , "general.default_ttl" : request_dict . get ( "general.default_ttl" , 0 ) , "general.default_host" : request_dict . get ( "general.default_host" , "" ) } if 'settings_list' not in self . fastly_cache [ service_id ] : self . fastly_cache [ service_id ] [ 'settings_list' ] = [ ] self . fastly_cache [ service_id ] [ 'settings_list' ] . append ( create_settings ) return create_settings