Class: Twitterland::TweetMeme::Analytics
- Inherits:
-
Object
- Object
- Twitterland::TweetMeme::Analytics
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/tweet_meme/analytics.rb
Class Method Summary (collapse)
-
+ (Object) build(app_id, api_key, url)
Sends a request to the Analytics system top build a report for the specified URL.
-
+ (Object) built(app_id, api_key, url = nil)
Returns a list of all Analytics that you have built, optionally filtered by domain.
-
+ (Object) get_data(app_id, api_key, uid)
Returns the HTML to display the built Analytics to the user.
Class Method Details
+ (Object) build(app_id, api_key, url)
Sends a request to the Analytics system top build a report for the specified URL. Accessible to anyone with an App ID and App Key.
Twitterland::TweetMeme::Analytics.build(1234, 'OU812', 'http://tweetcongress.org')
13 14 15 |
# File 'lib/twitterland/tweet_meme/analytics.rb', line 13 def self.build(app_id, api_key, url) Hashie::Mash.new(get("/build.json", :query => {:appid => app_id, :apikey => api_key, :url => url})).uid end |
+ (Object) built(app_id, api_key, url = nil)
Returns a list of all Analytics that you have built, optionally filtered by domain. Accessible to anyone with an App ID and App Key.
Twitterland::TweetMeme::Analytics.built(1234, 'OU812', 'http://tweetcongress.org')
20 21 22 23 24 |
# File 'lib/twitterland/tweet_meme/analytics.rb', line 20 def self.built(app_id, api_key, url=nil) = {:appid => app_id, :apikey => api_key} .merge({:url => url}) unless url.blank? Hashie::Mash.new get("/built.json", :query => ) end |
+ (Object) get_data(app_id, api_key, uid)
Returns the HTML to display the built Analytics to the user.
Access to this API call is only available to those with elevated permissions to do so.
In order to get permission, please contact analytics@tweetmeme.com.
Twitterland::TweetMeme::Analytics.get(1234, 'OU812', '37758bd44025edb222022dcd1491c29g')
31 32 33 |
# File 'lib/twitterland/tweet_meme/analytics.rb', line 31 def self.get_data(app_id, api_key, uid) Hashie::Mash.new get("/get.json", :query => {:appid => app_id, :apikey => api_key, :uid => uid}) end |