npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-awssum

v1.3.1

Published

NodeJS module to aid talking to Web Service APIs. Requires plugins.

Downloads

1

Readme

NOTE: AwsSum is now deprecated. Please use aws-sdk instead.

 _______           _______  _______           _______ 
(  ___  )|\     /|(  ____ \(  ____ \|\     /|(       )
| (   ) || )   ( || (    \/| (    \/| )   ( || () () |
| (___) || | _ | || (_____ | (_____ | |   | || || || |
|  ___  || |( )| |(_____  )(_____  )| |   | || |(_)| |
| (   ) || || || |      ) |      ) || |   | || |   | |
| )   ( || () () |/\____) |/\____) || (___) || )   ( |
|/     \|(_______)\_______)\_______)(_______)|/     \|

NodeJS module to aid talking to Web Service APIs.

IRC : Come and say hello in #awssum on Freenode. :)

Usage

To use an AwsSum plugin, you need to install the plugin you need for the relevant service. Please follow the documentation for that plugin.

Getting Started

Here's an example program to list all your buckets in S3:

Example: s3-list-buckets.js:

var amazonS3 = require('awssum-amazon-s3');

var s3 = new amazonS3.S3({
    'accessKeyId'     : process.env.AWS_ACCESS_KEY_ID,
    'secretAccessKey' : process.env.AWS_SECRET_ACCESS_KEY,
    'region'          : amazonS3.US_EAST_1,
});

s3.ListBuckets(function(err, data) {
    if (err) throw new Error(err);

    var buckets = data.Body.ListAllMyBucketsResult.Buckets.Bucket;
    buckets.forEach(function(bucket) {
        console.log('%s : %s', bucket.CreationDate, bucket.Name);
    });
});

To run this program:

$ npm install awssum-amazon-s3
$ export AWS_ACCESS_KEY_ID=...
$ export AWS_SECRET_ACCESS_KEY=...
$ node s3-list-buckets.js
2008-01-06T10:04:16.000Z : my-bucket-1
2008-03-09T08:27:30.000Z : another-bucket
2008-03-09T09:02:53.000Z : photos
2008-06-14T23:43:10.000Z : storage-area

There are intro programs, examples and full docs in each plugin's repository, so please read them for specific instructions for each plugin.

Plugins

Please see each plugin for more instructions.

Coming soon:

package.json

Since each plugin peerDepends on the service plugin and ultimately awssum itself, you don't need to specify these in your package.json.

Dont do this:

    "dependencies" : {
       "awssum"           : "1.0.x",
       "awssum-amazon"    : "1.0.x",
       "awssum-amazon-s3" : "1.0.x"
    },

You should do this instead (it will pull both awssum-amazon and awssum in too):

    "dependencies" : {
       "awssum-amazon-s3" : "1.0.x"
    },

Writing a Plugin

The first thing to realise when writing a plugin is that each service is provided by a provider. In the case of Amazon S3, Amazon is the provider and S3 is the service. For Twitter, since they only provide one service, then the provider would be named 'twitter' and you'd probably use the same name for the service.

In general then, you'd write two plugins with the following names:

  • awssum-<provider> - e.g. awssum-amazon, awssum-twitter
  • awssum-<provider>-<service> - e.g. awssum-amazon-s3, awssum-twitter-twitter

For other examples, you might write awssum-openstack, awssum-openstack-nova and awssum-openstack-keystone.

Once the provider plugin exists, new services for that provider just need the awssum-<provider>-<service> to be written. e.g. awssum-openstack-swift.

peerDependencies

Please also note to use peerDependencies in your package.json and depend on the correct version of AwsSum. Your awssum-<provider> package should peer depend on AwsSum and your awssum-<provider>-<service> package should peer depend on your awssum-<provider> package. I hope this makes sense. :)

Author

Written by Andrew Chilton - Blog - Twitter.

License

(Ends)