Skip to content

Can't get all read later entries #2

Description

@gengen1988

Hi michaelx,

I'm arranging my bookmarks recently. This project is useful for me. It retrieve my records since google reader times.

However it can't get all my articles. It only return 500 items. My actually count is 1031.

The code using count 10000, which is the maximum number in developer docs. There must be some other limit.

Maybe using continuation is more reliable choice. I'm not very familiar with python, so I just leave some js example here.

function createClient(accessToken) {
  return require('axios').create({
    baseURL: 'https://cloud.feedly.com/v3/',
    headers: {
      Authorization: `OAuth ${accessToken}`
    }
  })
}

const feedly = createClient(token)

async function getReadLater(streamId) {
  const count = 100
  let continuation
  let entries = []
  do {
    const doc = await feedly.get('streams/contents', { params: { streamId, continuation, count } })
    continuation = doc.data.continuation
    entries = [...doc.data.items, ...entries]
  } while (continuation)
  return entries
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions