Example #1
0
 public static string CreateRelationship(User user, RelationshipType type)
 {
     string email = user.Contact.EmailAddresses.FirstOrDefault(e => e.Type == "primary").Address;
     NameValueCollection parameters = new NameValueCollection();
     parameters.Add("user_id", user.Id);
     parameters.Add(type.ToString().ToLower(), email);
     return Yammer.APIWrapper.HttpUtility.Post(Resources.Relationships.Add, parameters);
 }
Example #2
0
 public static string DeleteRelationship(User user, RelationshipType type)
 {
     NameValueCollection parameters = new NameValueCollection();
     parameters.Add("relationship_type", type.ToString().ToLower());
     return Yammer.APIWrapper.HttpUtility.Delete(Resources.Relationships.Delete(user.Id), parameters);
 }            
Example #3
0
 public static string UnSubscribe(User user)
 {
     NameValueCollection parameters = new NameValueCollection();
     parameters.Add("target_type", "user");
     parameters.Add("target_id", user.Id);
     return Yammer.APIWrapper.HttpUtility.Delete(Resources.Subscriptions.Unsubscribe, parameters);
 }
Example #4
0
 public Json(User user)
 {
     _user = user;
 }
Example #5
0
 public static void DeleteRelationship(User user, RelationshipType type)
 {
     Json.DeleteRelationship(user, type);
 }
Example #6
0
 public static void CreateRelationship(User user, RelationshipType type)
 {
     Json.CreateRelationship(user, type);
 }
Example #7
0
 public static void UnSubscribe(User user)
 {       
     Json.UnSubscribe(user);
 }