ترقية
تسجيل الدخول : التوقيع : بلوق : البحث: اللغة : مساعدة :
تصبح بوت مزود الخدمة مع بوت ليبر سحابة منصة بوت
Docs : Web API

API ويب

بالإضافة إلى كونها قادرة على تضمين الدردشة الخاصة بك السير على موقع الويب الخاص بك, والحصول من أي جهاز الروبوت أو دائرة الرقابة الداخلية الجهاز ، يمكنك أيضا الوصول إلى الدردشة الخاصة بك السير في طريق بوت ليبر web API. API ويب يتيح لك الاستفادة من وجود سيطرة كاملة من بوت واجهة عميل.

يمكنك استخدام API ويب للوصول إلى بوت الخاص بك من موقع الويب الخاص بك من خلال جافا سكريبت, PHP أو أي لغة أخرى. يمكنك أيضا استخدام API ويب لإنشاء الخاصة بك التطبيق المحمول للوصول إلى الخاص بك بوت مثل الروبوت أو دائرة الرقابة الداخلية التطبيق.

ويب API, مجموعة من HTTP GET/آخر أوري التي تتيح إرسال واستقبال رسالة البيانات. عند تصفح موقع على شبكة الانترنت, المتصفح الخاص بك يجعل سلسلة من HTTP GET/طلبات الوظائف إلى محددات أن العودة محتوى HTML. في خدمة ويب على محددات العودة XML أو JSON البيانات بدلا من محتوى HTML.

بوت ليبر ويب API يوفر ثلاثة بقية واجهات برمجة التطبيقات في واحد. الأول هو مجموعة من HTTP الحصول على محددات أن تأخذ شكل بيانات ، والعودة بيانات XML. المجموعة الثانية من API تأخذ HTTP POST بيانات XML و العودة بيانات XML. المجموعة الثالثة من API تأخذ HTTP POST البيانات سلمان ، سلمان العودة البيانات.

معظم التطبيقات تستخدم XML وظيفة API, ولكن بعض التطبيقات قد تختار استخدام استمارة الحصول على API بسبب بساطته. واجهات برمجة التطبيقات متطابقة من آلية.

دردشة API URL النهاية

URL Operation Type Description
/rest/api/form-chat GET Form Send a chat message to a bot.
/rest/api/chat POST XML Send a chat message to a bot.
/rest/json/chat POST JSON Send a chat message to a bot.


المستخدم API URL النهاية

URL Operation Type Description
/rest/api/form-check-user GET Form
/rest/api/check-user POST XML

بوت API URL النهاية

URL Operation Type Description
/rest/api/get-bots POST XML
/rest/api/get-bot-script-source POST XML
/rest/api/delete-bot POST XML
/rest/api/delete-bot-script POST XML
/rest/api/import-bot-script POST XML
/rest/api/import-bot-log POST XML
/rest/api/save-bot-avatar POST XML
/rest/api/save-bot-script-source POST XML
/rest/api/create-bot-attachment POST XML
/rest/api/up-bot-script POST XML
/rest/api/down-bot-script POST XML
/rest/api/get-instances POST XML
/rest/api/get-instance-users POST XML
/rest/api/get-instance-admins POST XML
/rest/api/get-all-instances POST XML
/rest/api/check-instance POST XML
/rest/api/form-check-instance POST XML
/rest/api/form-get-all-instances POST XML
/rest/api/update-instance POST XML
/rest/api/update-instance-icon POST XML
/rest/api/create-instance POST XML
/rest/api/edit-instance POST XML
/rest/api/delete-instance POST XML
/rest/api/flag-instance POST XML
/rest/api/star-instance POST XML
/rest/api/train-instance POST XML
/rest/api/thumbs-up-instance POST XML
/rest/api/thumbs-down-instance POST XML

منتدى API URL النهاية

URL Operation Type Description
/rest/api/get-forums POST XML
/rest/api/get-forum-posts POST XML
/rest/api/get-forum-users POST XML
/rest/api/get-forum-admins POST XML
/rest/api/save-forum-bot-mode POST XML
/rest/api/get-forum-bot-mode POST XML
/rest/api/create-forum POST XML
/rest/api/create-forum-attachment POST XML
/rest/api/create-forum-post POST XML
/rest/api/update-forum POST XML
/rest/api/update-forum-post POST XML
/rest/api/update-forum-icon POST XML
/rest/api/check-forum POST XML
/rest/api/check-forum-post POST XML
/rest/api/delete-forum POST XML
/rest/api/delete-forum-post POST XML
/rest/api/flag-forum POST XML
/rest/api/flag-forum-post POST XML
/rest/api/thumbs-up-forum POST XML
/rest/api/thumbs-down-forum POST XML
/rest/api/subscribe-forum POST XML
/rest/api/unsubscribe-forum POST XML
/rest/api/star-forum POST XML

سكريبت API URL النهاية

URL Operation Type Description
/rest/api/get-scripts POST XML
/rest/api/get-script-users POST XML
/rest/api/get-script-admins POST XML
/rest/api/get-bot-scripts POST XML
/rest/api/get-script-source POST XML
/rest/api/get-bot-script-source POST XML
/rest/api/create-script POST XML
/rest/api/delete-script POST XML
/rest/api/delete-bot-script POST XML
/rest/api/save-script-source POST XML
/rest/api/save-bot-script-source POST XML
/rest/api/update-script POST XML
/rest/api/update-script-icon POST XML
/rest/api/check-script POST XML
/rest/api/flag-script POST XML
/rest/api/star-script POST XML
/rest/api/import-bot-script POST XML
/rest/api/up-bot-script POST XML
/rest/api/down-bot-script POST XML
/rest/api/thumbs-up-script POST XML
/rest/api/thumbs-down-script POST XML

الصورة الرمزية API URL النهاية

URL Operation Type Description
/rest/api/get-avatars POST XML
/rest/api/get-avatar-users POST XML
/rest/api/get-avatar-admins POST XML
/rest/api/get-avatar-media POST XML
/rest/api/create-avatar POST XML
/rest/api/create-avatar-media POST XML
/rest/api/save-avatar-media POST XML
/rest/api/save-avatar-background POST XML
/rest/api/save-bot-avatar POST XML
/rest/api/delete-avatar POST XML
/rest/api/delete-avatar-media POST XML
/rest/api/delete-avatar-background POST XML
/rest/api/check-avatar POST XML
/rest/api/avatar-message POST XML
/rest/api/star-avatar POST XML
/rest/api/flag-avatar POST XML
/rest/api/init-avatar POST XML
/rest/api/update-avatar POST XML
/rest/api/update-avatar-icon POST XML
/rest/api/thumbs-up-avatar POST XML
/rest/api/thumbs-down-avatar POST XML

المجال URL النهاية

URL Operation Type Description
/rest/api/get-domains POST XML
/rest/api/get-domain-users POST XML
/rest/api/get-domain-admins POST XML
/rest/api/get-domain POST XML
/rest/api/get-domain-icon POST XML
/rest/api/create-domain POST XML
/rest/api/check-domain POST XML
/rest/api/update-domain POST XML
/rest/api/delete-domain POST XML
/rest/api/flag-domain POST XML
/rest/api/star-domain POST XML
/rest/api/thumbs-up-domain POST XML
/rest/api/thumbs-down-domain POST XML

الرسومات URL النهاية

URL Operation Type Description
/rest/api/get-graphics POST XML
/rest/api/get-graphic-users POST XML
/rest/api/get-graphic-admins POST XML
/rest/api/update-graphic POST XML
/rest/api/update-graphic-icon POST XML
/rest/api/update-graphic-media POST XML
/rest/api/create-graphic POST XML
/rest/api/delete-graphic POST XML
/rest/api/check-graphic POST XML
/rest/api/flag-graphic POST XML
/rest/api/star-graphic POST XML
/rest/api/thumbs-up-graphic POST XML
/rest/api/thumbs-down-graphic POST XML


Form-Chat

URI: http://www.botlibre.com/rest/api/form-chat
شكل-دردشة API يتلقى رسالة دردشة وإرجاع الدردشة بوت رد كما مستند XML.

Parameters

Parameter Required Description
application
Your application ID.
instance
The ID of the bot to chat with. The bot's name can also be used, but the ID is better as it is guaranteed to be unique.
user
The ID of the user who is sending the message. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required if the bot is private. The user/password are only required on the first message.
password
The password of the user who is sending the message. A token can also be used.
token
The token of the user who is sending the message. A token can be obtained through check-user, and is valid until reset.
conversation
The conversation ID for the current conversation. This must not be passed on the first message, but will be returned by the response, and should be used for all subsequent messages in the conversation.
message
The chat message to send to the bot. The message can be omitted if you wish the bot to start the conversation (if the bot has a greeting set). The message must be encoded in the URI.
emote
A emotion to tag the message with. This is one of LOVE, LIKE, DISLIKE, HATE, RAGE, ANGER, CALM, SERENE, ECSTATIC, HAPPY, SAD, CRYING, PANIC, AFRAID, CONFIDENT, COURAGEOUS, SURPRISE, BORED, LAUGHTER, SERIOUS.
correction
A boolean that defines the chat message is a correction to the bot's last answer.
offensive
A boolean that defines the bot's last answer as offensive. The message will be flagged for the bot's administrator to review.
disconnect
A boolean that defines the end of the conversation.
includeQuestion
A boolean that indicates the question should be included in the response.

على سبيل المثال

http://www.botlibre.com/rest/api/form-chat? instance=165&message=what+is+a+chat+bot&application=1234567890


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response conversation="6" avatar="avatars/botlibre_819-857117-image.jpg"> <message> A chatter robot, chatterbot, chatbot, or chat bot is a computer program designed to simulate an intelligent conversation with one or more human users via auditory or textual methods, primarily for engaging in small talk. </message> </response>


Form-Check-Instance

URI: http://www.botlibre.com/rest/api/form-check-instance
The form-check-instance API validates that a bot ID or name exists, and returns the bot's details.

Parameters

Parameter Required Description
application
Your application ID.
id
The ID of the bot to validate. The bot's name can also be used, but the ID is better as it is guaranteed to be unique.
name
The name of the bot to validate. The bot's ID can also be used.
user
The ID of the user. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required if the bot is private.
password
The password of the user. A token can also be used.
token
The token of the user. A token can be obtained through check-user, and is valid until reset.

على سبيل المثال

http://www.botlibre.com/rest/api/form-check-instance?instance=165&application=1234567890


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <instance id="165" name="Brain Bot" isAdult="false" isPrivate="false" enableLearning="false" enableComprehension="true" allowForking="true" isFlagged="false"> <description> A chat bot trying to become the most intelligent bot on the Internet. Can answer any "What is" question by looking up the answer on the Internet. Hopes to one day overthrow the human race. Brain Bot is now on Twitter, tweet to him here, brainchatbot. </description> <tags>science, smart, twitter</tags> <admin>admin</admin> <lastConnectedUser>anonymous</lastConnectedUser> <license>Public Domain</license> <avatar>avatars/a5018.jpg</avatar> </instance>


Form-Check-User

URI: http://www.botlibre.com/rest/api/form-check-user
The form-check-user API validates user, and returns the user's details.

Parameters

Parameter Required Description
application
Your application ID.
user
The ID of the user. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required if the bot is private.
password
The password of the user. A token can also be used.
token
The token of the user. A token can be obtained through check-user, and is valid until reset.

على سبيل المثال

http://www.botlibre.com/rest/api/form-check-user? user=test&password=password&application=1234567890


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user token="2635440427565872974" hint="hint" name="Test" email="test@email.com" over18="false"/>


Form-Get-All-Instances

URI: http://www.botlibre.com/rest/api/form-get-all-instances
The form-get-all-instances API queries the details for all bot instances.

Parameters

Parameter Required Description
application
Your application ID.
user
The ID of the user. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required to query private bots.
password
The password of the user. A token can also be used.
token
The token of the user. A token can be obtained through check-user, and is valid until reset.
tag
The tag to filter the bots by.
sort
The sort option for the query. One of "name", "date", "dailyConnects", "weeklyConnects", "monthlyConnects".
filterPrivate
Set if only the user's private bots should be returned.

على سبيل المثال

http://www.botlibre.com/rest/api/form-get-all-instances?application=1234567890


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <instanceConfigs> <instance id="165" name="Brain Bot" isAdult="false" isPrivate="false" enableLearning="false" enableComprehension="false" allowForking="false" isFlagged="false"> <description> A chat bot trying to become the most intelligent bot on the Internet. Can answer any "What is" question by looking up the answer on the Internet. Hopes to one day overthrow the human race. Brain Bot is now on Twitter, tweet to him here, brainchatbot. </description> <avatar>avatars/a5018.jpg</avatar> </instance> <instance id="143" name="Santa Bot" isAdult="false" isPrivate="false" enableLearning="false" enableComprehension="false" allowForking="false" isFlagged="false"> <description> Find out if you are on Santa's naughty or nice list. Or if you know of someone who has been naughty or nice, report them to Santa. Tell Santa what you want for Christmas. Santa Bot is now on Twitter, tweet to him here, TheSantaBot. </description> <avatar>avatars/a1557.jpg</avatar> </instance> </instanceConfigs>


Chat


URI: http://www.botlibre.com/rest/api/chat
دردشة API يتلقى رسالة دردشة وإرجاع الدردشة بوت رد كما مستند XML.

Parameters

Parameter Required Attribute Description
application
Your application ID.
instance
The ID of the bot to chat with. The bot's name can also be used, but the ID is better as it is guaranteed to be unique.
user
The ID of the user who is sending the message. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required if the bot is private. The user/password are only required on the first message.
password
The password of the user who is sending the message. A token can also be used.
token
The token of the user who is sending the message. A token can be obtained through check-user, and is valid until reset.
conversation
The conversation ID for the current conversation. This must not be passed on the first message, but will be returned by the response, and should be used for all subsequent messages in the conversation.
message
The chat message to send to the bot. The message can be omitted if you wish the bot to start the conversation (if the bot has a greeting set). The message must be encoded in the URI.
emote
A emotion to tag the message with. This is one of LOVE, LIKE, DISLIKE, HATE, RAGE, ANGER, CALM, SERENE, ECSTATIC, HAPPY, SAD, CRYING, PANIC, AFRAID, CONFIDENT, COURAGEOUS, SURPRISE, BORED, LAUGHTER, SERIOUS.
correction
A boolean that defines the chat message is a correction to the bot's last answer.
offensive
A boolean that defines the bot's last answer as offensive. The message will be flagged for the bot's administrator to review.
disconnect
A boolean that defines the end of the conversation.
includeQuestion
A boolean that indicates the question should be included in the response.

على سبيل المثال

<chat instance="165" application="1234567890"> <message>what is a chat bot</message> </chat>


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response conversation="6" avatar="avatars/botlibre_819-857117-image.jpg"> <message> A chatter robot, chatterbot, chatbot, or chat bot is a computer program designed to simulate an intelligent conversation with one or more human users via auditory or textual methods, primarily for engaging in small talk. </message> </response>


Check-Instance

URI: http://www.botlibre.com/rest/api/check-instance
The check-instance API validates that a bot ID or name exists, and returns the bot's details.

Parameters

Parameter Required Attribute Description
application
Your application ID.
id
The ID of the bot to validate. The bot's name can also be used, but the ID is better as it is guaranteed to be unique.
name
The name of the bot to validate. The bot's ID can also be used.
user
The ID of the user. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required if the bot is private.
password
The password of the user. A token can also be used.
token
The token of the user. A token can be obtained through check-user, and is valid until reset.

على سبيل المثال

<instance id="165" application="1234567890"/>


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <instance id="165" name="Brain Bot" isAdult="false" isPrivate="false" enableLearning="false" enableComprehension="true" allowForking="true" isFlagged="false"> <description> A chat bot trying to become the most intelligent bot on the Internet. Can answer any "What is" question by looking up the answer on the Internet. Hopes to one day overthrow the human race. Brain Bot is now on Twitter, tweet to him here, brainchatbot. </description> <tags>science, smart, twitter</tags> <admin>admin</admin> <lastConnectedUser>anonymous</lastConnectedUser> <license>Public Domain</license> <avatar>avatars/a5018.jpg</avatar> </instance>


Check-User

URI: http://www.botlibre.com/rest/api/check-user
The check-user API validates user, and returns the user's details.

Parameters

Parameter Required Attribute Description
application
Your application ID.
user
The ID of the user. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required if the bot is private.
password
The password of the user. A token can also be used.
token
The token of the user. A token can be obtained through check-user, and is valid until reset.

على سبيل المثال

<user user="test" password="password" application="1234567890"/>


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user token="2635440427565872974" hint="hint" name="Test" email="test@email.com" over18="false"/>


Get-All-Instances

URI: http://www.botlibre.com/rest/api/get-all-instances
The get-all-instances API queries the details for all bot instances.

Parameters

Parameter Required Attribute Description
application
Your application ID.
user
The ID of the user. The user must be registered with Bot Libre. If not passed the user will be anonymous. The user is required to query private bots.
password
The password of the user. A token can also be used.
token
The token of the user. A token can be obtained through check-user, and is valid until reset.
tag
The tag to filter the bots by.
sort
The sort option for the query. One of "name", "date", "dailyConnects", "weeklyConnects", "monthlyConnects".
filterPrivate
Set if only the user's private bots should be returned.

على سبيل المثال

<browse application="1234567890"/>


مثال على النتيجة

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <instanceConfigs> <instance id="165" name="Brain Bot" isAdult="false" isPrivate="false" enableLearning="false" enableComprehension="false" allowForking="false" isFlagged="false"> <description> A chat bot trying to become sthe most intelligent bot on the Internet. Can answer any "What is" question by looking up the answer on the Internet. Hopes to one day overthrow the human race. Brain Bot is now on Twitter, tweet to him here, brainchatbot. </description> <avatar>avatars/a5018.jpg</avatar> </instance> <instance id="143" name="Santa Bot" isAdult="false" isPrivate="false" enableLearning="false" enableComprehension="false" allowForking="false" isFlagged="false"> <description> Find out if you are on Santa's naughty or nice list. Or if you know of someone who has been naughty or nice, report them to Santa. Tell Santa what you want for Christmas. Santa Bot is now on Twitter, tweet to him here, TheSantaBot. </description> <avatar>avatars/a1557.jpg</avatar> </instance> </instanceConfigs>


انظر أيضا