<commit_before>IdigbioClient
=============

[![Gem Version][gem_badge]][gem_link]
[![Continuous Integration Status][ci_badge]][ci_link]
[![Coverage Status][cov_badge]][cov_link]
[![CodeClimate][code_badge]][code_link]
[![Dependency Status][dep_badge]][dep_link]


`idigbio_client` is a Ruby wrapper for [iDigBio API][api]


Installation
------------

Add this line to your application's Gemfile:

```ruby
gem 'idigbio_client'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install idigbio_client

Usage
-----

### Search

#### Search Parameters

parameter keys can be symbols or strings

| Parameter | Description                                        |
|-----------|----------------------------------------------------|
| method    | `"post"` or `"get"`, default `"post"`              |
| path      | search path, default `"search/records/"`           |
| params    | search options hash, default `{}`                  |

##### Params parameters

| Parameter | Description                                        |
|-----------|----------------------------------------------------|
| rq        | search query hash, default `{}`                    |
| limit     | how many records to return in total, default `100` |
| offset    | from which record to start, default `0`            |

```ruby
require "idigbio_client"

params = { rq: { genus: "acer" }, limit: 15 }
IdigbioClient.search(params: params)

# using get method
IdigbioClient.search(params: params, method: :get)

# using other path
IdigbioClient.search(params: params, method: :get, path: "search/")
```

Development
-----------

After checking out the repo, run `bin/setup` to install dependencies. Then, run
`bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To
release a new version, update the version number in `version.rb`, and then run
`bundle exec rake release` to create a git tag for the version, push git
commits and tags, and push the `.gem` file to
[rubygems.org][rubygems].

## Contributing

1. Fork it ( https://github.com/[my-github-username]/idigbio_client/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Copyright
---------

Authors -- [<NAME>][greg], [<NAME>][dimus]

Copyright (c) 2015 [<NAME>][greg], [<NAME>][dimus]
See [LICENSE][license] for details.


[gem_badge]: https://badge.fury.io/rb/idigbio_client.svg
[gem_link]: http://badge.fury.io/rb/idigbio_client
[ci_badge]: https://secure.travis-ci.org/GlobalNamesArchitecture/idigbio_client.svg
[ci_link]: http://travis-ci.org/GlobalNamesArchitecture/idigbio_client
[cov_badge]: https://coveralls.io/repos/GlobalNamesArchitecture/idigbio_client/badge.svg?branch=master
[cov_link]: https://coveralls.io/r/GlobalNamesArchitecture/idigbio_client?branch=master
[code_badge]: https://codeclimate.com/github/GlobalNamesArchitecture/idigbio_client/badges/gpa.svg
[code_link]: https://codeclimate.com/github/GlobalNamesArchitecture/idigbio_client
[dep_badge]: https://gemnasium.com/GlobalNamesArchitecture/idigbio_client.png
[dep_link]: https://gemnasium.com/GlobalNamesArchitecture/idigbio_client
[api]: https://www.idigbio.org/wiki/index.php/IDigBio_API
[rubygems]: https://rubygems.org
[license]: https://github.com/GlobalNamesArchitecture/idigbio-ruby-client/blob/master/LICENSE
[greg]: https://github.com/gete76
[dimus]: https://github.com/dimus<commit_msg>:memo: readme<commit_after>IdigbioClient
=============

[![Gem Version][gem_badge]][gem_link]
[![Continuous Integration Status][ci_badge]][ci_link]
[![Coverage Status][cov_badge]][cov_link]
[![CodeClimate][code_badge]][code_link]
[![Dependency Status][dep_badge]][dep_link]


`idigbio_client` is a Ruby wrapper for [iDigBio API][api]


Installation
------------

Add this line to your application's Gemfile:

```ruby
gem 'idigbio_client'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install idigbio_client

Usage
-----

API functions can be grouped in 4 catetories

* [inspect][inspect] - introspective methods
* [search][search] - search by provided parameters
* [show][show] - show any one object based on its UUID
* [stats][stats] - various statistical data

### Inspect

### Search

#### Search Parameters

parameter keys can be symbols or strings

| Parameter | Description                                        |
|-----------|----------------------------------------------------|
| method    | `"post"` or `"get"`, default `"post"`              |
| path      | search path, default `"search/records/"`           |
| params    | search options hash, default `{}`                  |

##### Params parameters

| Parameter | Description                                        |
|-----------|----------------------------------------------------|
| rq        | search query hash, default `{}`                    |
| limit     | how many records to return in total, default `100` |
| offset    | from which record to start, default `0`            |

```ruby
require "idigbio_client"

params = { rq: { genus: "acer" }, limit: 15 }
IdigbioClient.search(params: params)

# using get method
IdigbioClient.search(params: params, method: :get)

# using other path
IdigbioClient.search(params: params, method: :get, path: "search/")
```
### Show

### Stats

Development
-----------

After checking out the repo, run `bin/setup` to install dependencies. Then, run
`bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To
release a new version, update the version number in `version.rb`, and then run
`bundle exec rake release` to create a git tag for the version, push git
commits and tags, and push the `.gem` file to
[rubygems.org][rubygems].

## Contributing

1. Fork it ( https://github.com/[my-github-username]/idigbio_client/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Copyright
---------

Authors -- [<NAME>][greg], [<NAME>][dimus]

Copyright (c) 2015 [<NAME>][greg], [<NAME>][dimus]
See [LICENSE][license] for details.


[gem_badge]: https://badge.fury.io/rb/idigbio_client.svg
[gem_link]: http://badge.fury.io/rb/idigbio_client
[ci_badge]: https://secure.travis-ci.org/GlobalNamesArchitecture/idigbio_client.svg
[ci_link]: http://travis-ci.org/GlobalNamesArchitecture/idigbio_client
[cov_badge]: https://coveralls.io/repos/GlobalNamesArchitecture/idigbio_client/badge.svg?branch=master
[cov_link]: https://coveralls.io/r/GlobalNamesArchitecture/idigbio_client?branch=master
[code_badge]: https://codeclimate.com/github/GlobalNamesArchitecture/idigbio_client/badges/gpa.svg
[code_link]: https://codeclimate.com/github/GlobalNamesArchitecture/idigbio_client
[dep_badge]: https://gemnasium.com/GlobalNamesArchitecture/idigbio_client.png
[dep_link]: https://gemnasium.com/GlobalNamesArchitecture/idigbio_client
[api]: https://www.idigbio.org/wiki/index.php/IDigBio_API
[inspect]: #inspect
[search]: #search
[show]: #show
[stats]: #stats
[rubygems]: https://rubygems.org
[license]: https://github.com/GlobalNamesArchitecture/idigbio-ruby-client/blob/master/LICENSE
[greg]: https://github.com/gete76
[dimus]: https://github.com/dimus
{'fraction_non_alphanumeric': 0.17501661129568105, 'fraction_numerical': 0.004651162790697674, 'mean_word_length': 3.3178427997705104, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4760944', 'n_tokens_mistral': 2399, 'n_tokens_neox': 2286, 'n_words': 604}