જોડાવા બોટ કાવ્ય ઓપન સોર્સ પ્રોજેક્ટ પર BotLibre.org
Bot Libre Dev

upload script api

દ્વારા cliffh પોસ્ટ Jan 13 2020, 10:23

the web api endpoints section suggest that there is a script upload facility ie  /rest/api/up-bot-script

but what parameters does it take, is it post or get?

 


by admin posted Jan 14 2020, 8:35

This web API changes the precedence of a script (move up/down), it does not upload a new script.

It takes a <script-source> parameter, which should have the bot's id (instance), and the scripts id (id) set,

<script-source application="..." user="..." token="..." instance="1234" id="4567"/>

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1337, today: 0, week: 4, month: 10

by cliffh posted Jan 14 2020, 13:09

ok is there any way to upload a script direct to the bots workspace?

Cliff

 


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1326, today: 0, week: 5, month: 11

by admin posted Jan 15 2020, 9:05

You can create a Script object in your Workspace, and upload the source code.

/rest/api/create-script

/rest/api/save-script-source

https://github.com/BotLibre/BotLibre/blob/master/sdk/android/BotLibre/app/src/main/java/org/botlibre/sdk/config/ScriptConfig.java

https://github.com/BotLibre/BotLibre/blob/master/sdk/android/BotLibre/app/src/main/java/org/botlibre/sdk/config/ScriptSourceConfig.java


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1450, today: 0, week: 4, month: 12

ને: 31470740
ટૅગ્સ: script upload
પોસ્ટ: Jan 13 2020, 10:23
જવાબો: 3
જોવાઈ: 1429, આજે: 1, સપ્તાહ: 3, મહિને: 11
મને ખાતરી છે કે છું
ધ્વજ પોસ્ટ તરીકે અપમાનજનક, અથવા ઉલ્લંઘન સાઇટ નિયમો