private static bool marker_action(string access_token, string action, string type, List <string> entry_ids = null, List <string> feed_ids = null, List <string> category_ids = null, long?asOf = null) { string requestUrl = string.Format("{0}/v3/markers?ct={1}", Configuration.base_url, System.Web.HttpUtility.UrlEncode(Configuration.user_agent)); Dictionary <string, string> headers = new Dictionary <string, string>(); headers.Add("Authorization", string.Format("OAuth {0}", access_token)); json_marker_action json = new json_marker_action(); json.action = action; json.type = type; json.entryIds = entry_ids; json.feedIds = feed_ids; JsonSerializerSettings settings = new JsonSerializerSettings(); settings.NullValueHandling = NullValueHandling.Ignore; string jsonString = JsonConvert.SerializeObject(json, settings); Common.HTTPCommunications.Response response = Common.HTTPCommunications.SendPostRequestStringDataOnly( requestUrl, jsonString, headers, true); return(response.Success); }
private static bool marker_action(string access_token, string action, string type, List<string> entry_ids = null, List<string> feed_ids = null, List<string> category_ids = null, long? asOf = null) { string requestUrl = string.Format("{0}/v3/markers?ct={1}", Configuration.base_url, System.Web.HttpUtility.UrlEncode(Configuration.user_agent)); Dictionary<string, string> headers = new Dictionary<string, string>(); headers.Add("Authorization", string.Format("OAuth {0}", access_token)); json_marker_action json = new json_marker_action(); json.action = action; json.type = type; json.entryIds = entry_ids; json.feedIds = feed_ids; JsonSerializerSettings settings = new JsonSerializerSettings(); settings.NullValueHandling = NullValueHandling.Ignore; string jsonString = JsonConvert.SerializeObject(json, settings); Common.HTTPCommunications.Response response = Common.HTTPCommunications.SendPostRequestStringDataOnly( requestUrl, jsonString, headers, true); return response.Success; }