Java client library for the SVRF API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swagger-codegen
docs
gradle/wrapper
src
.gitignore
.project
.swagger-codegen-ignore
.travis.yml
LICENSE.md
README.md
build.gradle
build.sbt
git_push.sh
gradle.properties
gradlew
gradlew.bat
pom.xml
settings.gradle

README.md

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:

  1. Java 1.7+
  2. Maven/Gradle

Installation

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.svrf</groupId>
  <artifactId>svrf-client</artifactId>
  <version>1.3.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.svrf:svrf-client:1.3.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/svrf-client-1.3.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

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.

Author

api@svrf.com