alpha-coders
  • Alpha Coders
  • Reference
    • Classes
      • Alpha
    • Properties
      • getSpecificWallpapers
      • getList
    • Methods
      • ofCategory
      • ofSubCategory
      • bySort
      • fromCategory
      • fromSubCategory
      • fromTag
      • getRandomWallpaper
      • getWallpaper
      • search
      • queryCount
    • Types
Powered by GitBook
On this page
  1. Reference
  2. Methods

search

Get Wallpapers matching a given search term.

PreviousgetWallpaperNextqueryCount

Last updated 2 years ago

CtrlK
  • Parameters
  • Returns
  • Example Code

This method belongs to the class - Alpha

Parameters

PARAMETER
TYPE
OPTIONAL
DESCRIPTION

term

The search term used for the matching. (MAX 128 Characters)

options

👍

Optional parameters.

Returns

Promise<Array<Wallpaper> | null>

Example Code

new Alpha(apiKey).search('video games').then(x => console.log(x));

// OR

new Alpha(apiKey).search('video games', {
    page: 10,
operator: 'min',
type: 'phone',
ratio: [0.75, 1]
}).then(x => console.log(x));
String
BySortOptions