How to use the apigeetool.getPromiseSDK function in apigeetool

To help you get started, we’ve selected a few apigeetool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apigee / api-platform-samples / edge-ux / fault-handling-apikey / edge.js View on Github external
function deleteCaches(c,cb){
    var sdk = apigeetool.getPromiseSDK()
    var opts = baseopts()
    console.log('deleting cache ' + c.name)
    opts.cache = c.name
    console.log(opts)
    cb(null,sdk.deletecache(opts))    
}
github apigee / api-platform-samples / edge-ux / fault-handling-apikey / edge.js View on Github external
function deleteApis(it,cb){
    var sdk = apigeetool.getPromiseSDK()
        var opts = baseopts()
        opts.directory = it.dir
        opts.api = it.proxy
        console.log('undeploying ' + opts.api)
        sdk.undeploy(opts)
        .then(function(){
            console.log('undeployed ' + opts.api)
            return sdk.delete(opts)
        },function(err){
            console.log(err)
            return sdk.delete(opts)
        })
        .then(function(){
            console.log('deleted ' + opts.api)
            cb(null, 'done')
        },function(err){
github apigee / api-platform-samples / default-proxies / helloworld / gulpfile.js View on Github external
gulp.task('clean',function(){
	opts.api = PROXY_NAME
    opts.proxies = PROXY_NAME
    opts.environments = 'test'
    
    var sdk = apigeetool.getPromiseSDK()
    return sdk.undeploy(opts)
              .then(function(){ return sdk.delete(opts)})
                console.log(app)

})
github apigee / api-platform-samples / edge-ux / extract-json-payload / gulpfile.js View on Github external
gulp.task('deploy',function(){
	opts.api = proxy_name
	return apigeetool.getPromiseSDK()
		.deployProxy(opts)
})
github apigee / api-platform-samples / edge-ux / fault-handling-apikey / edge.js View on Github external
function createApp(app){
    var defer = q.defer()
    var sdk = apigeetool.getPromiseSDK()
    var opts=baseopts()
    opts.name = app.name
    opts.apiProducts = app.apiProducts
    opts.email = app.email
    opts.callback = app.callback
    
    sdk.createApp(opts)
    .then(function(appresponse){
        defer.resolve(appresponse)
    },function(err){
        defer.reject(err)
    })
    return defer.promise
}
github apigee / api-platform-samples / edge-ux / proxy-to-target / gulpfile.js View on Github external
gulp.task('deploy',function(){
	opts.api = proxy_name
	return apigeetool.getPromiseSDK()
		.deployProxy(opts)
})
github apigee / api-platform-samples / edge-ux / fault-handling-apikey / edge.js View on Github external
function createApps(app,cb){
    var sdk = apigeetool.getPromiseSDK()
    var opts=baseopts()
    opts.name = app.name
    opts.apiProducts = app.apiProducts
    opts.email = app.email
    opts.callback = app.callback
    cb(null,sdk.createApp(opts))
}
github apigee / openbank / src / common / deploy / launchpad / adapters / subresources / app.js View on Github external
var apigeetool 			= require('apigeetool')
var lib				= require('../../lib')
var async           		= require('async')
var lodash         		= require('lodash')

var sdk 			= apigeetool.getPromiseSDK()

var adapter = function () {
	this.clean 			= clean
	this.build 			= build
	this.deploy 			= deploy
}

function build(context, resourceName, subResourceName, params, cb) {
	lib.print('meta','building app resources')
	cb()
}

function deploy(context, resourceName, subResourceName, params, cb) {
	lib.print('meta','deploying app resources')

	var config          = context.getConfig(resourceName, subResourceName)
github apigee / openbank / lib / edge.js View on Github external
function createApp(app){
    var defer = q.defer()
    var sdk = apigeetool.getPromiseSDK()
    var opts=baseopts()
    opts.name = app.name
    opts.apiProducts = app.apiProducts
    opts.email = app.email
    opts.callback = app.callback
    
    sdk.createApp(opts)
    .then(function(appresponse){
        defer.resolve(appresponse)
    },function(err){
        defer.reject(err)
    })
    return defer.promise
}
github apigee / openbank / lib / edge.js View on Github external
function createProducts (prod,cb) {
    var sdk = apigeetool.getPromiseSDK()
   var opts = baseopts()
    prod.productName = prod.name,
        opts.productDesc = prod.displayName
        var proxies = ''
        for(var p in prod.proxies) proxies += prod.proxies[p] +','
        opts.proxies = proxies
        var env = ''
        for(var e in prod.environments) env += prod.environments[e] + ','
        opts.environments = env
        var scopes = ''
        for(var s in prod.scopes) scopes += prod.scopes[s] + ','
        opts.scopes =s 
        opts.productName = prod.name        
        cb(null,sdk.createProduct(opts))
}