Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

hoodie-admin-client

Client Admin API for the Hoodie server

Build Status Coverage Status Dependency Status devDependency Status

hoodie-admin-client is currently a simple wrapper around the Hoodie Account’s admin client.

We plan to add APIs to access users’ data and make the Hoodie Admin Client extendable as the Hoodie Client, but there was no need for yet.

Example

var HoodieAdmin = require('@hoodie/admin-client')
var admin = new HoodieAdmin()

if (!admin.isSignedIn()) {
  renderLogin()
} else {
  admin.accounts.findAll().then(renderAccounts)
}

admin.accounts.on('change', renderAccounts)

API

Same as AccountAdmin API. Only difference is that options.url defaults to location.origin and AccountAdmin gets initialised with options.url + '/hoodie/account/api'.

Testing

Local setup

git clone https://github.com/hoodiehq/hoodie-admin-client.git
cd hoodie-admin-client
npm install

Run all tests

npm test

Contributing

Have a look at the Hoodie project's contribution guidelines. If you want to hang out you can join our Hoodie Community Chat.

License

Apache 2.0

About

🐶 Client Admin API for the Hoodie server

Resources

License

Packages

No packages published