From 06b49b420540eca68aad0c8b0ca71298d5392d34 Mon Sep 17 00:00:00 2001 From: William Belle Date: Mon, 14 Aug 2023 13:25:59 +0200 Subject: [PATCH] Offset --- README.md | 9 +++++---- src/services/semantic.service.js | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bfa0643..f47fde3 100644 --- a/README.md +++ b/README.md @@ -74,10 +74,11 @@ ### Parameters -| Name | Type | Comments | -| --------- | -------- | -------------------------------------------------------------------------------- | -| `q` | `String` | Query | -| `doctype` | `String` | Values : `concept`, `course`, `lecture`, `mooc`, `person`, `publication`, `unit` | +| Name | Type | Comments | +| --------- | -------- | -------------------------------------------------------------------------------------- | +| `q` | `String` | Query | +| `doctype` | `String` | Values : `concept`, `course`, `lecture`, `mooc`, `person`, `publication`, `unit` | +| `offset` | `Number` | The index of the first result to return. The default number of results per page is 10. | ### Examples diff --git a/src/services/semantic.service.js b/src/services/semantic.service.js index 9047c53..fcb9cfb 100644 --- a/src/services/semantic.service.js +++ b/src/services/semantic.service.js @@ -4,6 +4,7 @@ async function get (query) { return axios.get('https://graphdb.epfl.ch:41110/search/search.epfl.ch', { params: { q: query.q, + offset: query.offset || 0, types: query.doctype || 'any' } });