Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

cozy/cozy-clients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Collection of clients to access to Cozy APIs.

Install

Add the lib to you dependencies

npm install cozy-clients --save

Cozy Controller Client

Commands available in the controller client:

ControllerClient = require("cozy-clients").ControllerClient

# Token to access to controller located in /etc/cozy/controller.token
client = new ControllerClient
    token: token

# Get infos about given app.
client.get 'calendar', (err, res, appInfos) ->
    console.log appInfos


# Return list of running applications.
client.running 'calendar', (err, res, apps) ->
    console.log apps

# Start (and install it not installed) given application.
# It returns application information (running port, pid, etc.)
client.start 'calendar', (err, res, appInfos) ->
    console.log appInfos

# Stop given application.
# It returns application information (running port, pid, etc.)
client.stop 'calendar', (err, res, appInfos) ->
    console.log appInfos

# Stop then start application.
# It returns application information (running port, pid, etc.)
client.restart 'calendar', (err, res, appInfos) ->
    console.log appInfos

# Update given application (git pull + npm install).
# It returns application information (running port, pid, etc.)
client.lightUpdate 'calendar', (err, res, appInfos) ->
    console.log appInfos

# Remove given application
client.clean 'calendar', (err, res, result) ->
    console.log result

# Remove all applications
client.cleanAll (err, res, result) ->
    console.log result

What is Cozy?

Cozy Logo

Cozy is a platform that brings all your web services in the same private space. With it, your web apps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one profiles you. You install only the applications you want. You can build your own one too.

Community

You can reach the Cozy community via various support:

About

Helper Clients to access easily to Cozy APIs

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •