<commit_before>teamspeak-ruby
----------
[![Build Status](https://travis-ci.org/pyrohail/teamspeak-ruby.png?branch=master)]
(https://travis-ci.org/pyrohail/teamspeak-ruby)
[![Gem Version](https://badge.fury.io/rb/teamspeak-ruby.png)]
(http://badge.fury.io/rb/teamspeak-ruby)

Ruby interface for TeamSpeak 3's [server query]
(http://media.teamspeak.com/ts3_literature/TeamSpeak%203%20Server%20Query%20Manual.pdf) api.

Install
----------
```shell
gem install teamspeak-ruby
```

Usage
----------
```ruby
require 'teamspeak-ruby'

ts = Teamspeak.new('127.0.0.1')
ts.login('serveradmin', 'T5I3A1G8')
ts.command('use', {'sid' => 1})

ts.command('clientlist').each do |user|
  if user['client_nickname'] == 'Example Client'
    ts.command('clientpoke', {'clid' => user['clid'], 'msg' => 'Just an example!'})
  end
end

ts.disconnect
```

TODO
----------
- Proper error handling.
- ~~Automatic testing~~
- Documentation<commit_msg>New code example for "README.md"<commit_after>teamspeak-ruby
----------
[![Build Status](https://travis-ci.org/pyrohail/teamspeak-ruby.png?branch=master)]
(https://travis-ci.org/pyrohail/teamspeak-ruby)
[![Gem Version](https://badge.fury.io/rb/teamspeak-ruby.png)]
(http://badge.fury.io/rb/teamspeak-ruby)

Ruby interface for TeamSpeak 3's [server query]
(http://media.teamspeak.com/ts3_literature/TeamSpeak%203%20Server%20Query%20Manual.pdf) api.

Install
----------
```shell
gem install teamspeak-ruby
```

Usage
----------
```ruby
require 'teamspeak-ruby'

ts = Teamspeak.new('127.0.0.1')
ts.login('serveradmin', '<PASSWORD>')
ts.command('use', {'sid' => 1})

ts.command('clientlist').each do |user|
  if user['client_nickname'] == 'Example Client'
    ts.command('clientpoke', {'clid' => user['clid'], 'msg' => 'Just an example!'})
  end
end

puts ts.command('hostinfo')['host_timestamp_utc']

ts.disconnect
```

TODO
----------
- Proper error handling.
- ~~Automatic testing~~
- Documentation
{'fraction_non_alphanumeric': 0.22580645161290322, 'fraction_numerical': 0.02081165452653486, 'mean_word_length': 4.225543478260869, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1611138', 'n_tokens_mistral': 784, 'n_tokens_neox': 721, 'n_words': 117}