<commit_before># node-cloudservers

A client implementation for Rackspace CloudServers in node.js

## Installation

### Installing npm (node package manager)
<pre>
  curl http://npmjs.org/install.sh | sh
</pre>

### Installing http-agent
<pre>
  npm install cloudservers
</pre>

### [Getting Rackspace Account][4]

## Usage

[http://blog.nodejitsu.com/nodejs-cloud-server-in-three-minutes][3]

The node-cloudservers library is compliant with the [Rackspace CloudServers API][0]. Using node-cloudservers is easy for a variety of scenarios: authenticating, getting flavors and images, creating servers, and working with servers.

### Getting Started
Before we can do anything with cloudfiles, we have to create a client with valid credentials. Cloudservers will authenticate for you automatically: 
<pre>
  var cloudservers = require('cloudservers');
  var config = {
    auth : {
      username: 'your-username',
      apiKey: 'your-api-key'
    }
  };
  var client = cloudservers.createClient(config);
</pre>

### Getting Flavors and Images
There are several entities in the [Rackspace CloudServer][4] ecosystem: images, flavors, and servers. Both the getFlavors and getImages methods take an optional first parameter which when set to true will return more details for the objects returned. Here's how to get the list of all available flavors and images associated with your Rackspace account:
<pre>
  client.getFlavors(function (err, flavors) {<commit_msg>Fixed library name in README.md<commit_after># node-cloudservers

A client implementation for Rackspace CloudServers in node.js

## Installation

### Installing npm (node package manager)
<pre>
  curl http://npmjs.org/install.sh | sh
</pre>

### Installing cloudservers
<pre>
  npm install cloudservers
</pre>

### [Getting Rackspace Account][4]

## Usage

[http://blog.nodejitsu.com/nodejs-cloud-server-in-three-minutes][3]

The node-cloudservers library is compliant with the [Rackspace CloudServers API][0]. Using node-cloudservers is easy for a variety of scenarios: authenticating, getting flavors and images, creating servers, and working with servers.

### Getting Started
Before we can do anything with cloudfiles, we have to create a client with valid credentials. Cloudservers will authenticate for you automatically: 
<pre>
  var cloudservers = require('cloudservers');
  var config = {
    auth : {
      username: 'your-username',
      apiKey: 'your-api-key'
    }
  };
  var client = cloudservers.createClient(config);
</pre>

### Getting Flavors and Images
There are several entities in the [Rackspace CloudServer][4] ecosystem: images, flavors, and servers. Both the getFlavors and getImages methods take an optional first parameter which when set to true will return more details for the objects returned. Here's how to get the list of all available flavors and images associated with your Rackspace account:
<pre>
  client.getFlavors(function (err, flavors) {
{'fraction_non_alphanumeric': 0.08923705722070845, 'fraction_numerical': 0.0027247956403269754, 'mean_word_length': 4.637236084452975, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5227312', 'n_tokens_mistral': 827, 'n_tokens_neox': 823, 'n_words': 332}