public ApiResult <TextParserServiceResult> Parse(string text) { var dic = new Dictionary <string, string>() { { "url", Settings["LuisEndPoint"] }, { "id", Settings["LuisId"] }, { "key", Settings["LuisKey"] }, }; var client = new RestClient(dic["url"]); var request = GetRequest(dic, text); var requestor = new ApiRequestor(); var result = requestor.Execute <List <TextParserServiceResult> >(client, request); return(new ApiResult <TextParserServiceResult>() { Code = result.Code, Exception = result.Exception, HasErrors = result.HasErrors, Message = result.Message, Result = result.Result.FirstOrDefault() }); }
public ApiResult <object> Add(IEntity entity) { var apiCaller = new ApiRequestor(); return(apiCaller.Execute <object>(GetClient(), GetRequest(entity), HttpStatusCode.Created, null)); }