exa_api 1.1.1
exa_api: ^1.1.1 copied to clipboard
A pure dart SDK for the Exa API.
1.1.1 #
π© [Added]: Environment variable support for API key via EXA_API_KEY using String.fromEnvironment()
π© [Added]: Flexible authentication with optional apiKey constructor parameter
π© [Added]: Comprehensive null safety for all response model fields
π© [Added]: Enhanced documentation with authentication options and usage examples
π© [Added]: Migration guide for upgrading from 1.0.x
π¨ [Changed]: BREAKING - All response model fields are now nullable to handle uncertain API responses:
AnswerResponse:answer,citationsβ nullableAnswerCitation:id,url,titleβ nullableSearchResponse:requestId,resolvedSearchType,resultsβ nullableSearchResult:title,url,idβ nullableCostBreakdown:search,contents,breakdownβ nullableContentsResponse:requestId,resultsβ nullableContentStatus:id,statusβ nullable
π¨ [Changed]: Constructor now accepts optional apiKey parameter instead of required
π¨ [Changed]: Updated README with compile-time environment variable setup instructions
π¨ [Changed]: Enhanced example applications with null-safe access patterns
π¨ [Changed]: Improved class and method documentation
πͺ [Fixed]: Proper error handling in example applications for nullable response fields
πͺ [Fixed]: Add more robust handling for improper date formats
Migration from 1.0.x #
When upgrading from version 1.0.x, update your code to handle nullable response fields:
// Before (1.0.x)
print('Title: ${result.title}');
print('Found ${results.results.length} results');
// After (1.1.0+)
print('Title: ${result.title ?? 'No title'}');
print('Found ${results.results?.length ?? 0} results');
1.0.2 #
- Initial version.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Types of Changes #
- π© Added
- π¨ Changed
- π§ Deprecated
- π₯ Removed
- πͺ Fixed
- π¦ Security