@@ -167,7 +167,19 @@ public async Task DeleteSpace(string id, CancellationToken cancellationToken = d
167
167
/// <returns>An <see cref="IEnumerable{T}"/> of <see cref="ContentType"/>.</returns>
168
168
public async Task < IEnumerable < ContentType > > GetContentTypes ( string spaceId = null , CancellationToken cancellationToken = default )
169
169
{
170
- var res = await GetAsync ( $ "{ _baseUrl } { spaceId ?? _options . SpaceId } /{ EnvironmentsBase } content_types", cancellationToken ) . ConfigureAwait ( false ) ;
170
+ return await GetContentTypes ( null , spaceId , cancellationToken ) ;
171
+ }
172
+
173
+ /// <summary>
174
+ /// Get all content types of a space.
175
+ /// </summary>
176
+ /// <param name="queryString">The optional querystring to add additional filtering to the query.</param>
177
+ /// <param name="spaceId">The id of the space to get the content types of. Will default to the one set when creating the client.</param>
178
+ /// <param name="cancellationToken">The optional cancellation token to cancel the operation.</param>
179
+ /// <returns>An <see cref="IEnumerable{T}"/> of <see cref="ContentType"/>.</returns>
180
+ public async Task < IEnumerable < ContentType > > GetContentTypes ( string queryString , string spaceId = null , CancellationToken cancellationToken = default )
181
+ {
182
+ var res = await GetAsync ( $ "{ _baseUrl } { spaceId ?? _options . SpaceId } /{ EnvironmentsBase } content_types/{ queryString } ", cancellationToken ) . ConfigureAwait ( false ) ;
171
183
172
184
await EnsureSuccessfulResult ( res ) . ConfigureAwait ( false ) ;
173
185
@@ -307,7 +319,19 @@ public async Task DeactivateContentType(string contentTypeId, string spaceId = n
307
319
/// <returns>An <see cref="IEnumerable{T}"/> of <see cref="ContentType"/>.</returns>
308
320
public async Task < IEnumerable < ContentType > > GetActivatedContentTypes ( string spaceId = null , CancellationToken cancellationToken = default )
309
321
{
310
- var res = await GetAsync ( $ "{ _baseUrl } { spaceId ?? _options . SpaceId } /{ EnvironmentsBase } public/content_types", cancellationToken ) . ConfigureAwait ( false ) ;
322
+ return await GetActivatedContentTypes ( null , spaceId , cancellationToken ) ;
323
+ }
324
+
325
+ /// <summary>
326
+ /// Get all activated content types of a space.
327
+ /// </summary>
328
+ /// <param name="queryString">The optional querystring to add additional filtering to the query.</param>
329
+ /// <param name="spaceId">The id of the space to get the activated content types of. Will default to the one set when creating the client.</param>
330
+ /// <param name="cancellationToken">The optional cancellation token to cancel the operation.</param>
331
+ /// <returns>An <see cref="IEnumerable{T}"/> of <see cref="ContentType"/>.</returns>
332
+ public async Task < IEnumerable < ContentType > > GetActivatedContentTypes ( string queryString , string spaceId = null , CancellationToken cancellationToken = default )
333
+ {
334
+ var res = await GetAsync ( $ "{ _baseUrl } { spaceId ?? _options . SpaceId } /{ EnvironmentsBase } public/content_types/{ queryString } ", cancellationToken ) . ConfigureAwait ( false ) ;
311
335
312
336
await EnsureSuccessfulResult ( res ) . ConfigureAwait ( false ) ;
313
337
0 commit comments