Exemple #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);
 }
Exemple #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);
 }            
Exemple #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);
 }
Exemple #4
0
 public Json(User user)
 {
     _user = user;
 }
Exemple #5
0
 public static void DeleteRelationship(User user, RelationshipType type)
 {
     Json.DeleteRelationship(user, type);
 }
Exemple #6
0
 public static void CreateRelationship(User user, RelationshipType type)
 {
     Json.CreateRelationship(user, type);
 }
Exemple #7
0
 public static void UnSubscribe(User user)
 {       
     Json.UnSubscribe(user);
 }