Skip to content

Make data explicit. #4

Description

@hbredin

Most methods have a data parameter that is not very self-explanatory.
For instance, how would someone know what to put in data when calling client.create_user(data)?

It would be better to define clearly what is expected from the user.
Otherwise, to use the client, one must have a look at the REST API documentation.

def create_user(self, username=None, password=None, role='user'):
    data = {'username': username, 'password': password, 'role': role}
    self.post('user', data)

This stands for most methods (not only create_user).
@clbarras @juandelamontana what do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions