Ejemplo n.º 1
0
 /// <summary>
 /// Set information about one of your users. Users are referenced by multiple keys.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 /// <seealso cref="http://docs.sailthru.com/api/user"/>
 public SailthruResponse SetUser(UserRequest request)
 {
     Hashtable hashForPost = new Hashtable();
     hashForPost.Add("json", JsonConvert.SerializeObject(request, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }));
     return this.ApiPost("user", hashForPost);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get information about one of your users. Users are referenced by multiple keys.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 /// <seealso cref="http://docs.sailthru.com/api/user"/>
 public SailthruResponse GetUser(UserRequest request)
 {
     Hashtable hashForPost = new Hashtable();
     hashForPost.Add("json", JsonConvert.SerializeObject(request, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }));  // If null is not ignored, user API call doesn't seem to work which is strange
     return this.ApiGet("user", hashForPost);
 }