Exemplo n.º 1
0
        /// <summary>
        /// Gets all <see cref="Organization"/>'s.
        /// </summary>
        /// <remarks>
        ///<param name="request"><see cref="OrganizationRequest"/></param>
        /// This method requires authentication.
        /// See the <a href="http://gs2017dev.sdl.com:41234/documentation/api/index#/">API documentation</a> for more information.
        /// </remarks>
        /// <exception cref="AuthorizationException">
        /// Thrown when the current user does not have permission to make the request.
        /// </exception>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A list of <see cref="Organization"/>s.</returns>
        public async Task <IReadOnlyList <Organization> > GetAll(OrganizationRequest request)
        {
            Ensure.ArgumentNotNull(request, "request");

            return(await ApiConnection.GetAll <Organization>(ApiUrls.Organizations(), request.ToParametersDictionary()));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets all <see cref="Organization"/>'s.
        /// </summary>
        /// <remarks>
        /// This method requires authentication.
        /// See the <a href="http://sdldevelopmentpartners.sdlproducts.com/documentation/api">API documentation</a> for more information.
        /// </remarks>
        /// <exception cref="AuthorizationException">
        /// Thrown when the current user does not have permission to make the request.
        /// </exception>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A list of <see cref="Organization"/>s.</returns>
        public async Task<IReadOnlyList<Organization>> GetAll(OrganizationRequest request)
        {
            Ensure.ArgumentNotNull(request, "request");

            return await ApiConnection.GetAll<Organization>(ApiUrls.Organizations(), request.ToParametersDictionary());
        }