Add (minimal implementation of) UrlboxClient (both code and tests). #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's this PR do?
Adds (minimal implementation of) UrlboxClient (both code and tests).
Background context
This is the core client object used to interact with the Urlbox API.
I just wanted to get a class and basic test coverage working so we can
test all the mechanics work in Github CI.
Further work will add the get() instance method to this class that will
make the basic get request to the API.
Where should the reviewer start?
urlbox/urlbox_client.py - v simple. Can only initiate an instance of the class at the moment.
But the * syntax in the constructor means that the keyword arg api_key is required, while the api_secret=None, means that the api_secret is optional.
The different permutations of the class instantiation are covered in the test: tests/test_urlbox_client.py
Where we use the Faker package to generate random api_keys and api_secrets, using the pystr() function.
refs:
https://faker.readthedocs.io/en/master/index.html
https://faker.readthedocs.io/en/master/providers/faker.providers.python.html#faker.providers.python.Provider.pyst
How should this be manually tested?
n/a - Not plumbed in yet.
Screenshots
The class level docstring comment is now visible in when you call help(UrlboxClient):