metrica_api

Ruby client for Yandex Metrica API. Make requests to counter and reporting sections of API. OneRetarget.com - advertising automation service


License
MIT
Install
gem install metrica_api -v 0.1.1

Documentation

Ruby client for Yandex Metrica API

Build Status Maintainability

Installation

Add this line to your application's Gemfile:

gem 'metrica_api', '~> 0.1.0'

Or install from command line:

$ gem install metrica_api

Usage

# You need an access token to use API
api = MetricaApi.counters(token)
api.data(field: 'goals') # => { 'counters' => [...], ... }

Exceptions

def read_counters

  MetricaApi.counters(token).data

rescue MetricaApi::RequestError, MetricaApi::ConnectionError => e

  puts e.message, e.backtrace

end

Testing

bundle exec rspec

Contributing

Create a pull-request or make an issue