Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SearchBaseClass<ImageResult>

Type parameters

  • ImageResult = any

Hierarchy

Index

Constructors

  • new SearchBaseClass<ImageResult>(__namedParameters: { apiKey: string; color: string; icon: string; name: string; noRecolor?: boolean; poweredByUrl: string; fetchSettings?: any; getButton: any; getPopularResults: any; getSearchResults: any; popularEndpoint: any; searchEndpoint: any }): SearchBaseClass<ImageResult>
  • Type parameters

    • ImageResult = any

    Parameters

    • __namedParameters: { apiKey: string; color: string; icon: string; name: string; noRecolor?: boolean; poweredByUrl: string; fetchSettings?: any; getButton: any; getPopularResults: any; getSearchResults: any; popularEndpoint: any; searchEndpoint: any }
      • apiKey: string
      • color: string
      • icon: string
      • name: string
      • Optional noRecolor?: boolean
      • poweredByUrl: string
      • fetchSettings?:function
        • fetchSettings(apiKey: string): RequestInit
        • Parameters

          • apiKey: string

          Returns RequestInit

      • getButton:function
        • getButton(image: ImageResult): string
        • Parameters

          • image: ImageResult

          Returns string

      • getPopularResults:function
        • getPopularResults(response: any): ImageResult[]
        • Parameters

          • response: any

          Returns ImageResult[]

      • getSearchResults:function
        • getSearchResults(response: any): ImageResult[]
        • Parameters

          • response: any

          Returns ImageResult[]

      • popularEndpoint:function
        • popularEndpoint(apiKey: string): string
        • Parameters

          • apiKey: string

          Returns string

      • searchEndpoint:function
        • searchEndpoint(apiKey: string, query: string): string
        • Parameters

          • apiKey: string
          • query: string

          Returns string

    Returns SearchBaseClass<ImageResult>

Properties

apiKey: string
color: string = "#333"
fetchSettings?: RequestInit
getButton: (image: ImageResult) => string

Type declaration

    • (image: ImageResult): string
    • Parameters

      • image: ImageResult

      Returns string

getPopularResults: (response: any) => ImageResult[]

Type declaration

    • (response: any): ImageResult[]
    • Parameters

      • response: any

      Returns ImageResult[]

getSearchResults: (response: any) => ImageResult[]

Type declaration

    • (response: any): ImageResult[]
    • Parameters

      • response: any

      Returns ImageResult[]

icon: string = ""
invisible: boolean = false
loading: boolean = false
name: string = ""
noRecolor: boolean = false
popularEndpoint: string
poweredByUrl: string
results: ImageResult[] = []
searchEndpoint: (apiKey: string, query: string) => string

Type declaration

    • (apiKey: string, query: string): string
    • Parameters

      • apiKey: string
      • query: string

      Returns string

stop: () => void = ...

Type declaration

    • (): void
    • Returns void

supports: () => boolean = ...

Type declaration

    • (): boolean
    • Returns boolean

type: string = "service"

Methods

  • Parameters

    Returns void

  • Parameters

    Returns string

  • Parameters

    Returns void

  • Parameters

    Returns void

Generated using TypeDoc