public string UrlPicsShortener(string longUrl) {// TODO: Add Testing logic here RestClient client = new RestClient("https://api.pics.ee"); var req = RestClientExt.TakeRequest <JObject>("/v1/links/?access_token=73db788f9c3b110be62e4422b5e3b32506a7a4ce"); req.Node.Method = Method.POST; ((dynamic)req).Parameter.url = HttpUtility.UrlPathEncode(longUrl); ((dynamic)req).Parameter.top = 20; var rlt = client.Execute(req); return(rlt.First.First["picseeUrl"].Value <string>()); }
public ApiCommands(string accessToken, int resultsPerPage) { _restClient = new RestClientExt(SurveyMonkeyApiUrl); _authorizationHeaderValue = string.Concat("bearer ", accessToken); ResultsPerPage = resultsPerPage; }