/// <summary> /// Returns updated <see cref="Team" /> for the current org. /// </summary> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>Updated <see cref="Team"/></returns> public Task <Team> Update(int id, UpdateTeam team) { Ensure.ArgumentNotNull(team, "team"); var endpoint = ApiUrls.Teams(id); return(ApiConnection.Patch <Team>(endpoint, team)); }
/// <summary> /// Returns updated <see cref="Team" /> for the current org. /// </summary> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>Updated <see cref="Team"/></returns> public Task <Team> Update(int id, UpdateTeam team) { Ensure.ArgumentNotNull(team, nameof(team)); var endpoint = ApiUrls.Teams(id); return(ApiConnection.Patch <Team>(endpoint, team, AcceptHeaders.NestedTeamsPreview)); }
/// <summary> /// Gets a single <see cref="Team"/> by identifier. /// </summary> /// <remarks> /// https://developer.github.com/v3/orgs/teams/#get-team /// </remarks> /// <param name="id">The team identifier.</param> /// <returns>The <see cref="Team"/> with the given identifier.</returns> public Task <Team> Get(int id) { var endpoint = ApiUrls.Teams(id); return(ApiConnection.Get <Team>(endpoint)); }
/// <summary> /// Delte a team - must have owner permissions to this /// </summary> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns></returns> public Task Delete(int id) { var endpoint = ApiUrls.Teams(id); return(ApiConnection.Delete(endpoint)); }
/// <summary> /// Gets a single <see cref="Team"/> by identifier. /// </summary> /// <remarks> /// https://developer.github.com/v3/orgs/teams/#get-team /// </remarks> /// <param name="id">The team identifier.</param> /// <returns>The <see cref="Team"/> with the given identifier.</returns> public Task <Team> Get(int id) { var endpoint = ApiUrls.Teams(id); return(ApiConnection.Get <Team>(endpoint, null, AcceptHeaders.NestedTeamsPreview)); }
/// <summary> /// Delte a team - must have owner permissions to this /// </summary> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns></returns> public Task Delete(int id) { var endpoint = ApiUrls.Teams(id); return(ApiConnection.Delete(endpoint, new object(), AcceptHeaders.NestedTeamsPreview)); }