Referência da API

Feeds (RSS)

Inscreva-se em feeds RSS/Atom, obtenha entradas e salve artigos nas notas. Suporta importação/exportação OPML.

Definições de Tipo

bash
type Feed {
  id: ID!
  url: String!                # RSS/Atom URL
  name: String!               # display name (defaults to feed title)
  fetchContent: Boolean!      # when true, the server fetches the full article body
  updatedAt: String!
}

type FeedCount {
  feedId: ID!
  count: Int!                 # total entries
  unreadCount: Int!
}

type FeedEntry {
  id: ID!
  feedId: ID!
  title: String!
  description: String!        # short summary
  content: String!            # full article body (may be empty until fetched)
  url: String!                # canonical article URL
  publishedAt: String!        # ISO 8601
  read: Boolean!
  favorite: Boolean!
  tags: [Tag!]!
}

Operações

query

feeds

Liste todos os feeds inscritos.

bash
query GetFeeds {
  feeds { id url name fetchContent updatedAt }
}
query

feedsCount

Contagens total e não lidas por feed.

bash
query GetFeedsCount {
  feedsCount { feedId count unreadCount }
}
query

feedEntries

Pesquise entradas de feed (título + descrição). Deixe a consulta vazia para listar todas.

bash
query GetFeedEntries($offset: Int!, $limit: Int!, $query: String!) {
  feedEntries(offset: $offset, limit: $limit, query: $query) {
    id feedId title description content url publishedAt read favorite
    tags { id name }
  }
}
query

feedEntryCount

Conte entradas de feed correspondentes a uma consulta.

bash
query GetFeedEntryCount($query: String!) {
  feedEntryCount(query: $query)
}
query

feedEntry

Obtenha uma única entrada de feed por ID.

bash
query GetFeedEntry($id: ID!) {
  feedEntry(id: $id) { id feedId title description content url publishedAt read favorite }
}
mutation

createFeed

Inscreva-se em um novo feed. O servidor busca o canal RSS para preencher o nome e então inicia uma sincronização única.

bash
mutation CreateFeed($url: String!, $fetchContent: Boolean!) {
  createFeed(url: $url, fetchContent: $fetchContent) { id url name fetchContent updatedAt }
}
mutation

updateFeed

Atualize o nome de exibição do feed ou o flag fetchContent.

bash
mutation UpdateFeed($id: ID!, $name: String!, $fetchContent: Boolean!) {
  updateFeed(id: $id, name: $name, fetchContent: $fetchContent) { id url name fetchContent updatedAt }
}
mutation

deleteFeed

Cancele a inscrição de um feed e exclua todas as suas entradas (e suas relações de tag).

bash
mutation DeleteFeed($id: ID!) {
  deleteFeed(id: $id)
}
mutation

syncFeeds

Dispare um worker de sincronização de feed única. Passe um id para sincronizar um único feed; passe null ou vazio para sincronizar todos.

bash
mutation SyncFeeds($id: ID) {
  syncFeeds(id: $id)
}
mutation

syncFeedEntryContent

Fetch the full article body for a single feed entry. Returns the updated entry.

bash
mutation SyncFeedEntryContent($id: ID!) {
  syncFeedEntryContent(id: $id) { id content }
}
mutation

deleteFeedEntries

Exclua entradas de feed correspondentes a uma consulta (e suas relações de tag).

bash
mutation DeleteFeedEntries($query: String!) {
  deleteFeedEntries(query: $query)
}
mutation

importFeeds

Importe um documento OPML (como string) para o banco de dados de feeds.

bash
mutation ImportFeeds($content: String!) {
  importFeeds(content: $content)
}
mutation

exportFeeds

Exporte todos os feeds inscritos como uma string OPML.

bash
mutation ExportFeeds {
  exportFeeds
}