<commit_before># Lumberg [![Lumberg Build Status][Build Icon]][Build Status]

![Lumberg logo](http://i.imgur.com/xC4Sw.jpg)

Ruby library for the WHM & cPanel API. It is currently what we consider to be
beta-ish. Please report any issues you find. :)

[RDoc](http://rdoc.info/github/site5/lumberg/master/frames)

Confirmed to work with ruby 1.9.3, 2.0.0, 2.1.3 and JRuby 1.9 mode on
cPanel 11.28+

[Build Status]: http://travis-ci.org/site5/lumberg
[Build Icon]: https://secure.travis-ci.org/site5/lumberg.png?branch=master


## Install

    gem install lumberg


## Usage

Create a server object and connect to WHM using your host and hash:

```ruby
require 'lumberg'
server = Lumberg::Whm::Server.new(
  host: WHM_HOST,
  hash: WHM_HASH
)
```

If you are using HTTP Basic Authentication with a username/password:

```ruby
server = Lumberg::Whm::Server.new(
  host: WHM_HOST,
  user: USERNAME,
  hash: '<PASSWORD>'
)
```

You can access the modules of WHM by calling `server.<module>`. For example,
`server.account` or `server.dns`. Here are the currently supported modules:

* Account
* DNS
* Reseller

Here's how to get a list of accounts:<commit_msg>Added missing parameter to example.<commit_after># Lumberg [![Lumberg Build Status][Build Icon]][Build Status]

![Lumberg logo](http://i.imgur.com/xC4Sw.jpg)

Ruby library for the WHM & cPanel API. It is currently what we consider to be
beta-ish. Please report any issues you find. :)

[RDoc](http://rdoc.info/github/site5/lumberg/master/frames)

Confirmed to work with ruby 1.9.3, 2.0.0, 2.1.3 and JRuby 1.9 mode on
cPanel 11.28+

[Build Status]: http://travis-ci.org/site5/lumberg
[Build Icon]: https://secure.travis-ci.org/site5/lumberg.png?branch=master


## Install

    gem install lumberg


## Usage

Create a server object and connect to WHM using your host and hash:

```ruby
require 'lumberg'
server = Lumberg::Whm::Server.new(
  host: WHM_HOST,
  hash: WHM_HASH
)
```

If you are using HTTP Basic Authentication with a username/password:

```ruby
server = Lumberg::Whm::Server.new(
  host:       WHM_HOST,
  user:       USERNAME,
  hash:       '<PASSWORD>',
  basic_auth: true
)
```

You can access the modules of WHM by calling `server.<module>`. For example,
`server.account` or `server.dns`. Here are the currently supported modules:

* Account
* DNS
* Reseller

Here's how to get a list of accounts:
{'fraction_non_alphanumeric': 0.12711148648648649, 'fraction_numerical': 0.016047297297297296, 'mean_word_length': 4.0190677966101696, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '2665994', 'n_tokens_mistral': 871, 'n_tokens_neox': 824, 'n_words': 267}