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
Parameter | Type | Description |
---|---|---|
options | object | An object for setting the HTTP request params |
options.category | string? | Search only for Media with a particular category. |
options.hasBlendShapes | boolean? | Search only for Media that has blend shapes. |
options.isFaceFilter | boolean? | Search only for face filters. |
options.minimumWidth | number? | The minimum width for video and photo Media, in pixels. |
options.pageNum | number? | Pagination control to fetch the next page of results, if applicable. |
options.requiresBlendShapes | boolean? | Search only for Media that requires blend shapes. |
options.size | number? | The number of results to return per-page, from 1 to 100. |
options.stereoscopicType | string? | The type(s) of Media to be returned. |
options.type | `string? | string[]?` |
Return Value
Returns a promise with a TrendingMediaAPIResponse
object.
Name | Type | Description |
---|---|---|
success | boolean | Whether the request was successful or not. |
media | Media | A Media object. |
nextPageNum | number | The next page number. |
pageNum | number | The 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
Parameter | Type | Description |
---|---|---|
query | string | Search query. |
options | object | An object for setting the HTTP request params |
options.category | string? | Search only for Media with a particular category. |
options.hasBlendShapes | boolean? | Search only for Media that has blend shapes. |
options.isFaceFilter | boolean? | Search only for face filters. |
options.minimumWidth | number? | The minimum width for video and photo Media, in pixels. |
options.pageNum | number? | Pagination control to fetch the next page of results, if applicable. |
options.requiresBlendShapes | boolean? | Search only for Media that requires blend shapes. |
options.size | number? | The number of results to return per-page, from 1 to 100. |
options.stereoscopicType | string? | The type(s) of Media to be returned. |
options.type | `string? | string[]?` |
Return Value
Returns a promise with a SearchMediaAPIResponse
object.
Name | Type | Description |
---|---|---|
success | boolean | Whether the request was successful or not. |
media | Media | A Media object. |
nextPageNum | number | The next page number. |
pageNum | number | The page number of the returned result. |
tookMs | number | The amount of time in milliseconds (ms). |
totalNum | number | The 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
Parameter | Type | Description |
---|---|---|
id | `number | string` |
Return Value
Returns a promise with a SingleMediaApiResponse
object.
Name | Type | Description |
---|---|---|
success | boolean | Whether the request was successful or not. |
media | Media | A Media object. |