Conversation
Refactor parser
add slack handler
add cloudbuild
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.4.0 to 1.7.0. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](gin-gonic/gin@v1.4.0...v1.7.0) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…/gin-gonic/gin-1.7.0 Bump github.com/gin-gonic/gin from 1.4.0 to 1.7.0
Add new `WaterLevelAPI` interface and implementations for querying water level data from different APIs. * **Add `WaterLevelAPI` interface:** - Create `pkg/api/water_level_api.go` to define the `WaterLevelAPI` interface with methods `GetLevel(station string) (float64, error)` and `GetStationList() ([]Station, error)`. * **Implement `WaterLevelAPI` for National Water System:** - Create `pkg/api/nws_api.go` to implement the `WaterLevelAPI` interface for the National Water System. - Move the `GetLevel` and `GetStationList` functions from `pkg/nws/nws.go` to this file. * **Implement `WaterLevelAPI` for USGS Water Services API:** - Create `pkg/api/usgs_api.go` to implement the `WaterLevelAPI` interface for the USGS Water Services API. * **Implement `WaterLevelAPI` for Environment Canada Water Office API:** - Create `pkg/api/ecwo_api.go` to implement the `WaterLevelAPI` interface for the Environment Canada Water Office API. * **Update existing code to use `WaterLevelAPI` interface:** - Modify `pkg/nws/nws.go` to remove the `GetLevel` and `GetStationList` functions and update the code to use the `WaterLevelAPI` interface. - Modify `pkg/router/router.go` to use the `WaterLevelAPI` interface for querying water level data. - Modify `pkg/router/router_test.go` to test the new implementations of the `WaterLevelAPI` interface. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gabeduke/level?shareId=XXXX-XXXX-XXXX-XXXX).
…WO APIs * **pkg/api/water_level_api.go**: Create WaterLevelAPI interface with methods GetLevel and GetStationList * **pkg/api/nws_api.go**: Implement WaterLevelAPI interface for National Water System, move GetLevel and GetStationList functions from pkg/nws/nws.go * **pkg/api/usgs_api.go**: Implement WaterLevelAPI interface for USGS Water Services API * **pkg/api/ecwo_api.go**: Implement WaterLevelAPI interface for Environment Canada Water Office API * **pkg/nws/nws.go**: Remove GetLevel and GetStationList functions, update code to use WaterLevelAPI interface * **pkg/router/router.go**: Update code to use WaterLevelAPI interface, implement api.Slack function * **pkg/router/router_test.go**: Update tests to use new implementations of WaterLevelAPI interface * **pkg/api/slack.go**: Define and implement api.Slack struct
Add support for querying multiple water level APIs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
merge develop