Class: Twitterland::Twinfluence
- Inherits:
-
Object
- Object
- Twitterland::Twinfluence
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/twinfluence.rb
Instance Method Summary collapse
-
#initialize(username, password) ⇒ Twinfluence
constructor
A new instance of Twinfluence.
-
#search(id, options = {}) ⇒ Object
Search Twinfluence users.
-
#user(id, cacheonly = true) ⇒ Object
Get Twinfluence analysis of a user.
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, ={}) Mash.new Twinfluence.post("/api_search.php", :body => {:user => @username, :pwd => @password}.merge()) 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 |