@apib/2me
API Blueprint Fetcher and Publisher
Last updated 2 years ago by jchrisco .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @apib/2me 
SYNC missed versions from official npm registry.

API Blueprint to Me

Processes API Blueprints both locally and remotely. Useful for pre-processing blueprints which have includes in them and then publishing them to Apiary for example.

Quickstart

  1. Install the package globally

    npm i -g @apib/2me
    
  2. Obtain a collection of API blueprint files which has includes and references other blueprint files. These includes may be specified using the following syntax:

    <!-- include(other/file.apib) -->
    

    Yes, you read correctly, it's just a comment with the word "include" inside!

  3. Run the command to render a full api blueprint

    apib2me file -i index.md -o full-blueprint.apib
    

Command Line Options

apib2me <source:destination> [options]
  • <source:destination>

    • Possible values:

      Name Description Parameters
      file Describes a local file source Input: -i <file-name>, Output: -o <file-name>
      apiary Remote Apiary.io source API Name: -a <api-name>, Access Token: -k <token>
    • The source is where the API Blueprint is obtained from.

    • The destination is where the processed blueprint is saved.

  • -i <input>, --input <input>

    Specify a file to obtain the input blueprint from.

  • -o <output>, --output <output>

    Default stdout

    Specify a file for where the processed output will be saved.

  • -a <api-name>, --apiName <api-name>

    Specify the Apiary api name for your project.

    Also known as the API Domain, e.x. api-name.docs.apiary.io

  • -k <apiary-token>, --apiaryToken <apiary-token>

    Specify the Apiary token which has access to read and write to your API.

    Can be obtained from your API settings within Apiary.

Example Commands

Processing a blueprint locally and saving to a new file

Without specifying both an input and destination, the source will be interpreted as both being the same source.

apib2me file -i input-blueprint.md -o output.md

Saving a blueprint from Apiary

apib2me apiary:file -a apiname -k apiarytoken -o output-file.apib

Publishing a blueprint to Apiary

apib2me file:apiary -a apiname -k apiarytoken -i api-blueprint.apib

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

3 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 3
Last Month 8
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |