def add_endpoint_method(url, method, args, arg_defaults, func_desc):
    """
        This will add the get, put, post, delete 
        function for the endpoint method
        :param url:          str of the url of the endpoint
        :param method:       str of get, put, post, or delete
        :param args:         list of str of arg
        :param arg_defaults: dict of arg default values
        :param func_desc:    str of the function description from the server doc
        :return:             str of the method function
    """
    tab = len(args) < 3 and ', ' or ',\n' + ' ' * (32 + len(method))
    tab2 = tab + '          '
    method = method.lower()
    ret = '\n    def %s(%s' % (method, 'self')
    if url == 'pnp/game/board':
        pass
    for arg in args:
        arg_par = arg in arg_defaults and '%s=%s' % (arg, repr(arg_defaults
            [arg])) or arg
        if len((ret + ', ' + arg_par).split('\n')[-1]) > 120:
            ret += ',\n' + ' ' * (9 + len(method)) + arg_par
        else:
            ret += ', ' + arg_par
    ret += """):
        ""\"%s""\"
""" % func_desc.replace('\n', '\n    ')
    ret += '        return self.connection.%s(' % method
    if method.lower() in ['get', 'delete']:
        ret += '%s)\n' % tab.join(["'%s'" % url] + [('%s=%s' % (arg, arg)) for
            arg in args])
    elif args:
        ret += '%s%sdata=dict(%s))\n' % ("'%s'" % url, tab, tab2.join([(
            '%s=%s' % (arg, arg)) for arg in args]))
    else:
        ret += "'%s')\n" % url
    return ret
