コード例 #1
0
ファイル: TeamsClient.cs プロジェクト: nsavga/octokit.net
        /// <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> UpdateTeam(int id, UpdateTeam team)
        {
            Ensure.ArgumentNotNull(team, "team");

            var endpoint = ApiUrls.TeamsUpdateOrDelete(id);
            return ApiConnection.Patch<Team>(endpoint, team);
        }
コード例 #2
0
        /// <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> UpdateTeam(int id, UpdateTeam team)
        {
            Ensure.ArgumentNotNull(team, "team");

            var endpoint = "teams/{0}".FormatUri(id);
            return ApiConnection.Patch<Team>(endpoint, team);
        }
コード例 #3
0
        /// <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));
        }
コード例 #4
0
        /// <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));
        }