List
1
2
3
public PagedList<Entry> List(PageOptions pageOptions = null)
{
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get all entries with the default paging options
var entries = client.Entries.List();
// Get all entries with specified paging options
var entries = client.Entries.List(new PageOptions(3, 10));
List as typed model
1
2
3
public PagedList<T> List<T>(PageOptions pageOptions = null) where T: class
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get all entries with the default paging options
var movies = client.Entries.List<Movie>();
// Get all entries with specified paging options
var movies = client.Entries.List<Movie>(new PageOptions(3, 10));
List async
1
2
3
public async Task<PagedList<Entry>> List(PageOptions pageOptions = null)
{
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get all entries with the default paging options
var entries = await client.Entries.ListAsync();
// Get all entries with specified paging options
var entries = await client.Entries.ListAsync(new PageOptions(3, 10));
List as typed model async
1
2
3
public async Task<PagedList<T>> ListAsync<T>(PageOptions pageOptions = null) where T: class
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get all entries with the default paging options
var entries = await client.Entries.ListAsync();
// Get all entries with specified paging options
var entries = await client.Entries.ListAsync(new PageOptions(3, 10));
List by content type
1
2
3
public PagedList<Entry> List(string contentTypeId, PageOptions pageOptions = null)
{
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get entries with the default paging options
var entries = client.Entries.List("movie");
// Get all entries with specified paging options
var entries = client.Entries.List("movie", new PageOptions(3, 10));
List as typed model by content type
1
2
3
public PagedList<T> List<T>(string contentTypeId, PageOptions pageOptions = null) where T: class
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get entries as typed models with the default paging options
var entries = client.Entries.List<Movie>("movie");
// Get all entries as typed models with specified paging options
var entries = client.Entries.List<Movie>("movie", new PageOptions(3, 10));
List by content type async
1
2
3
public async Task<PagedList<Entry>> ListAsync(string contentTypeId, PageOptions pageOptions = null)
{
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get entries with the default paging options
var entries = await client.Entries.ListAsync("movie");
// Get all entries with specified paging options
var entries = await client.Entries.ListAsync("movie", new PageOptions(3, 10));
List as typed model by content type async
1
2
3
public async Task<PagedList<T>> ListAsync(string contentTypeId, PageOptions pageOptions = null) where T: class
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
7
8
// Create a client
var client = ContensisClient.Create();
// Get entries as typed models with the default paging options
var entries = await client.Entries.ListAsync<Movie>("movie");
// Get all entries as typed models with specified paging options
var entries = await client.Entries.ListAsync<Movie>("movie", new PageOptions(3, 10));
List by content type with paging and ordering
1
2
3
public PagedList<Entry> List(string contentTypeId, PageOptions pageOptions, IList<string> order)
{
}
1
2
3
4
5
6
// Create a client
var client = ContensisClient.Create();
// Get movie entries of with paging options and ordering
var entries = client.Entries.List("movie", new PageOptions(3, 10),
new [] { "title", "-dateOfRelease" } );
List as typed model by content type with paging and ordering
1
2
3
public PagedList<T> List<T>(string contentTypeId, PageOptions pageOptions, IList<string> order)
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
// Create a client
var client = ContensisClient.Create();
// Get movie entries as Movie instances with paging options and ordering
var entries = client.Entries.List<Movie>("movie", new PageOptions(3, 10),
new [] { "title", "-dateOfRelease" } );
List by content type with paging and ordering asynchronously
1
2
3
public async Task<PagedList<Entry>> ListAsync(string contentTypeId, PageOptions pageOptions, SortFields sortFields)
{
}
1
2
3
4
5
6
// Create a client
var client = ContensisClient.Create();
// Get all entries with the default paging options
var entries = await client.Entries.ListAsync("movie", new PageOptions(3, 10),
new SortFields { new SortField("title", SortField.FieldSortDirection.Descending) });
List as typed model by content type with paging and ordering asynchronously
1
2
3
public async Task<PagedList<T>> ListAsync<T>(string contentTypeId, PageOptions pageOptions, SortFields sortFields)
{
}
1
2
3
4
5
// Create a client
var client = ContensisClient.Create();
// Get all entries with the default paging options
var entries = await client.Entries.ListAsync<Movie>("movie", new PageOptions(3, 10), new [] {"-title" });
List with options object
1
2
3
public PagedList<Entry> List(EntryListOptions listOptions)
{
}
1
2
3
4
5
6
7
8
9
10
11
12
// Create a client
var client = ContensisClient.Create();
// Use the list options to filter the entry listing
var entries = client.Entries.List(new EntryListOptions{
ContentTypeId = "movie",
PageOptions = new PageOptions(3, 10),
Order = new[] { "title", "-sys.version.created" },
Language = "fr-fr",
LinkDepth = 5,
Fields = new[] { "title", "description", "releaseDate", "coverImage" }
});
List as typed model with options object
1
2
3
public PagedList<T> List<T>(EntryListOptions listOptions)
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
7
8
9
10
11
12
// Create a client
var client = ContensisClient.Create();
// Use the list options to filter the entry listing
var entries = client.Entries.List<Movie>(new EntryListOptions{
ContentTypeId = "movie",
PageOptions = new PageOptions(3, 10),
Order = new[] { "title", "-sys.version.created" },
Language = "fr-fr",
LinkDepth = 5,
Fields = new[] { "title", "dateOfRelease" }
});
List with options object asynchronously
1
2
3
public Task<PagedList<Entry>> ListAsync(EntryListOptions listOptions)
{
}
1
2
3
4
5
6
7
8
9
10
11
12
// Create a client
var client = ContensisClient.Create();
// Use the list options to filter the entry data
var entries = await client.Entries.ListAsync(new EntryListOptions{
ContentTypeId = "movie",
PageOptions = new PageOptions(3, 10),
Order = new[] { "title", "-sys.version.created" },
Language = "fr-fr",
LinkDepth = 5,
Fields = new { "title", "description", "releaseDate", "coverImage" }
});
List as typed model with options object asynchronously
1
2
3
public async Task<PagedList<T>> ListAsync(EntryListOptions listOptions)
{
}
1
2
3
4
5
6
public class Movie
{
public string Title { get; set; }
public DateTime DateOfRelease { get; set; }
}
1
2
3
4
5
6
7
8
9
10
11
12
// Create a client
var client = ContensisClient.Create();
// Use the list options to filter the entry data
var entries = await client.Entries.ListAsync<Movie>(new EntryListOptions{
ContentTypeId = "movie",
PageOptions = new PageOptions(3, 10),
Order = new[] { "title", "-sys.version.created" },
Language = "fr-fr",
LinkDepth = 5,
Fields = new { "title", "-dateOfRelease" }
});