devshare

Client library to simplify communication with the devShare service

Features

  • File system interaction
  • Projects management
  • Users management
  • Cloud interface

Getting Started

devShare is universal, so it can be used client-side or server-side.

NPM

  1. Install: npm install --save devshare

  2. Include and use devshare:

    import Devshare from 'devshare';
    Devshare.login(auth).then(user => console.log('Successful login', user))
    

Browser

  1. Add script tag to index.html:

     <script src="http://cdn.kyper.io/js/devshare/latest/devshare.js"></script>
    
  2. Start using the library:

    const username = 'scott'
    const password = 'testpassword'
    // Login in order to make Authenticated requests
    Devshare.login(username, password)
     .then(user => console.log('Successful login', user))
    
    // Get a specific user
    Devshare.user(username)
     .get()
     .then(user => console.log('user loaded:', user))
    
    const projectName = 'example'
    // Get a specific project
    Devshare.project(username, projectName).get().then(res => console.log('project:', res))
    

results matching ""

    No results matching ""