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

PENG-6243 - Introduce support for billing-usage APIs #134

Merged
merged 11 commits into from
Mar 20, 2025
Merged

Conversation

cpontes-ns1
Copy link
Contributor

@cpontes-ns1 cpontes-ns1 commented Mar 19, 2025

  1. Adds support for the billing usage endpoints
  • /billing-usage/v1/queries
  • /billing-usage/v1/decisions
  • /billing-usage/v1/monitors
  • /billing-usage/v1/records
  • /billing-usage/v1/filter-chains
  • /billing-usage/v1/limits
  1. Updates supported python versions based on currently tested version
  2. Fixes CI workflows for deprecated python versions

@@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The v1 version doesn't support python 3.8 anymore it seems. Updating it to v4 solves the issue

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like all of our GitHub actions should be tracked with Dependabot. Probably our other dependencies too, since they all seem to be development or build related?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe yeah

@@ -32,12 +32,12 @@ jobs:
strategy:
matrix:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see this versions, these are the ones we're actually testing against. Because of this, I'm updating the readme

Copy link
Contributor

Choose a reason for hiding this comment

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

Python 3.8 was EOL almost 6 months ago:

https://devguide.python.org/versions/

I guess it's okay to continue to support it, although not too strenuously. 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, thought about just doing 3.9 onwards. Let me know if you want me to do it or if we're happy to support 3.8 for now

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine, although if any of our CI tools stop working then we should happily drop 3.8 support!

@@ -15,8 +15,8 @@ and includes both a simple NS1 REST API wrapper as well as a higher level
interface for managing zones, records, data feeds, and more.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating based on my comment above

@@ -45,6 +44,10 @@ class Config:

API_VERSION = "v1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

First time we're adding support for endpoint under the new schema, so I had to come up with a solution

https://api.nsone.net/v1/zones vs https://api.nsone.net/zones/v1

@@ -247,9 +247,9 @@ def _request_func(self, method, headers, data, files):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Formatting highlighted by the linter

Copy link
Contributor

@shane-ns1 shane-ns1 left a comment

Choose a reason for hiding this comment

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

Seems reasonable! I have a few nits and also a suggestion to stop using printf-style strings and move to f-strings. 😄

@@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v2
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like all of our GitHub actions should be tracked with Dependabot. Probably our other dependencies too, since they all seem to be development or build related?

@@ -32,12 +32,12 @@ jobs:
strategy:
matrix:
Copy link
Contributor

Choose a reason for hiding this comment

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

Python 3.8 was EOL almost 6 months ago:

https://devguide.python.org/versions/

I guess it's okay to continue to support it, although not too strenuously. 😉

Copy link
Contributor

@shane-ns1 shane-ns1 left a comment

Choose a reason for hiding this comment

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

Okay, I think it looks good!

@cpontes-ns1 cpontes-ns1 merged commit 506c5ac into master Mar 20, 2025
9 checks passed
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.

3 participants