Stickam | Mobile | Developers | PayPerLive | LiveCitizen
 

Java Client

Download(Ver 1.0)
StreamAPI4j.zip
Documentation

*To create a client:
StreamAPIClient client = StreamAPIClient(apiKey,secretKey);


*To register user with streamAPI service:
Long publicHostId = client.registerUser(siteUserId,screenName);


*To Create a session anonymously:
Session session = client.createSession();
or
Session session = client.createSession(screenName);


*To Create a session for registered user:
Session session = client.createSession(publicHostId);
or
Session session = client.createSession(siteUserId,screenName);


*To get status of a session:
LiveSession liveSession = client.getLiveSessionStatus(publicHostId);


*To get list of live sessions:
List<LiveSession> liveSessionsList = client.getLiveSessionsList();


*To get list of recorded videos for specific user:
List<RecordedVideo> videosList = client.getRecordedVideosList(publicHostId,startDate,endDate);


*To get list of all recorded videos:
List<RecordedVideo> videosList = client.getRecordedVideosList(null,null,null);


*To get list of all layout themes:
List<LayoutTheme> themeList = client.getLayoutThemeList();


*Note:
siteUserId: the unique user id in your system
screenName: the screen name which is going to be used in the player as host name
publicHostId: the unique id assigned by the streamAPI system which is used in the embed code.