npm install
Configure .env
file with appropriate keys for integrated services.
The API only has one endpoint, the defulat /
, so the string you write there is the "search-string" which is used to search the added services.
Searching for cats is done this way http://localhost:1221/search/cats
The query name for limit is l
and is of type Number
, which might look this way l=1
The query name for pagination is p
and is of type Number
, which might look this way p=1
You can choose to only make a search on a specific service with specifying the name of with the help of the service query.
The query name for pagination is s
and is of type String
, which might look this way s=pixabay
A combined search with al the queries might look like this: http://localhost:1221/search/cat dog?l=1&p=1&s=pixabay
[
{
url: 'https://www.pexels.com/',
name: 'Pexels',
list: [{
orginalName: "name.jpg",
provider: "pexels",
assetType: "image", //could also be video for some providers
duration: 11, //This field is only included if assetType is video
scaledImages: {
kse: {
large: { //Used for displaying full size images
width: 0,
height: 0,
url: "https://url.url.url/name.jpg"
},
squareMedium: { //Used for displaying listing/preview sized images
width: 0,
height: 0,
url: "https://url.url.url/name.jpg"
}
}
},
credit: {
text: null,
link: null,
name: null
},
downloadUrl: '',
detailsUrl: ''
}],
},
{
displayName: "Pixabay",
url: 'https://pixabay.com/',
list: []
}
]
Included services at this moment is