mangoweb / apiary-publisher
CLI and PHP interface for publishing Apiary Blueprints
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mangoweb/apiary-publisher
Requires (Dev)
- symfony/console: ^3.0
This package is auto-updated.
Last update: 2025-09-29 02:05:54 UTC
README
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.