Class: Twitterland::Twinfluence

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/twitterland/twinfluence.rb

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ Twinfluence

Returns a new instance of Twinfluence.



7
8
9
10
# File 'lib/twitterland/twinfluence.rb', line 7

def initialize(username, password)
  @username = username
  @password = password
end

Instance Method Details

#search(id, options = {}) ⇒ Object

Search Twinfluence users

possible options:

des: description
loc: location
sort, limit, minfollows

 Twitterland::Twinfluence.search(username,password)


27
28
29
# File 'lib/twitterland/twinfluence.rb', line 27

def search(id, options={})
  Mash.new Twinfluence.post("/api_search.php", :body => {:user => @username, :pwd => @password}.merge(options))
end

#user(id, cacheonly = true) ⇒ Object

Get Twinfluence analysis of a user

Twitterland::Twinfluence.new(username,password)


15
16
17
# File 'lib/twitterland/twinfluence.rb', line 15

def user(id, cacheonly=true)
  Mash.new Twinfluence.post("/api_user.php", :body => {:id => id, :user => @username, :pwd => @password, :cacheonly => cacheonly})
end