#NEWLINE# @ classmethod #NEWLINE# def create( cls , attach_host_name = False , method = 'POST' , id = None , params = None , **body ) : #NEWLINE# #INDENT# '\n        Create a new API resource object\n\n        :param attach_host_name: link the new resource object to the host name\n        :type attach_host_name: bool\n\n        :param method: HTTP method to use to contact API endpoint\n        :type method: HTTP method string\n\n        :param id: create a new resource object as a child of the given object\n        :type id: id\n\n        :param params: new resource object source\n        :type params: dictionary\n\n        :param body: new resource object attributes\n        :type body: dictionary\n\n        :returns: JSON response from HTTP API request\n        ' #NEWLINE# if ( params is None ) : #NEWLINE# #INDENT# params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( method == 'GET' ) : #NEWLINE# #INDENT# return HTTPClient . request ( 'GET' , cls . _class_url , ** body ) #NEWLINE# #UNINDENT# if ( id is None ) : #NEWLINE# #INDENT# return HTTPClient . request ( 'POST' , cls . _class_url , body , attach_host_name = attach_host_name , ** params ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return HTTPClient . request ( 'POST' , ( ( cls . _class_url + '/' ) + str ( id ) ) , body , attach_host_name = attach_host_name , ** params )