Example #1
0
        public Task <IReadOnlyList <Organization> > GetAll(OrganizationFilters filters)
        {
            Ensure.ArgumentNotNull(filters, nameof(filters));

            var parameters = filters.Parameters;
            var options    = new ApiOptions
            {
                StartPage = filters.StartPage,
                PageCount = filters.PageCount,
                PageSize  = filters.PageSize
            };

            return(ApiConnection.GetAll <Organization>(ApiUrls.Organizations(), parameters, options));
        }
Example #2
0
        public Task <IReadOnlyList <Person> > GetPersons(long id, OrganizationFilters filters)
        {
            Ensure.ArgumentNotNull(filters, nameof(filters));
            var parameters = filters.Parameters;

            parameters.Add("id", id.ToString());
            var options = new ApiOptions
            {
                StartPage = filters.StartPage,
                PageCount = filters.PageCount,
                PageSize  = filters.PageSize
            };

            return(ApiConnection.GetAll <Person>(ApiUrls.OrganizationPersons(id), parameters, options));
        }
Example #3
0
        public Task <IReadOnlyList <Organization> > GetAllForUserId(int userId, OrganizationFilters filters)
        {
            Ensure.ArgumentNotNull(filters, nameof(filters));

            var parameters = filters.Parameters;

            parameters.Add("user_id", userId.ToString());
            var options = new ApiOptions
            {
                StartPage = filters.StartPage,
                PageCount = filters.PageCount,
                PageSize  = filters.PageSize
            };

            return(ApiConnection.GetAll <Organization>(ApiUrls.Organizations(), parameters, options));
        }