1.0.1 • Published 5 years ago

meed v1.0.1

Weekly downloads
52
License
MIT
Repository
github
Last release
5 years ago

Travis

Modern JS library for getting Medium RSS feeds (user, publcation, topic, or tag) as JSON. Targets modern browsers / Node.js with an API that utilizes fetch along with async / await.

Check out the Meed docs for details.

What

Get Medium RSS feeds as JSON. Check out Ghosts/medium-feed because it may suit your needs better.

Why

Because @Ghosts was writing medium-feed. ¯\_(ツ)_/¯

How

Medium provides basic docs regarding the RSS feeds: https://help.medium.com/hc/en-us/articles/214874118-RSS-feeds You can get feeds for a user, publication, topic, or tag. Topics can be found at https://medium.com/topics or via Meed#topics(). In general, feeds seem to be limited to 10 items.

Check out the Meed docs for more.

Install

Via npm or unpkg:

Use

In a browser that supports fetch & async/await:

const feed = new Meed()

;(async () => {
  const user = await feed.user("Medium")
  console.log(user)
})()

or in Node.js (bring your own fetch):

const Meed  = require("meed")
const fetch = require("node-fetch")

const feed = new Meed({ fetch })

;(async () => {
  const user = await feed.user("Medium")
  console.log(user)
})()

Proxy

For local(host) testing in a browser, you'll probably need a CORS proxy. Here's a list: https://gist.github.com/jimmywarting/ac1be6ea0297c16c477e17f8fbe51347

You can use one like so:

new Meed({ proxy: "PROXY_URL" })

I've had good luck with https://cors-anywhere.herokuapp.com/.

Check out the Meed docs for more details.

Who

Paul Esch-Laurent.

License

MIT.

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-beta.1

5 years ago