La paginación permite obtener los elementos de una lista muy grande de manera más eficiente, reduciendo los tempos de respuesta y el consumo de recursos. La lista que se obtiene representa una colección de objetos en un formato que nos permite paginar de una manera eficiente.
Objeto Lista
Atributos
Tipo | Descripción | |
---|---|---|
next_page_url | string | URL de la siguiente página. |
previous_page_url | string | Url de la página anterior. |
has_more | boolean | True, si hay más paginas. |
total | string | Número de la cantidad de registros en la lista |
object | string | El tipo de objeto en este caso, lista |
data | array | Arreglo con los resultados de página. |
//Ejemplo de paginación con valores especificos
{
"next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
"previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
"has_more": true,
"object": "list",
"total": 1,
"data": [{
"id": "src_2fw8YeLSqoaGEYTn3",
"object": "source",
"type": "card",
"created_at": 1597069683,
"last4": "4242",
"exp_month": "12",
"exp_year": "19",
"brand": "VISA",
"name": "Jorge Lopez",
"parent_id": "cus_zzmjKsnM9oacyCwV3"
}]
}
#Ejemplo de paginación con valores especificos
{
next_page_url: "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
previous_page_url: "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
has_more: true,
object: "list",
total: 1,
data: [{
id: "src_2fw8YeLSqoaGEYTn3",
object: "source",
type: "card",
created_at: 1597069683,
last4: "4242",
exp_month: "12",
exp_year: "19",
brand: "VISA",
name: "Jorge Lopez",
parent_id: "cus_zzmjKsnM9oacyCwV3"
}]
}
//Ejemplo de paginación con valores especificos
{
"next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
"previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
"has_more": true,
"object": "list",
"total": 1,
"data": [{
"id": "src_2fw8YeLSqoaGEYTn3",
"object": "source",
"type": "card",
"created_at": 1597069683,
"last4": "4242",
"exp_month": "12",
"exp_year": "19",
"brand": "VISA",
"name": "Jorge Lopez",
"parent_id": "cus_zzmjKsnM9oacyCwV3"
}]
}
#Ejemplo de paginación con valores especificos
{
"next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
"previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
"has_more": true,
"object": "list",
"total": 1,
"data": [{
"id": "src_2fw8YeLSqoaGEYTn3",
"object": "source",
"type": "card",
"created_at": 1597069683,
"last4": "4242",
"exp_month": "12",
"exp_year": "19",
"brand": "VISA",
"name": "Jorge Lopez",
"parent_id": "cus_zzmjKsnM9oacyCwV3"
}]
}
//Ejemplo de paginación con valores especificos
{
"next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
"previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
"has_more": true,
"object": "list",
"total": 1,
"data": [{
"id": "src_2fw8YeLSqoaGEYTn3",
"object": "source",
"type": "card",
"created_at": 1597069683,
"last4": "4242",
"exp_month": "12",
"exp_year": "19",
"brand": "VISA",
"name": "Jorge Lopez",
"parent_id": "cus_zzmjKsnM9oacyCwV3"
}]
}
//Ejemplo de paginación con valores especificos
{
next_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5,
previous_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5,
has_more = true,
object = list,
total = 1,
data = [{
id = src_2fw8YeLSqoaGEYTn3,
object = source,
type = card,
created_at = 1597069683,
last4 = 4242,
exp_month = 12,
exp_year = 19,
brand = VISA,
name = Jorge Lopez,
parent_id = cus_zzmjKsnM9oacyCwV3
}]
}
//Ejemplo de paginación con valores especificos
"{
\"next_page_url\": \"https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5\",
\"previous_page_url\": \"https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5\",
\"has_more\": true,
\"object\": \"list\",
\"total\": 1,
\"data\": [{
\"id\": \"src_2fw8YeLSqoaGEYTn3\",
\"object\": \"source\",
\"type\": \"card\",
\"created_at\": 1597069683,
\"last4\": \"4242\",
\"exp_month\": \"12\",
\"exp_year\": \"19\",
\"brand\": \"VISA\",
\"name\": \"Jorge Lopez\",
\"default\": null,
\"parent_id\": \"cus_zzmjKsnM9oacyCwV3\"
}]
}"
//Ejemplo de paginación con valores especificos
{
next_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5,
previous_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5,
has_more = true,
object = list,
total = 1,
data = [{
id = src_2fw8YeLSqoaGEYTn3,
object = source,
type = card,
created_at = 1597069683,
last4 = 4242,
exp_month = 12,
exp_year = 19,
brand = VISA,
name = Jorge Lopez,
parent_id = cus_zzmjKsnM9oacyCwV3
}]
}