Getting data from rest API and Do Pagination

HI everybody,
I have requirement like . getting json data as response from rest api and do pagination on those values.
And those values we are not going to save in mongodb. If we are saving json values to mongodb . i am able to do pagination using Alethes:pages plug in. With out saving data to mongodb I am not able to do pagination.

Can anybody help on this.

Niladri Rout

Maybe save the data to a local collection?

APIResponse = new Mongo.Collection(null);

I tried using new Mongo.Collection(null). but its not working .

So something like…

export const Pages = new Mongo.Collection('pages'); // client only collection.

export class PaginatedList extends BlazeComponent {
  onCreated() {

      perPage: 10

    this.autorun(() => {
      this.subscribe('pages', FlowRouter.getParam('page'), {
        perPage: FlowRouter.getQueryParam('perPage')

Then you can make a fancy publication that adds “pages”.

Meteor.publish('pages', function (page, options) {
  check(page, Number);
  check(options, Match.ObjectIncluding({
    perPage: Number

  const observer = YourCollection.find({}, {
    skip: page * options.perPage,
    limit: perPage
    added: doc => this.added('pages', doc._id, Object.assign(doc, { page: page }))

  this.onStop(() => observer.stop());

HI corvid,
I am new to meteor. I am not able to understand which code to write where. can u give me some git hub repository so that i can check that. Or is there any way that u can show me one sample example

Thanks for your time