Adds support for retrieving a team name and associated environment given an API key. This is similar to the existing VerifyWriteKey and VerifyAPIKey functions, but also returns the environment. The library uses the 1/auth endpoint to retrieve this information.
Short description of the changes
Create shared func to retrieve team to use 1/auth endpoint and also retrieve environment
Update VerifyWriteKey and VerifyAPIKey to use new shared func
Add GetTeamAndEnvironment func that uses the new shared logic
Add unit tests to verify behaviour of all three functions
Which problem is this PR solving?
Adds support for retrieving a team name and associated environment given an API key. This is similar to the existing VerifyWriteKey and VerifyAPIKey functions, but also returns the environment. The library uses the
1/auth
endpoint to retrieve this information.Short description of the changes
1/auth
endpoint and also retrieve environmentGetTeamAndEnvironment
func that uses the new shared logic