contentful
Advanced tools
Comparing version 0.0.4 to 0.0.5
18
demo.js
'use strict'; | ||
var repl = require('./repl'); | ||
var repl = require('./repl')({ | ||
space: 'cfexampleapi', | ||
accessToken: 'b4c0n73n7fu1' | ||
}); | ||
@@ -12,11 +15,16 @@ var client = repl.client; | ||
$scope.space = enQ(client.space()); | ||
$scope.contentTypes = enQ(client.contentTypes()); | ||
$scope.$watch('contentType', function(contentType) { | ||
if (!contentType) return; | ||
$scope.$watch('[contentType, locale]', function(parts) { | ||
var contentType = parts[0]; | ||
var locale = parts[1]; | ||
if (!contentType || !locale) return; | ||
$scope.entries = enQ(client.entries({ | ||
order: 'sys.updatedAt', | ||
'sys.contentType.sys.id': contentType.sys.id | ||
'sys.contentType.sys.id': contentType.sys.id, | ||
locale: locale.code | ||
})); | ||
}); | ||
}, true); | ||
} | ||
@@ -23,0 +31,0 @@ |
@@ -25,2 +25,4 @@ 'use strict'; | ||
this.options.host, | ||
':', | ||
this.options.secure ? '443' : '80', | ||
'/spaces/', | ||
@@ -27,0 +29,0 @@ this.options.space, |
{ | ||
"name": "contentful", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Client for Contentful's Content Delivery API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
11651
292
8