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 support for the v1beta1 alerts api. #131

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hhellyer
Copy link
Contributor

This PR adds support for the alerts api.

  • Adds code to call the new alerts api.
  • Adds testcases.
  • Adds example.


class Alerts(resource.BaseResource):
ROOT = "../alerting/v1beta1/alerts"
PASSTHRU_FIELDS = [
Copy link
Contributor

Choose a reason for hiding this comment

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

what about type/subtype?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those aren't passthru as they are required on create, so can be named params in that call, and are immutable afterwards so aren't specified later.

)
],
)
def test_rest_alert_create(
Copy link
Contributor

Choose a reason for hiding this comment

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

cant we add some data as well?

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