Project

romniture

0.03
No commit activity in last 3 years
No release in over 3 years
A library that allows access to Omniture's REST API libraries (developer.omniture.com)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
>= 0
 Project Readme

romniture

To be pronounced...RAWWWRROMNITURE

what is it

romniture is a minimal Ruby wrapper to Omniture's REST API. It follows a design policy similar to that of sucker built for Amazon's API.

Omniture's API is closed, you have to be a paying customer in order to access the data.

installation

[sudo] gem install romniture

initialization and authentication

romniture requires you supply the username, shared_secret and environment which you can access within the Company > Web Services section of the Admin Console. The environment you'll use to connect to Omniture's API depends on which data center they're using to store your traffic data and will be one of:

Here's an example of initializing with a few configuration options.

client = ROmniture::Client.new(
  username, 
  shared_secret, 
  :san_jose, 
  :verify_mode	=> nil	# Optionaly change the ssl verify mode.
  :log => false,    		# Optionally turn off logging if it ticks you off
  :wait_time => 1   		# Amount of seconds to wait in between pinging 
                    		# Omniture's servers to see if a report is done processing (BEWARE OF TOKENS!)
  )

usage

There are only two core methods for the client which doesn't try to "over architect a spaghetti API":

  • get_report - used to...while get reports and
  • request - more generic used to make any kind of request

For reference, I'd recommend keeping Omniture's Developer Portal open as you code . It's not the easiest to navigate but most of what you need is there.

The response returned by either of these requests Ruby (parsed JSON).

examples

# Find all the company report suites
client.request('Company.GetReportSuites')

# Get an overtime report
client.get_report "Report.QueueOvertime", {
  "reportDescription" => {
    "reportSuiteID" => "#{@config["report_suite_id"]}",
    "dateFrom" => "2011-01-01",
    "dateTo" => "2011-01-10",
    "metrics" => [{"id" => "pageviews"}]
    }
  }

see also

My other client library comscore_ruby for those of you looking to pull data from comscore as well.