/// <summary> /// Updates the currently active user's profile /// </summary> /// <param name="instance">The instance.</param> /// <param name="userData">a YammerUser object representing the user data to change</param> /// <returns></returns> public static IYammerUsersCreate UpdateCurrent(this IYammerUsers instance, YammerUser userData) { instance.Root.Method = WebMethod.Put; instance.Root.Parameters.UseCurrentAsUserId = true; instance.Root.Parameters.UserData = userData; return new YammerUsersCreate(instance.Root); }
/// <summary> /// Updates the specified user's profile data (requires admin status). /// </summary> /// <param name="instance">The instance.</param> /// <param name="id">The id of the user to update</param> /// <param name="userData">a YammerUser object representing the user data to change</param> /// <returns></returns> public static IYammerUsersCreate Update(this IYammerUsers instance, long id, YammerUser userData) { instance.Root.Method = WebMethod.Put; instance.Root.Parameters.UserData = userData; instance.Root.Parameters.Id = id; return new YammerUsersCreate(instance.Root); }
/// <summary> /// Creates a new user in the network (Requires admin status) /// </summary> /// <param name="instance">The instance</param> /// <param name="userData">a YammerUser object representing the user data</param> /// <returns></returns> public static IYammerUsersCreate Create(this IYammerUsers instance, YammerUser userData) { instance.Root.Method = WebMethod.Post; instance.Root.Parameters.UserData = userData; return new YammerUsersCreate(instance.Root); }