Initial commit

parents
Pipeline #2963 canceled with stages
.idea
node_modules
\ No newline at end of file
This library contains a JavaScript client for the [Passwords app for Nextcloud](https://apps.nextcloud.com/apps/passwords)
Cou can find the API documentation [here](https://git.mdns.eu/nextcloud/passwords/wikis/developers/index)
### Using the client
You can use the enhanced version of the client in your project like this:
```javascript
import EnhancedApi from 'passwords-client';
let api = new EnhancedApi();
api.initialize({baseUrl:'https://cloud.example.com', user:'user', password:'password'});
```
#### Using the simple api
There is a "slim" version of the api.
This version will just communicate with the api but does no processing or encryption of the objects.
```javascript
import EventEmitter from 'eventemitter3';
import {SimpleApi} from 'passwords-client';
let events = new EventEmitter(),
api = new SimpleApi();
api.initialize({apiUrl:'https://cloud.example.com/index.php/apps/passwords/', user:'user', password:'password', events});
```
### Development
You cah use a development version in your project with the following commands
```bash
# Go into library folder
cd passwords-client
sudo npm link
# Go into project folder
cd ../project
npm link passwords-client
```
\ No newline at end of file
{
"name": "passwords-client",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"eventemitter3": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz",
"integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q=="
},
"libsodium": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.4.tgz",
"integrity": "sha512-fTU3vUdrxQzhPAAjmTSqKk4LzYbR0OtcYjp1P92AlH50JIxXZFEIXWh1yryCmU6RLGfwS2IzBdZjbmpYf/TlyQ=="
},
"libsodium-wrappers": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.4.tgz",
"integrity": "sha512-axKkW01L0q+urLeE7UMSZKWwk4LrRbi6s5pjKBAvbgDBYnsSaolK1oN/Syilm1dqJFkJQNi6qodwOp8dzSoc9Q==",
"requires": {
"libsodium": "0.7.4"
}
}
}
}
{
"name": "passwords-client",
"version": "0.0.1",
"description": "JS client library for the Nextcloud Passwords app",
"main": "src/main.js",
"author": "Marius Wieschollek",
"license": "ISC",
"keywords": [
"crypto",
"passwords",
"api",
"nextcloud"
],
"dependencies": {
"eventemitter3": "^3.1.2",
"libsodium-wrappers": "^0.7.4"
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import SimpleApi from './Classes/SimpleApi';
import Encryption from './Classes/Encryption';
import EnhancedApi from './Classes/EnhancedApi';
export default EnhancedApi;
export {EnhancedApi, SimpleApi, Encryption};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment