|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.botlibre.sdk.SDKConnection
public class SDKConnection
Connection class for a REST service connection. The SDK connection gives you access to the paphus or libre server services using a REST API.
The services include:
Constructor Summary | |
---|---|
SDKConnection(Credentials credentials)
Create an SDK connection with the credentials. |
Method Summary | ||
---|---|---|
void |
addAvatar(java.lang.String file,
InstanceConfig config)
Add the new avatar to the bot. |
|
void |
addSharedAvatar(AvatarConfig config)
Add the shared avatar to the bot's avatars. |
|
java.util.List<WebMediumConfig> |
browse(BrowseConfig config)
Return the list of content for the browse criteria. |
|
ChatResponse |
chat(ChatConfig config)
Process the bot chat message and return the bot's response. |
|
DomainConfig |
connect(DomainConfig config)
Connect to the domain. |
|
UserConfig |
connect(UserConfig config)
Validate the user credentials (password, or token). |
|
ForumPostConfig |
create(ForumPostConfig config)
Create a new forum post. |
|
|
create(T config)
Create the new content. |
|
UserConfig |
create(UserConfig config)
Create a new user. |
|
MediaConfig |
createChannelFileAttachment(java.lang.String file,
MediaConfig config)
Create a new file/image/media attachment for a chat channel. |
|
MediaConfig |
createChannelImageAttachment(java.lang.String file,
MediaConfig config)
Create a new file/image/media attachment for a chat channel. |
|
ForumPostConfig |
createReply(ForumPostConfig config)
Create a reply to a forum post. |
|
static java.lang.String |
defaultUserImage()
Return the name of the default user image. |
|
void |
delete(ForumPostConfig config)
Permanently delete the forum post with the id. |
|
void |
delete(WebMediumConfig config)
Permanently delete the content with the id. |
|
void |
deleteAllAvatars(InstanceConfig config)
Delete all of the avatars for the bot. |
|
void |
deleteAvatar(AvatarConfig config)
Delete the avatar from the bot. |
|
void |
disconnect()
Disconnect from the connection. |
|
ForumPostConfig |
fetch(ForumPostConfig config)
Fetch the forum post details for the forum post id. |
|
|
fetch(T config)
Fetch the content details from the server. |
|
UserConfig |
fetch(UserConfig config)
Fetch the user details for the user credentials. |
|
java.net.URL |
fetchImage(java.lang.String image)
Fetch the URL for the image from the server. |
|
void |
flag(ForumPostConfig config)
Flag the forum post as offensive, a reason is required. |
|
void |
flag(UserConfig config)
Flag the user post as offensive, a reason is required. |
|
void |
flag(WebMediumConfig config)
Flag the content as offensive, a reason is required. |
|
java.lang.String[] |
getAccessModes()
Return the access mode types. |
|
java.util.List<java.lang.String> |
getAdmins(WebMediumConfig config)
Return the administrators of the content. |
|
java.util.List<AvatarConfig> |
getAvatars(InstanceConfig config)
Return the avatars for the bot instances. |
|
java.lang.String[] |
getBotModes()
Return the bot mode types. |
|
java.util.List<java.lang.String> |
getCategories(ContentConfig config)
Return the list of categories for the type, and domain. |
|
BotModeConfig |
getChannelBotMode(ChannelConfig config)
Return the channel's bot configuration. |
|
java.lang.String[] |
getChannelTypes()
Return the channel types. |
|
java.lang.String[] |
getCorrectionModes()
Return the correction mode types. |
|
Credentials |
getCredentials()
Return the current application credentials. |
|
java.util.List<java.lang.String> |
getDefaultResponses(InstanceConfig config)
Return the bot's default responses. |
|
DomainConfig |
getDomain()
Return the current domain. |
|
SDKException |
getException()
Return the last thrown exception. |
|
BotModeConfig |
getForumBotMode(ForumConfig config)
Return the forum's bot configuration. |
|
java.util.List<java.lang.String> |
getGreetings(InstanceConfig config)
Return the bot's greetings. |
|
LearningConfig |
getLearning(InstanceConfig config)
Return the bot's learning configuration. |
|
java.lang.String[] |
getLearningModes()
Return the learning mode types. |
|
java.util.List<ForumPostConfig> |
getPosts(BrowseConfig config)
Return the list of forum posts for the forum browse criteria. |
|
java.util.List<AvatarConfig> |
getSharedAvatars()
Return the shared avatar images for the server. |
|
java.util.List<java.lang.String> |
getTags(ContentConfig config)
Return the list of tags for the type, and domain. |
|
java.util.List<java.lang.String> |
getTemplates()
Return the list of bot templates. |
|
java.lang.String[] |
getTypes()
Return the list of content types. |
|
UserConfig |
getUser()
Return the current connected user. |
|
java.util.List<UserConfig> |
getUsers(java.lang.String usersCSV)
Return the list of user details for the comma separated values list of user ids. |
|
java.util.List<java.lang.String> |
getUsers(WebMediumConfig config)
Return the users for the content. |
|
VoiceConfig |
getVoice(InstanceConfig config)
Return the bot's voice configuration. |
|
boolean |
isDebug()
Return is debugging has been enabled. |
|
LiveChatConnection |
openLiveChat(ChannelConfig channel,
LiveChatListener listener)
Connect to the live chat channel and return a LiveChatConnection. |
|
void |
saveChannelBotMode(BotModeConfig config)
Save the channel's bot configuration. |
|
void |
saveForumBotMode(BotModeConfig config)
Save the forum's bot configuration. |
|
void |
saveLearning(LearningConfig config)
Save the bot's learning configuration. |
|
void |
saveVoice(VoiceConfig config)
Save the bot's voice configuration. |
|
void |
setCredentials(Credentials credentials)
Set the application credentials. |
|
void |
setDebug(boolean debug)
Enable debugging, debug messages will be logged to System.out. |
|
void |
setDomain(DomainConfig domain)
Set the current domain. |
|
void |
setUser(UserConfig user)
Set the current connected user. |
|
void |
tagAvatar(AvatarConfig config)
Tag the avatar with the emotions. |
|
void |
train(TrainingConfig config)
Train the bot with a new question/response pair. |
|
ForumPostConfig |
update(ForumPostConfig config)
Update the forum post. |
|
|
update(T config)
Update the content. |
|
UserConfig |
update(UserConfig config)
Update the user details. |
|
|
updateIcon(java.lang.String file,
T config)
Update the contents icon. |
|
UserConfig |
updateIcon(java.lang.String file,
UserConfig config)
Update the user's icon. |
|
void |
userAdmin(UserAdminConfig config)
Perform the user administration task (add or remove users, or administrators). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SDKConnection(Credentials credentials)
Method Detail |
---|
public static java.lang.String defaultUserImage()
public UserConfig connect(UserConfig config)
public LiveChatConnection openLiveChat(ChannelConfig channel, LiveChatListener listener)
public DomainConfig connect(DomainConfig config)
public void disconnect()
public UserConfig fetch(UserConfig config)
public java.net.URL fetchImage(java.lang.String image)
public ForumPostConfig fetch(ForumPostConfig config)
public UserConfig create(UserConfig config)
public ForumPostConfig create(ForumPostConfig config)
public MediaConfig createChannelFileAttachment(java.lang.String file, MediaConfig config)
public MediaConfig createChannelImageAttachment(java.lang.String file, MediaConfig config)
public ForumPostConfig createReply(ForumPostConfig config)
public <T extends WebMediumConfig> T fetch(T config)
public <T extends WebMediumConfig> T create(T config)
public <T extends WebMediumConfig> T update(T config)
public ForumPostConfig update(ForumPostConfig config)
public UserConfig update(UserConfig config)
public void delete(WebMediumConfig config)
public void delete(ForumPostConfig config)
public void flag(WebMediumConfig config)
public void flag(ForumPostConfig config)
public void flag(UserConfig config)
public ChatResponse chat(ChatConfig config)
public java.util.List<java.lang.String> getAdmins(WebMediumConfig config)
public java.util.List<AvatarConfig> getAvatars(InstanceConfig config)
public java.util.List<AvatarConfig> getSharedAvatars()
public java.util.List<UserConfig> getUsers(java.lang.String usersCSV)
public java.util.List<ForumPostConfig> getPosts(BrowseConfig config)
public java.util.List<java.lang.String> getCategories(ContentConfig config)
public java.util.List<java.lang.String> getTags(ContentConfig config)
public java.util.List<java.lang.String> getTemplates()
public java.util.List<java.lang.String> getUsers(WebMediumConfig config)
public BotModeConfig getChannelBotMode(ChannelConfig config)
public void saveChannelBotMode(BotModeConfig config)
public void saveForumBotMode(BotModeConfig config)
public void saveLearning(LearningConfig config)
public void saveVoice(VoiceConfig config)
public void tagAvatar(AvatarConfig config)
public void train(TrainingConfig config)
public void userAdmin(UserAdminConfig config)
public void deleteAllAvatars(InstanceConfig config)
public void deleteAvatar(AvatarConfig config)
public void addAvatar(java.lang.String file, InstanceConfig config)
public <T extends WebMediumConfig> T updateIcon(java.lang.String file, T config)
public UserConfig updateIcon(java.lang.String file, UserConfig config)
public BotModeConfig getForumBotMode(ForumConfig config)
public VoiceConfig getVoice(InstanceConfig config)
public java.util.List<java.lang.String> getDefaultResponses(InstanceConfig config)
public java.util.List<java.lang.String> getGreetings(InstanceConfig config)
public LearningConfig getLearning(InstanceConfig config)
public java.util.List<WebMediumConfig> browse(BrowseConfig config)
public void addSharedAvatar(AvatarConfig config)
public java.lang.String[] getTypes()
public java.lang.String[] getChannelTypes()
public java.lang.String[] getAccessModes()
public java.lang.String[] getLearningModes()
public java.lang.String[] getCorrectionModes()
public java.lang.String[] getBotModes()
public UserConfig getUser()
public void setUser(UserConfig user)
public DomainConfig getDomain()
public void setDomain(DomainConfig domain)
public Credentials getCredentials()
public void setCredentials(Credentials credentials)
public boolean isDebug()
public void setDebug(boolean debug)
public SDKException getException()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |