<commit_before>[![Gem Version](https://badge.fury.io/rb/qualtrics_api.svg)](http://badge.fury.io/rb/qualtrics_api)
[![Dependency Status](https://gemnasium.com/pallymore/qualtrics_api.svg)](https://gemnasium.com/pallymore/qualtrics_api)
[![Build Status](https://travis-ci.org/CambridgeEducation/qualtrics_api.svg)](https://travis-ci.org/CambridgeEducation/qualtrics_api)

# QualtricsAPI

Ruby wrapper for Qualtrics REST ControlPanel API version 3.0.
[API Documents/Play Ground](https://api.qualtrics.com/)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'qualtrics_api'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install qualtrics_api

## Usage

### Initialize

```ruby
QualtricsAPI.configure do |config|
  # mandatory
  config.api_token = "YOUR_QUALTRICS_API_KEY"

  # optionally - you can provide a data center id
  config.data_center_id = "co1" #defaults to co1
end
```

### Surveys
<commit_msg>adds list of dependencies to ReadMe<commit_after>[![Gem Version](https://badge.fury.io/rb/qualtrics_api.svg)](http://badge.fury.io/rb/qualtrics_api)
[![Dependency Status](https://gemnasium.com/pallymore/qualtrics_api.svg)](https://gemnasium.com/pallymore/qualtrics_api)
[![Build Status](https://travis-ci.org/CambridgeEducation/qualtrics_api.svg)](https://travis-ci.org/CambridgeEducation/qualtrics_api)

# QualtricsAPI

Ruby wrapper for Qualtrics REST ControlPanel API version 3.0.
[API Documents/Play Ground](https://api.qualtrics.com/)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'qualtrics_api'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install qualtrics_api

## Dependencies

Currently this gem is built & tested with Ruby 2.3.x.
Confirmed working with Ruby 2.4.x.

Requires Ruby >= 2.3

```ruby
"faraday", "~> 0.13.1"
"faraday_middleware", "~> 0.12.2"
"virtus", "~> 1.0"
```

## Usage

### Initialize

```ruby
QualtricsAPI.configure do |config|
  # mandatory
  config.api_token = "<PASSWORD>TRICS_<PASSWORD>_KEY"

  # optionally - you can provide a data center id
  config.data_center_id = "co1" #defaults to co1
end
```

### Surveys

{'fraction_non_alphanumeric': 0.14417744916820702, 'fraction_numerical': 0.011090573012939002, 'mean_word_length': 4.81989247311828, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '391626', 'n_tokens_mistral': 837, 'n_tokens_neox': 764, 'n_words': 162}