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

NewRealtimeStatsClient API key passing is inconsistent with NewClient #118

Closed
gtaylor opened this issue Jun 3, 2019 · 0 comments · Fixed by #152
Closed

NewRealtimeStatsClient API key passing is inconsistent with NewClient #118

gtaylor opened this issue Jun 3, 2019 · 0 comments · Fixed by #152

Comments

@gtaylor
Copy link

gtaylor commented Jun 3, 2019

NewRealtimeStatsClient pulls the API key out of an environment variable, whereas NewClient gets it from a function param. It also panics instead of returning an error (unlike NewClient), but perhaps there's some reason for that.

Since this module has very recently changed hands, this might be something worth considering breaking while everyone is already going through and updating import paths.

pteichman added a commit to pteichman/go-fastly that referenced this issue Apr 10, 2020
This is an RTSClient counterpart to NewClientForEndpoint.

The existing API (NewRealtimeStatsClient) requires FASTLY_API_KEY
to be set in the environment, and panics if the endpoint url
cannot be parsed.

This new API doesn't make any environment requirements and returns
an error if its endpoint cannot be parsed, making it more flexible
for embedding in applications.

Fixes fastly#118
pteichman added a commit to pteichman/go-fastly that referenced this issue Apr 10, 2020
This is an RTSClient counterpart to NewClientForEndpoint.

The existing API (NewRealtimeStatsClient) requires FASTLY_API_KEY
to be set in the environment, and panics if the endpoint url
cannot be parsed.

This new API doesn't make any environment requirements and returns
an error if its endpoint cannot be parsed, making it more flexible
for embedding in applications.

Fixes fastly#118
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 a pull request may close this issue.

1 participant