angular-directus
Advanced tools
Comparing version 0.0.3 to 0.1.0
{ | ||
"name": "angular-directus", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "Angular wrapper for getdirectus.com Javascript SDK", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,2 +0,2 @@ | ||
var Directus = require('directus-sdk-javascript'); | ||
var Directus = require('directus-sdk-javascript/remote'); | ||
var ngDirectusModule = require('./module.js'); | ||
@@ -15,3 +15,12 @@ | ||
this.init = function init(url,key,version){ | ||
this.directus = new Directus(key,url,version); | ||
var options = { | ||
url: url | ||
}; | ||
if(key){ | ||
options.key = key; | ||
} | ||
if(version){ | ||
options.version = version; | ||
} | ||
this.directus = new Directus(options); | ||
} | ||
@@ -27,6 +36,5 @@ | ||
directusConfig.directus.getEntries(table, (err, res) => { | ||
if(err) throw err; | ||
console.log(res); | ||
}); | ||
self.getItems = function(table, options){ | ||
return directusConfig.directus.getItems(table, options); | ||
} | ||
} | ||
@@ -33,0 +41,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1675
48