svrf-client - the Java client library for the SVRF API
For more information, please visit https://github.com/svrf/svrf-api
Getting Started
SVRF's API allows you to supercharge your project or app with the first and largest search engine for immersive experiences. We make it simple for any developer to incorporate highly immersive experiences with all kinds of applications: virtual reality, augmented reality, mixed reality, mobile, and web.
The SVRF API Documentation is available at https://developers.svrf.com.
Requirements
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
Installation
Maven users
Add this dependency to your project's POM:
<dependency>
<groupId>com.svrf</groupId>
<artifactId>svrf-client</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
Gradle users
Add this dependency to your project's build file:
compile "com.svrf:svrf-client:1.5.0"
Others
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/svrf-client-1.5.0.jar
target/lib/*.jar
Getting Started
Please follow the installation instruction and execute the following Java code:
import com.svrf.client.*;
import com.svrf.client.auth.*;
import com.svrf.client.model.*;
import com.svrf.client.api.AuthenticateApi;
import java.io.File;
import java.util.*;
public class AuthenticateApiExample {
public static void main(String[] args) {
AuthenticateApi apiInstance = new AuthenticateApi();
Body body = new Body(); // Body |
try {
AuthResponse result = apiInstance.authenticate(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthenticateApi#authenticate");
e.printStackTrace();
}
}
}
Documentation for API Endpoints
All URIs are relative to https://api.svrf.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AuthenticateApi | authenticate | POST /app/authenticate | Authenticate application |
MediaApi | getById | GET /vr/{id} | Media by ID Endpoint |
MediaApi | getTrending | GET /vr/trending | Trending Endpoint |
MediaApi | search | GET /vr/search | Search Endpoint |
Documentation for Models
- APIKey
- Body
- Category
- ErrorResponse
- Media
- MediaFiles
- MediaImages
- MediaMetadata
- MediaStereo
- MediaType
- MediaVideos
- StereoscopicType
- SuccessResponse
- AuthResponse
- PaginationResponse
- RateLimitResponse
- SingleMediaResponse
- SearchMediaResponse
- TrendingResponse
Documentation for Authorization
Authentication schemes defined for the API:
XAppToken
- Type: API key
- API key parameter name: x-app-token
- Location: HTTP header
Recommendation
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.