Skip to content

Refactor Client class #30

@LakiG

Description

@LakiG

The Client class has methods with many recurring arguments. The class can be refactored on the following lines for better usability.

  • Initiate a client with only those parameters that you need for multiple instance methods and that will be the same for every request. You don't want to instantiate a new client for every request you send.
  • Remove all parameters from the instance methods that you already pass when instantiating the client and refer to them as self.param. No param should be passed to both the class constructor and any of the instance methods.
  • Obviously define only those params in an instance method that you really need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions