See: Description
Equilibrium has developed a Java SDK that makes calls to the EQNetwork backend servers via it's Web API. The SDK supports both synchronous and asynchronous versions of each function call.
In order to use the EQNetwork SDK you must create a process. All commands will be made by calling services within
this process. When you create a new SessionManager ie.
new SessionManager("username", "password").
an authenticated SessionManager will be created. All services and commands can then be called from this manager.
An EQNetwork Pro account is required which contains an accessKey and secret, allowing access to the EQNetwork System. If you have not already created your account, you can create an account on the EQNetwork developer portal.
To authenticate with the EQNetwork service, create an EQNetwork.properties
file and place at the root
of your class path.
The properties file should contain the accessKey and secret as created on the developer portal.
SessionManager sessionManager = new SessionManager("username", "password");
List<Collection> collections = sessionManager.collectionService().getCollections();
User user = sessionManager.getCurrentSession().getUser();
PagingParameters pagingParameters = new PagingParameters(10, PagingParameters.OrderBy.Alpha);
pagingParameters.setPage(0);
SearchContext searchContext = new SearchContext("Airplanes");
CollectionContext collectionContext = new CollectionContext(searchContext);
List<Collection> searchedCollections = sessionManager.collectionService().getCollections(user,
collectionContext, pagingParameters);
//Page 2
pagingParameters.setPage(1);
searchedCollections.addAll(sessionManager.collectionService().getCollections(user, collectionContext, pagingParameters));
Collection collection = sessionManager.collectionService().getCollection(1);
List<ContentFile> contentFiles = sessionManager.contentFileService().getContentFiles(collection);
ContentFile contentFile = sessionManager.contentFileService().getContentFile(1);
Map<VideoAsset.VideoType, VideoAsset> assets = contentFile.getMuxKey().getAssetMap();
VideoAsset hiResVideo = assets.get(VideoAsset.VideoType.hires);
String hiResVideoUrl = hiResVideo.getAssetUrl();
Copyright © 2014 Equilibrium. All rights reserved.