# cloud-herder

> An NPM module that abstracts away the complexities of cloud storage services (Object Storage (AWS s3) as well as File Storage(Dropbox) to easily interface between multiple clouds with a unified interface. Also enables you to quickly perform data migration

Latest version **0.0.3** (published 2018-07-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cloud-herder
pnpm add cloud-herder
yarn add cloud-herder
bun add cloud-herder
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-07-12 |
| First published | 2018-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | “Alexander |
| Maintainers | papa_rugi |
| Keywords | multicloud |

## Links

- npm: https://www.npmjs.com/package/cloud-herder
- Repository: https://github.com/papa-rugi/cloud-herder
- Homepage: https://github.com/papa-rugi/cloud-herder#readme
- Issues: https://github.com/papa-rugi/cloud-herder/issues
- npm.io page: https://npm.io/package/cloud-herder

## Dependencies (3)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [pkgcloud](https://npm.io/package/pkgcloud.md) ^1.5.0
- [readable-stream](https://npm.io/package/readable-stream.md) ^2.3.6

## Recent versions

- 0.0.3 (latest) — 2018-07-12
- 0.0.2 — 2018-07-10
- 0.0.1 — 2018-07-10
- 0.1.0 — 2018-07-05

## README

cloud-herder :ox: :dromedary_camel: :cow2: :water_buffalo: :ram: 
=========

(*STILL IN DEVELOPMENT*)

An NPM module that abstracts away the complexities of cloud storage services
(Object Storage (AWS s3) as well as File Storage(Dropbox)) to easily interact with multiple clouds through one api
using a simple promise based, POISIX interface. 

Amaze your friends and family as you perform operations on multiple cloud clients at once (in parallel)
without having to dig up documentation , build custom wrappers, or spend time thinking about blobs and keys. 

(If by chance there are any stream experts out there, message me. Would love some insight!)

Currently supported clouds:

*s3: in-progress*

| Raskspace: planned |
| Azure: planned |
| Openstack: planned |
| Dropbox: planned |
| Onedrive: planned |
| gDrive: planned |


## Installation

  `npm install cloud-herder`


## Usage
    
    //Example using Amazon s3 Api 
    
    const CloudHerder = require('cloud-herder');

    const source = CloudHerder.cloudFactory.issue('s3', credentials);

    
    // List items from root context
    source.ls('/')
        .then( files => {
            files.forEach(function (files) {
                console.log(files.toJSON());
            });
        })
        .catch( err => {
            console.log(err);
        });
    
    // Fetch items from a root folder or container context
    source.ls('/testingdirs/')
        .then( files => {
            files.forEach(function (file) {
                console.log(file.toJSON().name);
            });
        })
        .catch( err => {
            console.log(err);
        });
    
    //Fetch items from a sub directory
    source.ls('/testingdirs/Directory/')
        .then( files => {
             files.forEach(function (file) {
                 console.log(file.toJSON().name);
             });
        })
        .catch( err => {
            console.log(err);
        });
    
    //Fetch item from path
    source.readFile('/testingdirs/Directory/2l0kmekrp1dy.jpg')
        .then( file => {
            console.log('File name: ' + file.name + '\n' + 'Last modified: ' + file.lastModified);
        });
        
    //Make a directory or container in root context
    source.mkdir('/showcasethisapiwhydontyou/')
        .then( data => {
            console.log(data);
        })
        .catch( err => {
            console.log(err);
        });
    
    //Create a sub-directory tree from a supplied path context
    source.mkdir('/showcasethisapiwhydontyou/showcase/this/api/making/things/')
        .then(data =>{
            console.log(data);
        })
        .catch(err =>{
            console.log(err);
        });



## Tests

  `npm test`

## Contributing

Roadmap still being worked out. Hop onto this discord server if you want to reach me: https://discord.gg/PPpWSdb

---
_Source: https://npm.io/package/cloud-herder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
