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

api-flow

v0.1.0

Published

A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.

Downloads

17

Readme

Build Status

API Flow

A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.

Installation

from a cloned repository

just run

git clone https://github.com/luckymarmot/API-Flow.git
make install

This will install the node module dependencies and create the lib folder from which you will be able to run the cli.

from npm (not yet available)

just run

npm install api-flow

Building the different libraries

node, web, and webworker

run the following command to build API-Flow for the different environments that you need

# use TARGET="node" if you only want the node library
make runners TARGET="node web webworker"

Paw

You can use the following command to add the different extensions to Paw

# use TARGET="swagger" if you only want the swagger bindings
make transfer TARGET="curl swagger raml postman"

Using the npm module

as a standard library

const Flow = require('api-flow').default; // if from npm
const Flow = require('./dist/node/api-flow.js').default; // if from `make runners`

const options = {
    parser: {
        name: 'raml'
    },
    serializer: {
        name: 'swagger'
    }
}

const converter = new Flow()
const promise = converter.transform('my_super_raml.yml', options)

promise.then((data) => {
    // do some cool stuff with the data
})

Using as a CLI

node ./bin/api-flow.js some_swagger.json -f swagger -t raml > converted.yml

User Interface

API-Flow is one of the main components of Console.REST. If you're an API user, you can easily use https://console.rest/ to convert API description files. If you're an API provider, you can add a button to your API docs to let your users open and play with your API in client apps including Paw or Postman.

Contributing

PRs are welcomed! Our sole requirement is that organizations that want to extend API-Flow to support their format write both a parser and a serializer, and not simply a serializer.

License

This repository is released under the MIT License. Feel free to fork, and modify! Copyright © 2016 Paw Inc.

Contributors

See Contributors.