Skip to content

Add (minimal implementation of) UrlboxClient (both code and tests). #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

AlanDonohoe
Copy link
Contributor

@AlanDonohoe AlanDonohoe commented Nov 19, 2021

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):

image

image

@AlanDonohoe AlanDonohoe force-pushed the add-urlbox-client-class-and-tests branch from 249f421 to 2a34390 Compare November 19, 2021 13:04
@AlanDonohoe AlanDonohoe changed the title Add (minimal implementation of) UrlboxClient both code and tests. Add (minimal implementation of) UrlboxClient (both code and tests). Nov 19, 2021
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.
@AlanDonohoe AlanDonohoe force-pushed the add-urlbox-client-class-and-tests branch from 2a34390 to f8e9180 Compare November 19, 2021 13:08
@urlbox-io urlbox-io merged commit 1f8d219 into main Nov 22, 2021
@AlanDonohoe AlanDonohoe deleted the add-urlbox-client-class-and-tests branch November 22, 2021 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants