|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EngageService
The EngageService provides access to the Janrain Engage API.
Note that methods might throw a ErrorResponeException in case your
plan (Basic, Plus or Pro) is not sufficient for making the particular
Janrain Engage API call.
| Method Summary | |
|---|---|
void |
activity(String identifier,
Activity activity)
Post an activity update to the user's activity stream. |
void |
activity(String identifier,
Activity activity,
String location)
Post an activity update to the user's activity stream. |
void |
activity(String identifier,
String activity)
Post an activity update to the user's activity stream. |
void |
activity(String identifier,
String activity,
String location)
Post an activity update to the user's activity stream. |
AllMappingsResponse |
allMappings()
Get all stored mappings for the application. |
AnalyticsResponse |
analytics(Date start,
Date end)
Get statistics for your application. |
UserDataResponse |
authInfo(String token)
Get information about the user currently signing in to your web application. |
UserDataResponse |
authInfo(String token,
boolean extended)
Get information about the user currently signing in to your web application. |
ContactsResponse |
getContacts(String identifier)
Retrieve a list of contacts for an identifier in the Portable Contacts format. |
UserDataResponse |
getUserData(String identifier)
Obtain an up-to-date copy of a user's profile as previously returned by an authInfo(String) API call. |
UserDataResponse |
getUserData(String identifier,
boolean extended)
Obtain an up-to-date copy of a user's profile as previously returned by an authInfo(String) API call. |
void |
map(String identifier,
String primaryKey)
Map an OpenID identifier to a primary key. |
void |
map(String identifier,
String primaryKey,
boolean overwrite)
Map an OpenID identifier to a primary key. |
MappingsResponse |
mappings(String primaryKey)
Get all stored mappings for a particular primary key. |
void |
setAuthProviders(List<String> providers)
Set the providers that will be displayed in the Sign-in Interface. |
void |
setStatus(String identifier,
String status)
Set the status message for the account corresponding to an identifier. |
void |
setStatus(String identifier,
String status,
String location)
Set the status message for the account corresponding to an identifier. |
boolean |
supportsActivity(String providerName)
Returns true if the provider name supports the activity(String, Activity) API call. |
boolean |
supportsSetStatus(String providerName)
Returns true if the provider name supports the setStatus(String, String) API call. |
void |
unmap(String primaryKey)
Remove (unmap) all OpenID identifiers from a primary key. |
void |
unmap(String primaryKey,
boolean unlink)
Remove (unmap) all OpenID identifiers from a primary key, and optionally unlink your application from the user's account with the provider. |
void |
unmap(String identifier,
String primaryKey)
Remove (unmap) an OpenID identifier from a primary key. |
void |
unmap(String identifier,
String primaryKey,
boolean unlink)
Remove (unmap) an OpenID identifier from a primary key, and optionally unlink your application from the user's account with the provider. |
| Method Detail |
|---|
UserDataResponse authInfo(String token)
throws EngageFailureException,
ErrorResponeException
token - The token parameter received at your "token_url".
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
UserDataResponse authInfo(String token,
boolean extended)
throws EngageFailureException,
ErrorResponeException
token - The token parameter received at your "token_url".extended - 'true' or 'false'(default). Return the extended Simple Registration and HCard data in addition to the normalized Portable Contacts format.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
ContactsResponse getContacts(String identifier)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from a previous authInfo(String) API call.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
UserDataResponse getUserData(String identifier)
throws EngageFailureException,
ErrorResponeException
authInfo(String) API call.
identifier - The identifier returned from a previous authInfo(String) API call.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
UserDataResponse getUserData(String identifier,
boolean extended)
throws EngageFailureException,
ErrorResponeException
authInfo(String) API call.
identifier - The identifier returned from a previous authInfo(String) API call.extended - 'true' or 'false'(default). Return the extended Simple Registration and HCard data in addition to the normalized Portable Contacts format.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void setStatus(String identifier,
String status)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the authInfo(String) API call.status - The status message to set. No length restriction on the status is imposed by Janrain Engage, but some providers may truncate it implicitly (e.g., Twitter).
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void setStatus(String identifier,
String status,
String location)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the authInfo(String) API call.status - The status message to set. No length restriction on the status is imposed by Janrain Engage, but some providers may truncate it implicitly (e.g., Twitter).location - This is a string containing location data associated with the content being published. The string is latitude, followed by longitude, for example "37.4220 -122.0843". Valid values for latitude are -90.0 to +90.0, with North being positive. Valid values for longitude are -180.0 to +180.0 with East being positive.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.boolean supportsSetStatus(String providerName)
setStatus(String, String) API call.
providerName - The provider name
void map(String identifier,
String primaryKey)
throws EngageFailureException,
ErrorResponeException
authInfo(String)
API response, which you may use to sign the user in.
The map call is usually made right after a call to authInfo(String),
when you already know who the user is because they are signed in to
your website with their legacy (or existing) account.
identifier - The identifier returned from the authInfo(String) API call.primaryKey - The primary key from your users table, as a string.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void map(String identifier,
String primaryKey,
boolean overwrite)
throws EngageFailureException,
ErrorResponeException
authInfo(String)
API response, which you may use to sign the user in.
The map call is usually made right after a call to authInfo(String),
when you already know who the user is because they are signed in to
your website with their legacy (or existing) account.
identifier - The identifier returned from the authInfo(String) API call.primaryKey - The primary key from your users table, as a string.overwrite - 'true'(default) or 'false'. If 'false', only create the mapping if one does not already exist for the specified identifier.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void unmap(String primaryKey)
throws EngageFailureException,
ErrorResponeException
primaryKey - The primary key from your users table, as a string.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void unmap(String primaryKey,
boolean unlink)
throws EngageFailureException,
ErrorResponeException
primaryKey - The primary key from your users table, as a string.unlink - 'true' or 'false'(default). If 'true', unlink your application from the user's account with the provider.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void unmap(String identifier,
String primaryKey)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the auth_info API call.primaryKey - The primary key from your users table, as a string.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void unmap(String identifier,
String primaryKey,
boolean unlink)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the auth_info API call.primaryKey - The primary key from your users table, as a string.unlink - 'true' or 'false'(default). If 'true', unlink your application from the user's account with the provider.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
MappingsResponse mappings(String primaryKey)
throws EngageFailureException,
ErrorResponeException
primaryKey - The primary key from your users table, as a string.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
AllMappingsResponse allMappings()
throws EngageFailureException,
ErrorResponeException
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void activity(String identifier,
Activity activity)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the authInfo(String) API call.activity - The activity structure.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void activity(String identifier,
String activity)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the authInfo(String) API call.activity - The activity structure as JSON String.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void activity(String identifier,
Activity activity,
String location)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the authInfo(String) API call.activity - The activity structure.location - This is a string containing location data associated with the content being published. The string is latitude, followed by longitude, for example "37.4220 -122.0843". Valid values for latitude are -90.0 to +90.0, with North being positive. Valid values for longitude are -180.0 to +180.0 with East being positive.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void activity(String identifier,
String activity,
String location)
throws EngageFailureException,
ErrorResponeException
identifier - The identifier returned from the authInfo(String) API call.activity - The activity structure as JSON String.location - This is a string containing location data associated with the content being published. The string is latitude, followed by longitude, for example "37.4220 -122.0843". Valid values for latitude are -90.0 to +90.0, with North being positive. Valid values for longitude are -180.0 to +180.0 with East being positive.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.boolean supportsActivity(String providerName)
activity(String, Activity) API call.
providerName - The provider name
AnalyticsResponse analytics(Date start,
Date end)
throws EngageFailureException,
ErrorResponeException
start - The start date.end - The end date.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
void setAuthProviders(List<String> providers)
throws EngageFailureException,
ErrorResponeException
providers - A list of provider names.
EngageFailureException - If any unknown error occurs while communicating with the Janrain Engage API.
ErrorResponeException - If the Janrain Engage API returns an error response.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||