Make init parameters match what we call them
#29
Merged
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.
We call the things that the clients need the ‘service ID’ and the ‘API key’. The client calls them
client_idandsecret. This is confusing if you’re a user of the client because you start by referring to them by the names the admin app gives them.The terms used in the UI are more readily understood, as evidenced by the amount of research we’ve done with them in place.
This commit makes two changes:
initmethod takes to match the terms we use in the UI.NotificationsClient(service_id='5c85a3d2-0ab9-44de-bb9b-45eedf2ab831')is more helpful thanNotificationsClient('5c85a3d2-0ab9-44de-bb9b-45eedf2ab831'), when both theservice_idandapi_keyare UUIDs.This is a breaking change (and is versioned as such) because it renames a method’s arguments. The clients that inherit from this one will also need their method arguments and
Supercalls updating, eg https://github.com/alphagov/notifications-admin/blob/ae203dfe53bbc167b2146024b6513b391fc8982e/app/notify_client/status_api_client.py#L5