Teams() публичный статический Метод

Returns the Uri for teams use for getting, updating, or deleting a Team.
public static Teams ( int id ) : Uri
id int The id of the .
Результат Uri
Пример #1
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));
        }
Пример #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> Update(int id, UpdateTeam team)
        {
            Ensure.ArgumentNotNull(team, nameof(team));

            var endpoint = ApiUrls.Teams(id);

            return(ApiConnection.Patch <Team>(endpoint, team, AcceptHeaders.NestedTeamsPreview));
        }
Пример #3
0
        /// <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));
        }
Пример #4
0
        /// <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));
        }
Пример #5
0
        /// <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));
        }
Пример #6
0
        /// <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));
        }