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

s/api.AccountID/accountID #850

Conversation

jacobbednarz
Copy link
Member

Updates all methods that were relying on api.AccountID via the client
constructor to pass in explicit account IDs for the methods instead.

Even though the Workers APIs still use api.AccountID, I'm leaving them
as the whole thing needs an overhaul now that the API has settled.

Closes #694

@jacobbednarz
Copy link
Member Author

cc @cehrig @tarnfeld

Updates all methods that were relying on `api.AccountID` via the client
constructor to pass in explicit account IDs for the methods instead.

Closes cloudflare#694
@jacobbednarz jacobbednarz force-pushed the swap-out-api-account-for-explicit-value branch from 54f6b8f to 7da278b Compare April 4, 2022 00:44
@jacobbednarz jacobbednarz merged commit 2f021c8 into cloudflare:master Apr 6, 2022
@jacobbednarz jacobbednarz deleted the swap-out-api-account-for-explicit-value branch April 6, 2022 05:06
jacobbednarz added a commit to jacobbednarz/cloudflare-go that referenced this pull request May 16, 2022
Only workers relies on this now so we can deprecate it in favour of
explicit account identifiers.

Cleans up tests that never actually needed this.

Follows on from cloudflare#850
jacobbednarz added a commit to jacobbednarz/cloudflare-go that referenced this pull request May 16, 2022
Only workers relies on this now so we can deprecate it in favour of
explicit account identifiers.

Cleans up tests that never actually needed this.

Follows on from cloudflare#850
@favonia
Copy link
Contributor

favonia commented May 25, 2022

@jacobbednarz Question: how about the ZoneIDByName method?

cloudflare-go/cloudflare.go

Lines 147 to 149 in 9af8b92

func (api *API) ZoneIDByName(zoneName string) (string, error) {
zoneName = normalizeZoneName(zoneName)
res, err := api.ListZonesContext(context.Background(), WithZoneFilters(zoneName, api.AccountID, ""))

@jacobbednarz
Copy link
Member Author

yep, that eventually needs to be removed but i've left it in place as ZoneIDByName/ListZonesContext will be gone in the next major release since the List method will have some search options included as outlined in the experimental client docs.

we can change it now but i'm not too worried if it hangs around for now.

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.

IP List methods should accept an account ID parameter
2 participants