Pagination
Many API calls are paginated. You can provide page and per_page params to the API. In the example below we are getting all inputs and specifying to start at page 2 and get back 20 results per page.
app.inputs.list({page: 2, perPage: 20});from clarifai.rest import ClarifaiApp
app = ClarifaiApp(api_key='YOUR_API_KEY')
app.inputs.get_by_page(page=2, per_page=20)client.getInputs()
.perPage(20) // OPTIONAL, to specify how many results should be on one page
.getPage(2)
.executeSync();using System.Threading.Tasks;
using Clarifai.API;
namespace YourNamespace
{
public class YourClassName
{
public static async Task Main()
{
var client = new ClarifaiClient("YOUR_API_KEY");
await client.GetInputs()
.PerPage(20) // OPTIONAL, to specify how many results should be on one page
.Page(2)
.ExecuteAsync();
}
}
}Last updated
Was this helpful?