Skip to content
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

Add client for checking opt out status #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asloobq
Copy link
Contributor

@asloobq asloobq commented Jun 6, 2024

No description provided.

req, nonce = make_v2_request(self._client_secret, dt.datetime.now(tz=timezone.utc),
json.dumps(request_payload).encode())
resp = post(self._base_url, '/v2/optout/status', headers=auth_headers(self._api_key), data=req)
return parse_v2_response(self._client_secret, resp.read(), nonce)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we decide to merge it, would you mind have some unit tests for this class?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NVM, we do not want to spend too much time on this. And it is a simple class. No unit tests is also good to me.


def _usage():
print(
'Usage: python3 sample_optout_status_client.py <base_url> <api_key> <client_secret> <advertising_id_1> <advertising_id_2> ... <advertising_id_3>'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: maybe <advertising_id_n> instead of <advertising_id_3>?

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