OrganizationTeams() 공개 정적인 메소드

returns the Uri for org teams use for both Get and Create methods
public static OrganizationTeams ( string organization ) : Uri
organization string
리턴 System.Uri
예제 #1
0
        /// <summary>
        /// Returns all <see cref="Team" />s for the current org.
        /// </summary>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A list of the orgs's teams <see cref="Team"/>s.</returns>
        public Task <IReadOnlyList <Team> > GetAll(string org)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, "org");

            var endpoint = ApiUrls.OrganizationTeams(org);

            return(ApiConnection.GetAll <Team>(endpoint));
        }
예제 #2
0
        /// <summary>
        /// Returns newly created <see cref="Team" /> for the current org.
        /// </summary>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>Newly created <see cref="Team"/></returns>
        public Task <Team> Create(string org, NewTeam team)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, "org");
            Ensure.ArgumentNotNull(team, "team");

            var endpoint = ApiUrls.OrganizationTeams(org);

            return(ApiConnection.Post <Team>(endpoint, team));
        }
예제 #3
0
        /// <summary>
        /// Returns newly created <see cref="Team" /> for the current org.
        /// </summary>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>Newly created <see cref="Team"/></returns>
        public Task <Team> Create(string org, NewTeam team)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
            Ensure.ArgumentNotNull(team, nameof(team));

            var endpoint = ApiUrls.OrganizationTeams(org);

            return(ApiConnection.Post <Team>(endpoint, team, AcceptHeaders.NestedTeamsPreview));
        }
예제 #4
0
        public Task <IReadOnlyList <Team> > GetAll(string org, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
            Ensure.ArgumentNotNull(options, nameof(options));

            var endpoint = ApiUrls.OrganizationTeams(org);

            return(ApiConnection.GetAll <Team>(endpoint, options));
        }
예제 #5
0
        /// <summary>
        /// Returns all <see cref="Team" />s for the current org.
        /// </summary>
        /// <param name="org">Organization to list teams of.</param>
        /// <param name="options">Options to change API behaviour.</param>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A list of the orgs's teams <see cref="Team"/>s.</returns>
        public Task <IReadOnlyList <Team> > GetAll(string org, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, "org");
            Ensure.ArgumentNotNull(options, "options");

            var endpoint = ApiUrls.OrganizationTeams(org);

            return(ApiConnection.GetAll <Team>(endpoint, null, AcceptHeaders.NestedTeamsPreview, options));
        }