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

flomo-api-helper

v0.1.1

Published

An API helper for flomoapp.com

Downloads

40

Readme

flomo-api-helper

NPM version TAONPM version Nodejs David deps Known Vulnerabilities npm download install size

一个 flomo 的接口拓展工具,方便你开发自己的拓展工具。

本项目基于 flomo 的非公开接口开发,随时有可能挂掉,使用请悉知。

安装

安装前请确保你的 Node.js 版本大于等于 12.0.0。

$ npm install flomo-api-helper -g

配置

在任意位置新建一个目录。本文以 ~/flomo-api-helper 为例。

新建文件 ~/flomo-api-helper/.env

[email protected]
FLOMO_PASSWORD=123456qwerty
API_TOKEN=this-project-is-awesome

注意:

API_TOKEN 用于外部接口访问的鉴权。

运行

$ cd ~/flomo-api-helper
$ flomo start [--address 127.0.0.1 --port 8080]

--address

  • 可选
  • 默认值:127.0.0.1(仅能本地访问,若要公网访问设为 0.0.0.0,建议用反代暴露 HTTPS 接口)

--port

  • 可选
  • 默认值:8080

使用

鉴权

在请求头中增加:

X-Token: this-project-is-awesome

API

/api/*

所有 https://flomoapp.com/api/* 的接口都暴露在了 /api/* 路由上,你可以直接发起请求。因为这些接口非公开,恕不提供文档。

PUT /helper/memo

新建一个 memo。

curl -X "PUT" "https://example.com/helper/memo" \
     -H 'X-Token: this-project-is-awesome' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
          "content": "测试内容",
          "tags": "书摘",
          "contentType": "text"
        }'
  • content
    • 必须
  • tags
    • 可选
    • 描述:半角逗号分隔多个 tag(tag 必须连续没有空格分隔)
  • contentType
    • 可选
    • 默认值:text
    • 可选值:text | html
    • 描述:text 类型会对 content 中的换行符进行处理,并且将内容转换成 flomo 能展示的内容;html 类型不会对 content 进行转换。flomo 支持展示少量的 HTML 标签,如果你想保存 Markdown 生成的 HTML 请将这里改为 html

拓展工具

Wiki 页面列出了目前基于此 API 开发的拓展工具,欢迎使用。

License

MIT