Skip to content

Pager.HasNextPage is true when it should be false #23

@csforbes

Description

@csforbes

I am excited to try this out, but I may be using this wrong. The Pager seems like it is not interpreting 'hasNextPage' correctly when using the .NET SDK.

C# .NET 8 below:

var client = new SamsaraClient("samsara_api_TOKEN");
var drivers = await client.Drivers.ListAsync(new DriversListRequest()); //known 1-page result with 7 drivers
var hasNextPage = drivers.HasNextPage; //always true
await foreach (var driver in drivers) //continually loops over same 7 drivers
{
    Console.WriteLine(driver.Name); 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions