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