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

Api token 79 #90

Merged
merged 38 commits into from
Aug 9, 2023
Merged

Api token 79 #90

merged 38 commits into from
Aug 9, 2023

Conversation

QuantumAli
Copy link
Contributor

This should be the completed issue 79. Please let me know if anything needs to be changed (Especially the README)

Copy link
Contributor

@vprusso vprusso left a comment

Choose a reason for hiding this comment

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

Minor comment, but overall, looks good!

README.md Outdated Show resolved Hide resolved
Co-authored-by: Vincent Russo <vincentrusso1@gmail.com>
@QuantumAli
Copy link
Contributor Author

Okay, I figured it could've done better. Thank you for the review!

README.md Outdated
@@ -26,7 +26,13 @@ following example script from `metriq-client/examples/metriq_hello.py`:
```python
from metriq import MetriqClient

client = MetriqClient(token="[Get this token from your web app account, and replace this string with it.]")
You will need to create an environment variable `` to store the Metriq API key. On Linux/Unix operating systems, you can run
Copy link
Contributor

Choose a reason for hiding this comment

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

To be clear, I'm suggesting we put this comment outside of the code block. So for instance, you would have:

You will need to create an environment variable METRIQ_CLIENT_API_KEY to store the Metriq API key. On Linux/Unix operating systems, you can run

export METRIQ_CLIENT_API_KEY=<the key you get from the website>

in your terminal. On Windows, you can similarly add this variable as an environment variable. Once you have created the environment variable, you can verify that the client works as follows:

from metriq import MetriqClient

client = MetriqClient(token=os.environ["METRIQ_CLIENT_API_KEY"])
print(client.hello())
>>> {'status': 'API is working', 'message': 'This is the Metriq public REST API.'}

@vprusso vprusso self-requested a review August 9, 2023 10:49
Copy link
Contributor

@vprusso vprusso left a comment

Choose a reason for hiding this comment

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

To be clear, I'm suggesting we put this comment outside of the code block. So for instance, you would have:

You will need to create an environment variable METRIQ_CLIENT_API_KEY to store the Metriq API key. On Linux/Unix operating systems, you can run

export METRIQ_CLIENT_API_KEY=<the key you get from the website>

in your terminal. On Windows, you can similarly add this variable as an environment variable. Once you have created the environment variable, you can verify that the client works as follows:

from metriq import MetriqClient

client = MetriqClient(token=os.environ["METRIQ_CLIENT_API_KEY"])
print(client.hello())
>>> {'status': 'API is working', 'message': 'This is the Metriq public REST API.'}

@QuantumAli
Copy link
Contributor Author

Apologies for the delay. This is it updated!

@QuantumAli QuantumAli requested a review from vprusso August 9, 2023 16:12
README.md Outdated Show resolved Hide resolved
@QuantumAli QuantumAli requested a review from vprusso August 9, 2023 16:30
Copy link
Contributor

@vprusso vprusso left a comment

Choose a reason for hiding this comment

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

Looks good! Approved.

@vprusso vprusso merged commit 15fc1d8 into unitaryfund:development Aug 9, 2023
@QuantumAli QuantumAli deleted the API-Token-79 branch August 9, 2023 17:02
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