Skip to content

Commit

Permalink
API -> OAI
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed Mar 7, 2017
1 parent 2d5282d commit 6620492
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ exports.api = function(args, opts) {
info.token = login.token;
} catch(e) {
console.log('You need to log in to do this!'.red);
console.log('Run ' + 'api login'.yellow);
console.log('Run ' + 'oai login'.yellow);
return process.exit();
}
}

if(actionObj.swagger) {
utils.findSwagger(function(err, swagger, file) {
if(err) {
Expand Down Expand Up @@ -109,7 +109,7 @@ exports.load = function(action) {
}

console.log('Action not found.'.red);
console.log('Type ' + 'api help'.yellow + ' to see all commands');
console.log('Type ' + 'oai help'.yellow + ' to see all commands');
process.exit();
};

Expand Down
10 changes: 5 additions & 5 deletions lib/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ var _ = require('lodash');
exports.swagger = false;
exports.login = false;
exports.category = "basic";
exports.desc = "Learn what you can do with api";
exports.desc = "Learn what you can do with oai";

exports.run = function(config, info) {
console.log("");
console.log("Usage: api <command> [swagger url]");
console.log("Usage: oai <command> [swagger url]");
var files = glob.sync(path.join(__dirname, "*"));

var categories = {
Expand All @@ -33,7 +33,7 @@ exports.run = function(config, info) {
var info = f.desc || "";

if(f.category) {
categories[f.category].commands.push(" $".grey + pad(" api " + action) + " " + info.grey);
categories[f.category].commands.push(" $".grey + pad(" oai " + action) + " " + info.grey);
}
});

Expand All @@ -44,10 +44,10 @@ exports.run = function(config, info) {
console.log(command);
});
});

console.log("");
console.log("Just getting started?".green);
console.log("Run " + "api init".yellow + " to create your Swagger file.");
console.log("Run " + "oai init".yellow + " to create your Swagger file.");
console.log("");

process.exit();
Expand Down
2 changes: 1 addition & 1 deletion lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports.run = function(config, info) {
console.log('');
console.log('For more information on this syntax, see https://github.com/readmeio/swagger-inline');
console.log('');
console.log('To see what you can do with your API, type ' + 'api help'.yellow + '.');
console.log('To see what you can do with your API, type ' + 'oai help'.yellow + '.');
console.log('');
console.log('');

Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports.findSwagger = function(cb, opts) {

if(!generatedSwagger['x-si-base']) {
console.log("We couldn't find a Swagger file.".red);
console.log("Run " + "api init".yellow + " to get started.");
console.log("Run " + "oai init".yellow + " to get started.");
process.exit();
}

Expand Down

0 comments on commit 6620492

Please sign in to comment.