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

feat: implement resource actions clients #252

Merged
merged 8 commits into from
Aug 14, 2023
Merged

Conversation

jooola
Copy link
Member

@jooola jooola commented Jul 21, 2023

This implements the new per resources actions endpoints.

Related to https://docs.hetzner.cloud/changelog#2023-06-29-resource-action-endpoints

# Existing API
client.actions.get_by_id() # /actions/{id}
client.<resource>.get_actions_all() # /<resource>/{resource_id}/actions
client.<resource>.get_actions_list() # /<resource>/{resource_id}/actions

# New API
client.<resource>.actions.get_all() # /<resource>/actions 
client.<resource>.actions.get_list() # /<resource>/actions
client.<resource>.actions.get_by_id() # /<resource>/actions/{id}

# Not planned
client.<resource>.get_action_by_id() # /<resource>/{resource_id}/actions/{id}

# Deprecated
client.actions.get_all() # /actions
client.actions.get_list() # /actions

One exception is the primary IPs client, it doesn't include calls to /<resource>/{resource_id}/actions or /<resource>/{resource_id}/actions/{id}: https://docs.hetzner.cloud/#primary-ip-actions

@jooola jooola changed the title feat: implement clients new get_action_by_id calls feat: implement actions clients Jul 24, 2023
@jooola jooola force-pushed the actions branch 7 times, most recently from 1db8f80 to a144cc2 Compare August 4, 2023 15:50
@jooola jooola force-pushed the actions branch 2 times, most recently from 499fe05 to 5d88e84 Compare August 9, 2023 13:09
@jooola jooola marked this pull request as ready for review August 10, 2023 08:20
@jooola jooola changed the title feat: implement actions clients feat: implement resource actions clients Aug 10, 2023
Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

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

Nice 🥳

@jooola jooola merged commit 4bb9a97 into hetznercloud:main Aug 14, 2023
8 checks passed
@jooola jooola deleted the actions branch August 14, 2023 12:27
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