public void AnalyzeText(string sText) { JObject rss = new JObject(new JProperty("text", sText)); Tools.HttpReturn ret = Tools.HttpRequest(user.url_recast + "/v2/request", "POST", Encoding.UTF8.GetBytes(rss.ToString()), 0, "application/json", null, null, developer_token, "Token"); _json = ret._json.ToString(); }
public void Delete(Bot oBot, string sIntentId) { if (!string.IsNullOrEmpty(sIntentId)) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + sIntentId + "/expressions/" + id, "DELETE", null, 0, null, null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); } }
public void Update(Bot oBot, string sIntentId) { if (!string.IsNullOrEmpty(sIntentId)) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + sIntentId + "/expressions/" + id, "PUT", Encoding.UTF8.GetBytes(GetJson().ToString()), 0, "application/json", null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); Load(ret._json.results); } }
public static Bot Get(User oUser, string sSlug, string sDevToken) { Tools.HttpReturn ret = Tools.HttpRequest(oUser.uri + "/bots/" + sSlug, "GET", null, 0, null, null, null, sDevToken, "Token"); Bot oBot = new Bot(oUser, ret._json.results); oBot._message = ret._json.message; return(oBot); }
public void Update(Bot oBot) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + id, "PUT", Encoding.UTF8.GetBytes(GetJson().ToString()), 0, "application/json", null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); var exps = (JArray)ret._json.results; foreach (var elem in exps) { expressions.Add(new Expression(elem)); } }
public void GetListExpressions(Bot oBot) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + id + "/expressions", "GET", null, 0, null, null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); LoadExpressions(ret._json.results); /*var exps = (JArray)ret._json.results; * foreach (var elem in exps) * { * expressions.Add(new Expression(elem)); * }*/ }
public void Delete(Bot oBot) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + id, "DELETE", null, 0, null, null, null, oBot.developer_token, "Token"); }
public void BulkCreateExpressions(Bot oBot) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + id + "/expressions/bulk_create", "POST", Encoding.UTF8.GetBytes(GetJson(false).ToString()), 0, "application/json", null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); }
public void Get(Bot oBot) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.uri + "/intents/" + id, "GET", null, 0, null, null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); Load(ret._json); }
public void Update() { Tools.HttpReturn ret = Tools.HttpRequest(uri, "PUT", Encoding.UTF8.GetBytes(GetJson().ToString()), 0, "application/json", null, null, developer_token, "Token"); _json = ret._json.ToString(); Load(ret._json.results); }
public void Converse(Bot oBot, string sText, string sConvToken = null) { Tools.HttpReturn ret = Tools.HttpRequest(oBot.user.url_recast + "/v2/converse", "POST", Encoding.UTF8.GetBytes(GetJson().ToString()), 0, "application/json", null, null, oBot.developer_token, "Token"); _json = ret._json.ToString(); Load(ret._json); }