contentful-management
Advanced tools
Comparing version 0.2.0 to 0.3.0
# Changelog | ||
## v0.3.0 - 2015-10-16 | ||
- Add methods to get published entities | ||
## 0.2.0 | ||
- Exponential backoff when rate limited [3063f1](https://github.com/contentful/contentful-management.js/commit/3063f1840302cddb4c47bfc8c9229507e1363e8c) | ||
- Locale methods |
22
index.js
@@ -84,3 +84,3 @@ 'use strict'; | ||
options.query.access_token = this.options.accessToken; | ||
if (!backoff && this.options.retryOnTooManyRequests) { | ||
@@ -115,3 +115,3 @@ backoff = createBackoff(this.options.maxRetries) | ||
} | ||
return response.catch(function (error) { | ||
@@ -248,2 +248,8 @@ if (!('body' in error)) { | ||
getPublishedContentTypes: function(object) { | ||
var query = Query.parse(object); | ||
return this.client.request('/spaces/' + this.sys.id + '/public/content_types', {query: query}) | ||
.then(_.partial(SearchResult.parse, this.client)); | ||
}, | ||
updateContentType: function(contentType) { | ||
@@ -318,2 +324,8 @@ var spaceId = getId(this); | ||
getPublishedEntries: function(object) { | ||
var query = Query.parse(object); | ||
return this.client.request('/spaces/' + this.sys.id + '/public/entries', {query: query}) | ||
.then(_.partial(SearchResult.parse, this.client)); | ||
}, | ||
updateEntry: function(entry) { | ||
@@ -401,2 +413,8 @@ var spaceId = getId(this); | ||
getPublishedAssets: function(object) { | ||
var query = Query.parse(object); | ||
return this.client.request('/spaces/' + this.sys.id + '/public/assets', {query: query}) | ||
.then(_.partial(SearchResult.parse, this.client)); | ||
}, | ||
updateAsset: function(asset) { | ||
@@ -403,0 +421,0 @@ var spaceId = getId(this); |
{ | ||
"name": "contentful-management", | ||
"description": "Client for Contentful's Content Management API", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://www.contentful.com/developers/documentation/content-management-api/", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -169,3 +169,3 @@ # contentful-management.js | ||
#### Space#createContentType(contentTypeId, entry) -> ContentTypePromise | ||
#### Space#createContentType(data) -> ContentTypePromise | ||
@@ -239,2 +239,7 @@ Create a new content type by providing a name, fields, optional description, | ||
#### Space#getPublishedContentTypes() -> ContentTypeCollectionPromise | ||
Retrieve all published content types for the space. Returns a promise for a [collection][] | ||
of [ContentType][] objects. | ||
#### Space#createEntry(contentType, entry) -> EntryPromise | ||
@@ -311,4 +316,9 @@ | ||
#### Space#createAsset(contentTypeId, entry) -> AssetPromise | ||
#### Space#getPublishedEntries(query) -> EntryCollectionPromise | ||
Search & filter all of the published entries in a space. Works like getEntries. | ||
Returns a promise for a [collection][] of [Entry][] objects. | ||
#### Space#createAsset(data) -> AssetPromise | ||
Create a new asset by providing field values and and an optional ID. If you do | ||
@@ -389,2 +399,7 @@ not provide the `sys.id` property, an ID will be generated for you. | ||
#### Space#getPublishedAssets(query) -> AssetCollectionPromise | ||
Search & filter all of the assets in a space. Works like getAssets. | ||
Returns a promise for a [collection][] of [Asset][] objects. | ||
### ContentType properties | ||
@@ -391,0 +406,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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
442666
5882
640
7