npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

google-reader-api

v1.2.1

Published

A Google Reader API package that implements some interfaces. 一个 Google Reader API 的封装包,实现了部分接口。

Downloads

15

Readme

A Google Reader API package that implements some interfaces. 一个 Google Reader API 的封装包,实现了部分接口。

目前没有足够的精力编写文档,如果你需要翻译的话,请提 issue

At present, there is not enough energy to write the document. If you need translation, please open an issue

🏠 主页

https://github.com/CaoMeiYouRen/google-reader-api#readme

📦 依赖要求

  • node >=16

🚀 安装

npm install google-reader-api

👨‍💻 使用

更多内容请参考:https://feedhq.readthedocs.io/en/latest/api/reference.html

构造函数

const api = new GoogleReaderApi(baseUrl, email, password);
  • baseUrl: Google Reader 服务的基本 URL,例如 https://freshrss.example.net/api/greader.php
  • email: 用户的电子邮件地址
  • password: 用户的密码

方法

获取用户信息

const userInfo = await api.getUserInfo();

返回用户的信息,包括用户名、电子邮件地址等。

获取未读文章数量

const unreadCounts = await api.getUnreadCounts();

返回所有订阅源的未读文章数量。

禁用标签

const response = await api.disableTag(category);
  • category: 要禁用的标签 ID 或名称

返回 OK 表示成功。

重命名标签

const response = await api.renameTag(category, newLabelName);
  • category: 要重命名的标签 ID 或名称
  • newLabelName: 新的标签名称

返回 OK 表示成功。

获取订阅源列表

const subscriptions = await api.getSubscriptionList();

返回所有订阅源的列表。

编辑订阅源

const response = await api.editSubscription(data);
  • data: 编辑订阅源的数据,包括 actionstreamIdtitlecategoryId

返回 OK 表示成功。

添加订阅源

const response = await api.quickAddSubscription(feedUrl);
  • feedUrl: 要添加的订阅源 URL

返回添加的订阅源信息。

导出订阅源

const opmlContent = await api.exportSubscriptions();

返回 OPML 格式的订阅源列表。

导入订阅源

const response = await api.importSubscriptions(opmlContent);
  • opmlContent: OPML 格式的订阅源列表

返回 OK 表示成功。

检查订阅源

const isSubscribed = await api.checkSubscription(streamId);
  • streamId: 要检查的订阅源 ID

返回 true 表示订阅了该源,false 表示未订阅。

获取流内容

const streamContents = await api.getStreamContents(data);
  • data: 获取流内容的数据,包括 streamIdsortCriteriaitemsPerPage

返回流内容列表。

获取流项目 ID

const streamItemIds = await api.getStreamItemIds(data);
  • data: 获取流项目 ID 的数据,包括 streamIdincludeAllDirectStreamIdsitemsPerPage

返回流项目 ID 列表。

获取流项目数量

const streamItemCount = await api.getStreamItemCount(data);
  • data: 获取流项目数量的数据,包括 streamIdincludeLatestDate

返回流项目数量。

获取流项目内容

const streamItemContents = await api.getStreamItemContents(itemIds);
  • itemIds: 要获取内容的项目 ID 列表

返回流项目内容列表。

获取标签列表

const tagList = await api.getTagList();

返回标签列表。

编辑标签

const response = await api.editTag(data);
  • data: 编辑标签的数据,包括 editIdsaddIdsremoveIds

返回 OK 表示成功。

标记所有文章为已读

const response = await api.markAllAsRead(data);
  • data: 标记所有文章为已读的数据,包括 streamIdtimestampUsec

返回 OK 表示成功。

🛠️ 开发

npm run dev

🔧 编译

npm run build

🔍 Lint

npm run lint

💾 Commit

npm run commit

👤 作者

CaoMeiYouRen

🤝 贡献

欢迎 贡献、提问或提出新功能!如有问题请查看 issues page. 贡献或提出新功能可以查看contributing guide.

💰 支持

如果觉得这个项目有用的话请给一颗⭐️,非常感谢

🌟 Star History

Star History Chart

📝 License

Copyright © 2024 CaoMeiYouRen. This project is MIT licensed.


This README was generated with ❤️ by cmyr-template-cli