Sha256: 88d8e69b7249b298eedf2d5811fe98fd7a8b776ee330353850c4fe3dcedeba2d
Contents?: true
Size: 650 Bytes
Versions: 1
Compression:
Stored size: 650 Bytes
Contents
require 'klout' ## # This module analize and extract score from social analizer http://klout.com module Skore class KloutSkore ## # Include module and clases from Klout include Klout attr_accessor :user ## # Initialize Base and almacenate user information def initialize(api_key, username) begin Klout.api_key = api_key identity = Identity.find_by_screen_name(username) @user = User.new(identity.id) rescue @error = true end end ## # Get score for user def score(round=false) if !@error if round then @user.score.score.round else @user.score.score end else -1 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
skore-0.0.3 | lib/skore/klout.rb |