I have to create a loop with the Admin API, i need the data of each single post one after the other.
I would like to find a solution as it is used to do with MySQL, for example LIMIT n, 1;
With the Ghost API if I use the page parameter, I fetch more than one post at a time, if I use the limit:n parameter, it will fetch me the new post plus all the previous ones.
n = 1
api.posts
.browse({ limit: n, include: 'tags', filter: 'tags:-hash-fr' })
.then((posts) => {
n += 1
.catch((err) => {
console.error(err);
});
});
I’m not really following what it is that you’re trying to do. Both Content and Admin APIs have the same pagination via the limit, page, and order params which should cover majority of use cases - https://ghost.org/docs/content-api/#limit