Skip to content

implement vessel insights API endpoint#238

Open
lykmapipo wants to merge 10 commits intodevelopfrom
feature/vessel-insights
Open

implement vessel insights API endpoint#238
lykmapipo wants to merge 10 commits intodevelopfrom
feature/vessel-insights

Conversation

@lykmapipo
Copy link
Copy Markdown
Collaborator

@lykmapipo lykmapipo commented Feb 27, 2026

This:

  • Implement gfw_vessel_insights() for interacting with the GFW Vessels Insights API
  • Implement validation, date parsing, and user-facing error messages
  • Normalize Insights API responses into a single-row tibble
  • Enhance documentation with detailed @description, @details, and comprehensive @examples
  • Export gfw_vessel_insights() and update NAMESPACE to make it publicly available
  • Add with_gfw_json_fixture() test helper and reformat JSON fixtures test data

This:
- add `get_vessel_insights()` for interacting with the vessels insights API
- add `with_gfw_json_fixture()` helper for loading fixture JSON files in tests
This also:
- export `get_vessel_insights` and update NAMESPACE
- improve validation, error messages, and date parsing
- default API key to `gfw_auth()`
- refactor request body construction for Insights API
- update examples, fixtures, and tests to match new interface
- reformat JSON fixtures for consistency and clarity
…tion tests

This:
- add `print_request` flag to optionally print the HTTP request for debugging
- fix typo in missing API token error message
- expand unit tests to cover NULL, NA, empty string, and envvar-based key errors
- improve documentation and examples for the new debug option
…bble

This:
- improve documentation with detailed @description, @details, and @examples
- normalize Insights API response into a single-row tibble with list-columns
- update unit tests to assert tibble structure and exact response mapping
This:
- addresses and closes #162
- rename `get_vessel_insights()` to `gfw_vessel_insights()`
- update roxygen examples to use new function name
- regenerate `NAMESPACE` to export `gfw_vessel_insights` instead of `get_vessel_insights`
- update all testthat references and expectations to use `gfw_vessel_insights`
@lykmapipo lykmapipo linked an issue Feb 27, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the API Insights endpoint

2 participants