Exemplo n.º 1
0
        /// <inheritdoc/>
        public Task <ContentsResult <TEntity, TData> > GetAsync(ContentQuery?query   = null, QueryContext?context = null,
                                                                CancellationToken ct = default)
        {
            var q = query?.ToQuery(true) ?? string.Empty;

            return(RequestJsonAsync <ContentsResult <TEntity, TData> >(HttpMethod.Get, BuildSchemaUrl(q, true, context), null, context, ct));
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public Task <ContentsResult <TEntity, TData> > GetReferencesAsync(string id, ContentQuery query = null, QueryContext context = null, CancellationToken ct = default)
        {
            Guard.NotNullOrEmpty(id, nameof(id));

            var q = query?.ToQuery(true) ?? string.Empty;

            return(RequestJsonAsync <ContentsResult <TEntity, TData> >(HttpMethod.Get, BuildSchemaUrl($"{id}/references{q}", true, context), null, context, ct));
        }
        public Task <AssetEntities> GetAssetsAsync(ContentQuery query = null)
        {
            var queryString = query?.ToQuery(false) ?? string.Empty;

            return(RequestJsonAsync <AssetEntities>(HttpMethod.Get, BuildAppAssetsUrl(queryString)));
        }