Skip to content

Commit

Permalink
Merge pull request #198 from aenario/v0.3.13
Browse files Browse the repository at this point in the history
Release 0.3.13 🚀
  • Loading branch information
nono authored Aug 23, 2017
2 parents cfd0044 + ea00749 commit cc60ccd
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Removed
- none yet

## [v0.3.13] - 2017-08-22
### Changed
- Add second optional parameter (`options`) to `files.destroyById` function, matching other functions from same package.


## [v0.3.12] - 2017-08-08
### Changed
Expand Down Expand Up @@ -207,7 +211,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Refactoring on offline to return Promise


[Unreleased]: https://github.com/cozy/cozy-client-js/compare/v0.3.12...HEAD
[Unreleased]: https://github.com/cozy/cozy-client-js/compare/v0.3.13...HEAD
[v0.3.13]: https://github.com/cozy/cozy-client-js/compare/v0.3.12...v0.3.13
[v0.3.12]: https://github.com/cozy/cozy-client-js/compare/v0.3.11...v0.3.12
[v0.3.11]: https://github.com/cozy/cozy-client-js/compare/v0.3.10...v0.3.11
[v0.3.10]: https://github.com/cozy/cozy-client-js/compare/v0.3.9...v0.3.10
Expand Down
11 changes: 9 additions & 2 deletions dist/cozy-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cozy-client.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/cozy-client.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cozy-client.min.js.map

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions dist/cozy-client.node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cozy-client.node.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions docs/files-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,18 @@ It returns a promise for the document of the file or directory moved to trash.
const trashed = await cozy.client.files.trashById("1234567")
```

### `cozy.client.files.destroyById(id)`
### `cozy.client.files.destroyById(id, options)`

`cozy.client.files.destroyById(id)` is used to shred (destroy definitively) a file or directory identified by the given id.
`cozy.client.files.destroyById(id, options)` is used to shred (destroy definitively) a file or directory identified by the given id.

The file must be in the trash folder first.

It returns a promise for completion

- `id` is a string specifying the identifier of the file or directory
- `options` is an object with the following fields:
* `ifMatch`: the previous revision of the file (optional). The update will be rejected if the remote revision doesn't match the given one.


```javascript
const trashed = await cozy.client.files.trashById("1234567")
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cozy-client-js",
"version": "0.3.12",
"version": "0.3.13",
"description": "Javascript library to interact with a cozy",
"main": "dist/cozy-client.node.js",
"browser": "dist/cozy-client.js",
Expand All @@ -21,7 +21,6 @@
"test:v3": "NODE_ENV=test NODE_TARGET=node COZY_STACK_VERSION=3 COZY_STACK_URL=http://localhost:8080 mocha-webpack 'test/integration/**.js'",
"clean": "rm -r dist .tmp",
"shasum": "shasum -a 256 dist/cozy-client.min.js && shasum -a 256 dist/cozy-client.min.js.map"

},
"repository": {
"type": "git",
Expand Down

0 comments on commit cc60ccd

Please sign in to comment.