<commit_before># WaffleAPI

[![Build Status][travis_img]][travis_url]
[![Gem Version][fury_img]][fury_url]
[![Code Climate][code_climate_img]][code_climate_url]
[![Coverage Status][coveralls_img]][coveralls_url]

_Waffle pool API gem_

## Installation

### Ruby 2+

```ruby
gem install waffle_api
```

## Usage

```ruby
require 'waffle_pool'
client = WaffleAPI::Client.new address: '1Ju8U9Ukfc5kiMqzQrRgQBP1JvRkeSv94V'
```


### Get current total hashrate
```ruby
client.hashrate
```


### Get workers infos

```ruby
client.worker_hashrates
```

Will return a JSON array

```json
[
  {
    "username": "<KEY>",
    "hashrate": 2529705,
    "stalerate": 3.33,
    "last_seen": 1398022030,
    "str": "2.53 MH/s"
  },
  {
    "username": "<KEY>",
    "hashrate": 1773702,
    "stalerate": 1.61,
    "last_seen": 1398022030,
    "str": "1.77 MH/s"
  }
]
```


### Get balances

```ruby
client.balances
```

Will return a JSON array

```json
{
  "sent": 1.61039009,
  "confirmed": 0.00383488,
  "unconverted": 0.011964213459441
}
```


### Get payments

```ruby
client.recent_payments
```

Will return a JSON array containing the last 10 payments

```json
[
  {
    "amount": "0.01715311",
    "time": "2014-04-20 16:03:24",
    "txn": "8706e0a..."
  },
  {
    "amount": "0.01600557",
    "time": "2014-04-20 04:36:01",
    "txn": "258dda8..."
  },
  {
    "..."
  }
]
```


## Contributing

[Contributors](https://github.com/Calyhre/waffle_api/graphs/contributors) and [CONTRIBUTING](https://github.com/Calyhre/waffle_api/blob/master/CONTRIBUTING.md)

## Licence

Released under the MIT License. See the [LICENSE](https://github.com/Calyhre/waffle_api/blob/master/LICENSE.md) file for further details.

[travis_img]: https://travis-ci.org/Calyhre/waffle_api.png?branch=master
[travis_url]: https://travis-ci.org/Calyhre/waffle_api
[fury_img]: https://badge.fury.io/rb/waffle_api.png<commit_msg>Change travis image<commit_after># WaffleAPI

[![Build Status][travis_img]][travis_url]
[![Gem Version][fury_img]][fury_url]
[![Code Climate][code_climate_img]][code_climate_url]
[![Coverage Status][coveralls_img]][coveralls_url]

_Waffle pool API gem_

## Installation

### Ruby 2+

```ruby
gem install waffle_api
```

## Usage

```ruby
require 'waffle_pool'
client = WaffleAPI::Client.new address: '1Ju8U9Ukfc5kiMqzQrRgQBP1JvRkeSv94V'
```


### Get current total hashrate
```ruby
client.hashrate
```


### Get workers infos

```ruby
client.worker_hashrates
```

Will return a JSON array

```json
[
  {
    "username": "<KEY>",
    "hashrate": 2529705,
    "stalerate": 3.33,
    "last_seen": 1398022030,
    "str": "2.53 MH/s"
  },
  {
    "username": "<KEY>",
    "hashrate": 1773702,
    "stalerate": 1.61,
    "last_seen": 1398022030,
    "str": "1.77 MH/s"
  }
]
```


### Get balances

```ruby
client.balances
```

Will return a JSON array

```json
{
  "sent": 1.61039009,
  "confirmed": 0.00383488,
  "unconverted": 0.011964213459441
}
```


### Get payments

```ruby
client.recent_payments
```

Will return a JSON array containing the last 10 payments

```json
[
  {
    "amount": "0.01715311",
    "time": "2014-04-20 16:03:24",
    "txn": "8706e0a..."
  },
  {
    "amount": "0.01600557",
    "time": "2014-04-20 04:36:01",
    "txn": "258dda8..."
  },
  {
    "..."
  }
]
```


## Contributing

[Contributors](https://github.com/Calyhre/waffle_api/graphs/contributors) and [CONTRIBUTING](https://github.com/Calyhre/waffle_api/blob/master/CONTRIBUTING.md)

## Licence

Released under the MIT License. See the [LICENSE](https://github.com/Calyhre/waffle_api/blob/master/LICENSE.md) file for further details.

[travis_img]: https://travis-ci.org/Calyhre/waffle_api.svg?branch=master
[travis_url]: https://travis-ci.org/Calyhre/waffle_api
[fury_img]: https://badge.fury.io/rb/waffle_api.png
{'fraction_non_alphanumeric': 0.18522427440633246, 'fraction_numerical': 0.07651715039577836, 'mean_word_length': 4.088590604026845, 'pattern_counts': {'":': 38, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 12, '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': '6753672', 'n_tokens_mistral': 1808, 'n_tokens_neox': 1563, 'n_words': 273}