package common
- Alphabetic
- By Inheritance
- common
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type AuthorName = Refined[String, NonEmpty]
- type ConfigKey = Refined[String, And[NonEmpty, Trimmed]]
- type DescriptionText = Refined[String, NonEmpty]
- type PublisherName = Refined[String, NonEmpty]
- type PublishingDetails = Refined[String, NonEmpty]
- sealed abstract class SearchEngineCapabilities extends Product with Serializable
All capabilities of our search engines.
All capabilities of our search engines.
An engine must return the proper capabilities it implements / supports.
- type SearchEngineName = Refined[String, And[NonEmpty, Trimmed]]
- type SearchEngineOutput = Refined[String, NonEmpty]
- type SearchEngineParserPattern = Refined[String, NonEmpty]
- sealed trait SearchMode extends Product with Serializable
All supported search modes which are needed to instrument special modes of search engines.
All supported search modes which are needed to instrument special modes of search engines.
The
GENERIC
mode should be used as the default "web search" mode. - final case class SearchProfile(engines: List[SearchEngineName], mode: Option[SearchMode]) extends Product with Serializable
A search profile is used to bundle several search engines and settings to make customisation of the search experience easier.
A search profile is used to bundle several search engines and settings to make customisation of the search experience easier.
- engines
A list of search engine names.
- mode
An optional SearchMode to be used.
- type SearchProfileName = Refined[String, And[NonEmpty, Trimmed]]
- final case class SearchProfiles(profiles: Map[SearchProfileName, SearchProfile]) extends Product with Serializable
A container for defined SearchProfile entries.
A container for defined SearchProfile entries.
- profiles
A map of the profile names with their corresponding definitions.
- final case class SearchQuery(query: String, region: Option[Alpha2CountryCode], results: PosInt) extends Product with Serializable
Simple wrapper for search queries.
Simple wrapper for search queries.
- query
The query string to pass into a search engine.
- region
The region into which the search should be restricted if possible.
- results
The desired number of results.
- final case class SearchResult(authors: List[AuthorName], description: Option[DescriptionText], imageUrl: Option[Uri], published: Option[OffsetDateTime], publisher: List[PublisherName], publishingDetails: List[PublishingDetails], searchEngines: List[SearchEngineName], title: Option[TitleString], url: Option[Uri], number: SearchResultNumber) extends Product with Serializable
A container for the data we collect for each search result.
A container for the data we collect for each search result.
A search result implements a semigroup which allows us to combine several results into one using the cats syntax
a
|+| b |+| c
. This is useful to combine results which are equal but come from different search engines. While all fields are combined using common semigroups there are exceptions. Notably the following fields are not combined but overridden by their "right" counterpart in the equation of that is defined:
imageUrl
2.published
3.url
4.number
Because combining datetimes or urls in general doesn't make sense.
- authors
A list of author names (e.g. writers of a blog post or paper) if feasible which may be empty.
- description
A textual description of the content which usually equals the teaser text shown by search engines.
- imageUrl
An optional URL pointing to an image related to the result.
- published
An optional publishing date and time.
- publisher
A list of publisher names (e.g. publishing houses for books or papers) which might be empty.
- publishingDetails
A list of details about the published item e.g. a science magazine issue with page numbers or an ISBN.
- searchEngines
A list of search engine names which returned this result.
- title
A short summary of the search result (i.e. a title).
- url
The URL pointing to the actual result which is usually a website.
- number
The "number" represents the position of it in the returned result set of a search engine and thus reflects the "importance", the lower the better.
- type SearchResultNumber = Refined[Int, NonNegative]
- type TitleString = Refined[String, NonEmpty]
Value Members
- implicit val descriptionTextSemigroup: Semigroup[DescriptionText]
- implicit val eqOrgJsoupNodesElement: Eq[Element]
- implicit val eqSttpModelUri: Eq[Uri]
- implicit val jsonDecodeSttpModelUri: Decoder[Uri]
- implicit val jsonEncodeSttpModelUri: Encoder[Uri]
- implicit val showSttpModelUri: Show[Uri]
- object AuthorName extends RefinedTypeOps[AuthorName, String] with CatsRefinedTypeOpsSyntax
- object ConfigKey extends RefinedTypeOps[ConfigKey, String] with CatsRefinedTypeOpsSyntax
- object DescriptionText extends RefinedTypeOps[DescriptionText, String] with CatsRefinedTypeOpsSyntax
- object PublisherName extends RefinedTypeOps[PublisherName, String] with CatsRefinedTypeOpsSyntax
- object PublishingDetails extends RefinedTypeOps[PublishingDetails, String] with CatsRefinedTypeOpsSyntax
- object SearchEngineCapabilities extends Serializable
- object SearchEngineName extends RefinedTypeOps[SearchEngineName, String] with CatsRefinedTypeOpsSyntax
- object SearchEngineOutput extends RefinedTypeOps[SearchEngineOutput, String] with CatsRefinedTypeOpsSyntax
- object SearchEngineParserPattern extends RefinedTypeOps[SearchEngineParserPattern, String] with CatsRefinedTypeOpsSyntax
- object SearchMode extends Serializable
- object SearchProfileName extends RefinedTypeOps[SearchProfileName, String] with CatsRefinedTypeOpsSyntax
- object SearchProfiles extends Serializable
- object SearchResult extends Serializable
- object SearchResultNumber extends RefinedTypeOps[SearchResultNumber, Int] with CatsRefinedTypeOpsSyntax
- object TitleString extends RefinedTypeOps[TitleString, String] with CatsRefinedTypeOpsSyntax