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));
        }