0.0
No commit activity in last 3 years
No release in over 3 years
Tubemogul API Client.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
>= 0
~> 10.0
~> 3.0
>= 0

Runtime

 Project Readme

TubemogulApi CircleCI

Unofficial client library for Tubemogul API

Installation

Add this line to your application's Gemfile:

gem 'tubemogul_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tubemogul_api

Usage

# If you use the default ENV variables TUBEMOGUL_CLIENT_ID and TUBEMOGUL_SECRET_KEY, you can get a
# connection by:

connection = TubemogulApi::Connection.new

# Otherwise you can explicitly pass client_id and secret_key:
connection = TubemogulApi::Connection.new(
  client_id: ENV.fetch('TUBEMOGUL_CLIENT_ID'),
  secret_key: ENV.fetch('TUBEMOGUL_SECRET_KEY')
)

service = TubemogulApi::Service::Advertiser.new(connection)
service.get(10) # returns the advertiser with the ID 10
service.get_all # returns all advertisers

Note: Currently only get and get_all requests are implemented and for a limited set of services. Check lib/tubemogul_api/service directory to see which services are available.

Also the spec/integration directory contains usage examples.

Development

Run specs with bundle exec rspec.

To recreate or create new VCR episodes, you need to set proper values for env vars. Check .env to see the list of env variables required. We recommend that you set it in .env.test file.

Note that some specs fail when recording new VCR episodes due to filtering of sensitive data. But after that, all specs should pass in playback mode.

We run rake rubocop to make sure, everything looks good.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the TubemogulApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ad2games/tubemogul_api.