Skip to contents

IndonesiAPIs 0.1.1

Bug Fixes

  • Improved error handling in all API functions to comply with CRAN policies regarding internet resources
  • All functions now fail gracefully with informative messages when APIs are unavailable or return errors
  • Added timeout handling (10 seconds) to prevent hanging connections during API requests
  • Added robust error handling with tryCatch() blocks for network errors, HTTP errors, and JSON parsing errors
  • Functions now return NULL with clear messages instead of throwing errors when API calls fail

Documentation Improvements

  • Updated all function examples to use \donttest{} instead of if (interactive()) to prevent issues during R CMD check
  • Enhanced documentation to clarify that functions return NULL when APIs are unavailable
  • Added more detailed error messages to guide users when connection issues occur

Affected Functions

All API-calling functions have been updated with improved error handling:

Technical Details

  • All HTTP requests now include httr::timeout(10) parameter
  • Added http_error() and http_status() checks for robust HTTP error detection
  • Replaced stop() with message() + return(NULL) pattern for graceful failures
  • Enhanced @importFrom declarations to include new error handling functions

Additional Information


IndonesiAPIs 0.1.0

CRAN release: 2025-09-09

Initial Release

  • First release of IndonesiAPIs package
  • Added view_datasets_IndonesiAPIs() function to explore available datasets
  • Access Indonesian Data via Public APIs and Curated Datasets

Features

API Functions

Data Sources

  • REST Countries API for country information
  • World Bank Open Data API for economic and social indicators
  • Nager.Date API for public holidays

Utility Functions