Svrf API Docs

Media

Request augmented reality and virtual reality content from Svrf using the Media API request methods.

getTrending()

The Trending Endpoint provides your app or project with the hottest immersive content - curated by real humans. The experiences returned mirror the Svrf homepage, from timely cultural content to trending pop-culture references. The trending experiences are updated regularly to ensure users always get fresh updates of immersive content.

Syntax

Svrf.media.trending([options])
.then((res) => {})
.catch((err) => {});

Parameters

ParameterTypeDescription
optionsobjectAn object for setting the HTTP request params
options.categorystring?Search only for Media with a particular category.
options.hasBlendShapesboolean?Search only for Media that has blend shapes.
options.isFaceFilterboolean?Search only for face filters.
options.minimumWidthnumber?The minimum width for video and photo Media, in pixels.
options.pageNumnumber?Pagination control to fetch the next page of results, if applicable.
options.requiresBlendShapesboolean?Search only for Media that requires blend shapes.
options.sizenumber?The number of results to return per-page, from 1 to 100.
options.stereoscopicTypestring?The type(s) of Media to be returned.
options.type`string?string[]?`

Return Value

Returns a promise with a TrendingMediaAPIResponse object.

NameTypeDescription
successbooleanWhether the request was successful or not.
mediaMediaA Media object.
nextPageNumnumberThe next page number.
pageNumnumberThe page number of the returned result.

search()

The Search Endpoint brings the power of immersive search found on Svrf.com to your app or project. Our search engine enables your users to instantly find the immersive experience they're seeking. Content is sorted by the Svrf rating system, ensuring that the highest quality content and most relevant search results are returned first.

Syntax

Svrf.media.search(query [, options])
.then((res) => {})
.catch((err) => {});

Parameters

ParameterTypeDescription
querystringSearch query.
optionsobjectAn object for setting the HTTP request params
options.categorystring?Search only for Media with a particular category.
options.hasBlendShapesboolean?Search only for Media that has blend shapes.
options.isFaceFilterboolean?Search only for face filters.
options.minimumWidthnumber?The minimum width for video and photo Media, in pixels.
options.pageNumnumber?Pagination control to fetch the next page of results, if applicable.
options.requiresBlendShapesboolean?Search only for Media that requires blend shapes.
options.sizenumber?The number of results to return per-page, from 1 to 100.
options.stereoscopicTypestring?The type(s) of Media to be returned.
options.type`string?string[]?`

Return Value

Returns a promise with a SearchMediaAPIResponse object.

NameTypeDescription
successbooleanWhether the request was successful or not.
mediaMediaA Media object.
nextPageNumnumberThe next page number.
pageNumnumberThe page number of the returned result.
tookMsnumberThe amount of time in milliseconds (ms).
totalNumnumberThe total number of search results for this query.

getById()

Fetch Svrf Media by its ID.

Syntax

Svrf.media.getById(id)
.then((res) => {})
.catch((err) => {});

Parameters

ParameterTypeDescription
id`numberstring`

Return Value

Returns a promise with a SingleMediaApiResponse object.

NameTypeDescription
successbooleanWhether the request was successful or not.
mediaMediaA Media object.