<commit_before>[![Build Status](https://travis-ci.org/Oktavilla/egree-ruby.svg?branch=master)](https://travis-ci.org/Oktavilla/egree-ruby)
[![Code Climate](https://codeclimate.com/github/Oktavilla/egree-ruby/badges/gpa.svg)](https://codeclimate.com/github/Oktavilla/egree-ruby)
[![Test Coverage](https://codeclimate.com/github/Oktavilla/egree-ruby/badges/coverage.svg)](https://codeclimate.com/github/Oktavilla/egree-ruby)
[![Gem Version](https://badge.fury.io/rb/egree.svg)](http://badge.fury.io/rb/egree)

# Egree

Ruby client for the [Assently API](https://app.assently.com/apiv1).

__You're on branch api/v2, if you want to use apiv1, checkout [master](https://github.com/kollegorna/egree-ruby/tree/master).__

Ruby client for the [Egree API V2](https://app.egree.com/api).

Currently the only supported api calls is `createcase`, `sendcase` and `getcase`.

### Note
If you miss `getviewcaseurlquery`, this is how you can get the view case url.

```
signing_case = egree.get_case case_id
signing_case.response["Parties"].first["PartyUrl"] # Each party gets their own url

```

## Usage

### Creating a case

```ruby
egree = Egree.client egree_api_key, egree_api_secret

case_id = SecureRandom.uuid

signature_case = Egree::Case.new "Agreement", ["electronicid"], case_id: case_id
signature_case.add_party Egree::Party.new_with_attributes({<commit_msg>Fix apiv2 url in README<commit_after>[![Build Status](https://travis-ci.org/Oktavilla/egree-ruby.svg?branch=master)](https://travis-ci.org/Oktavilla/egree-ruby)
[![Code Climate](https://codeclimate.com/github/Oktavilla/egree-ruby/badges/gpa.svg)](https://codeclimate.com/github/Oktavilla/egree-ruby)
[![Test Coverage](https://codeclimate.com/github/Oktavilla/egree-ruby/badges/coverage.svg)](https://codeclimate.com/github/Oktavilla/egree-ruby)
[![Gem Version](https://badge.fury.io/rb/egree.svg)](http://badge.fury.io/rb/egree)

# Egree

Ruby client for the [Assently API](https://app.assently.com/apiv1).

__You're on branch api/v2, if you want to use apiv1, checkout [master](https://github.com/kollegorna/egree-ruby/tree/master).__

Ruby client for the [Egree API V2](https://app.egree.com/apiv2).

Currently the only supported api calls is `createcase`, `sendcase` and `getcase`.

### Note
If you miss `getviewcaseurlquery`, this is how you can get the view case url.

```
signing_case = egree.get_case case_id
signing_case.response["Parties"].first["PartyUrl"] # Each party gets their own url

```

## Usage

### Creating a case

```ruby
egree = Egree.client egree_api_key, egree_api_secret

case_id = SecureRandom.uuid

signature_case = Egree::Case.new "Agreement", ["electronicid"], case_id: case_id
signature_case.add_party Egree::Party.new_with_attributes({
{'fraction_non_alphanumeric': 0.16017634092578986, 'fraction_numerical': 0.0036737692872887582, 'mean_word_length': 5.5299760191846525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, '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': '7161278', 'n_tokens_mistral': 1044, 'n_tokens_neox': 985, 'n_words': 181}