PivotalTrackerAPI/Domain/Model/PivotalProject.cs
/// <summary>
/// Adds a member to a project
/// </summary>
/// <param name="user">The user to get the ApiToken from</param>
/// <param name="project">The project to get membership info for</param>
/// <param name="member">The person and role to add to the project</param>
/// <returns>The added member's identity</returns>
Adds a member to a project
Adds a member to a project
public static PivotalMembership AddMember(PivotalUser user, PivotalProject project, PivotalMembership member)
    {
      string url = String.Format("{0}/projects/{1}/memberships?token={2}", PivotalService.BaseUrl, project.Id.ToString(), user.ApiToken);
      XmlDocument xml = SerializationHelper.SerializeToXmlDocument<PivotalMembership>(member);
      string memberXml = PivotalService.CleanXmlForSubmission(xml, "//membership", ExcludeNodesOnSubmit, true);
      XmlDocument response = PivotalService.SubmitData(url, memberXml, ServiceMethod.POST);
      return SerializationHelper.DeserializeFromXmlDocument<PivotalMembership>(response);
    }
public static PivotalMembership AddMember ( PivotalUser user , PivotalProject project , PivotalMembership member ) { string url = String . Format ( " " , PivotalService . BaseUrl , project . Id . ToString ( ) , user . ApiToken ) ; XmlDocument xml = SerializationHelper . SerializeToXmlDocument < PivotalMembership > ( member ) ; string memberXml = PivotalService . CleanXmlForSubmission ( xml , " " , ExcludeNodesOnSubmit , true ) ; XmlDocument response = PivotalService . SubmitData ( url , memberXml , ServiceMethod . POST ) ; return SerializationHelper . DeserializeFromXmlDocument < PivotalMembership > ( response ) ; }
Adds a member to a project
Adds a member to a project
The added member's identity
The added member ' s identity
user
PivotalUser
The user to get the ApiToken from
The user to get the ApiToken from
project
PivotalProject
The project to get membership info for
The project to get membership info for
member
PivotalMembership
The person and role to add to the project
The person and role to add to the project