mardi 19 mai 2015

can you help me whats should i pass to this function?

I am using syanpase lib and i am not sure what input i should pass to this method.

class User(APIResource):
    @classmethod
    def create(cls, params={},  headers={}):
        method = APIMethod("post", "/user/create", params, headers, cls)
        json = method.execute()
        return Client().refresh_from(json)

I am trying to pass json but it will returning error, invalid user. Below is the super class

# Everything below here is used behind the scenes.
def __init__(self, *args, **kwargs):
    super(User, self).__init__(*args, **kwargs)
    APIResource.register_api_subclass(self, "user")

This is the sample input I'm supposed to pass, but still its returning weird output.

Aucun commentaire:

Enregistrer un commentaire