Skip to content

mangoweb-backend/apiary-publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apiary Publisher

Downloads this Month Stable version

Apiary Publisher provides a simple CLI and PHP interface for publishing API Blueprints to Apiary.

Installation

Use composer:

$ composer require mangoweb/apiary-publisher

Usage example

Symfony Console

Register Mangoweb\ApiaryPublisher\Bridges\SymfonyConsole\ApiaryPublishCommand to your Symfony Console application.

$app = new Symfony\Component\Console\Application();
$app->add(new Mangoweb\ApiaryPublisher\Bridges\SymfonyConsole\ApiaryPublishCommand);
# bin/console apiary:publish --name <apiName> --token <apiToken>                    <blueprintPath>
$ bin/console apiary:publish --name pollsapi  --token 874887d6ecd0b106a47448c5beca1 blueprint.apib

CLI

# apiary-publish <apiName> <apiToken>                    <blueprintPath>
$ apiary-publish pollsapi  874887d6ecd0b106a47448c5beca1 blueprint.apib

PHP

$apiName = 'pollsapi';
$apiToken = '874887d6ecd0b106a47448c5beca1';
$code = file_get_contents(__DIR__ . '/blueprint.apib');

$publisher = new ApiaryPublisher($apiName, $apiToken);
$publisher->publish($code);

License

MIT. See full license.

About

CLI and PHP interface for publishing Apiary Blueprints

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages