getRoutes

suspend fun getRoutes(page: Int, pageSize: Int, fromDate: String, toDate: String, sendPolyline: Boolean? = null): GetRoutesResult

Get paginated routes list with date range filtering.

This method implements an offline-first approach:

  1. Returns cached routes immediately if available

  2. Background sync will update the data automatically via delta sync

Return

GetRoutesResult containing routes list with pagination metadata, or error

Parameters

page

Page number for pagination (1-based)

pageSize

Number of routes per page

fromDate

Start date for route filtering in ISO format (YYYY-MM-DD)

toDate

End date for route filtering in ISO format (YYYY-MM-DD)

sendPolyline

Optional flag to include polyline data in API response