SearchRequest class

The search request object.

Annotations
  • @freezed

Constructors

SearchRequest({@JsonKey(name: 'api_key') required String apiKey, required String query, @JsonKey(name: 'search_depth') @Default(SearchRequestSearchDepth.basic) SearchRequestSearchDepth searchDepth, @JsonKey(name: 'include_images') @Default(false) bool includeImages, @JsonKey(name: 'include_answer') @Default(false) bool includeAnswer, @JsonKey(name: 'include_raw_content') @Default(false) bool includeRawContent, @JsonKey(name: 'max_results') @Default(5) int maxResults, @JsonKey(name: 'include_domains', includeIfNull: false) List<String>? includeDomains, @JsonKey(name: 'exclude_domains', includeIfNull: false) List<String>? excludeDomains})
Factory constructor for SearchRequest
const
factory
SearchRequest.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory

Properties

apiKey String
Your unique API key.
no setterinherited
copyWith → $SearchRequestCopyWith<SearchRequest>
no setterinherited
excludeDomains List<String>?
A list of domains to specifically exclude from the search results. Default is None.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
includeAnswer bool
Include answers in the search results. Default is False.
no setterinherited
includeDomains List<String>?
A list of domains to specifically include in the search results. Default is None.
no setterinherited
includeImages bool
Include a list of query related images in the response. Default is False.
no setterinherited
includeRawContent bool
Include raw content in the search results. Default is False.
no setterinherited
maxResults int
The number of maximum search results to return. Default is 5.
no setterinherited
query String
The search query string.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchDepth SearchRequestSearchDepth
The depth of the search. It can be 'basic' or advanced. Default is 'basic'.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toMap() Map<String, dynamic>
Map representation of object (not serialized)
toString() String
A string representation of this object.
inherited
validateSchema() String?
Perform validations on the schema property values

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

maxResultsDefaultValue → const int
Validation constants
propertyNames → const List<String>
List of all property names of schema