Currently SDK supports ActivityStream, Profiles, Community and Files service.
Service classes for Connections:
ProfileService : com.ibm.sbt.services.client.connections.profiles
CommunityService : com.ibm.sbt.services.client.connections.communities
FileService : com.ibm.sbt.services.client.connections.files
Service classes for SmartCloud:
ProfileService : com.ibm.sbt.services.client.smartcloud.profiles
All these classes are pretty similar with consumption patterns used. A developer just needs to instantiate one of the above classes depending on which functionality and platform his application targets and then call appropriate functions. For example:
ProfileService profileservice= new ProfileService();
Each service supports two constructors:
- Default Constructor - This chooses the default endpoint for application.
- Endpoint Constructor - This constructor accepts Endpoint as argument, and creates the instance using this endpoint instead of default one.
All these classes have associated Entity objects like ProfileService has Profiles ( com.ibm.sbt.services.client.connections.profiles ). Developer can call all functionality methods once these business objects have been populated with data. For example:
Profile profile = profileservice.getProfile("sampleuserid");
For service which return more than one result like ActivityStreams, functions return an object of type EntityList ( ActivityStreamEntityList in this case ). You can iterate over this list object and get individual Entity objects similar to above. EntityList also provides for functions which can provide meta data about the api call, for this functions like getTotalResults() , getItemsPerPage() etc. could be used.
For information on specific functionality in these classes a developer can either refer to javadocs or samples ( com.ibm.sbt.sample.web\samples\java\ ).
Parent topic: Runtime concepts