Class: Quotefm::User

Inherits:
Object show all
Defined in:
lib/quotefm/user.rb

Class Method Summary collapse

Class Method Details

.getByID(id) ⇒ Object



4
5
6
# File 'lib/quotefm/user.rb', line 4

def self.getByID id
  res = HTTParty.get("https://quote.fm/api/user/get/?id="+id.to_s)
end

.getByUsername(username) ⇒ Object



8
9
10
# File 'lib/quotefm/user.rb', line 8

def self.getByUsername username
  res = HTTParty.get("https://quote.fm/api/user/get/?username="+username.to_s)
end

.listFollowers(username) ⇒ Object

Comatibility to older Version



29
30
31
# File 'lib/quotefm/user.rb', line 29

def self.listFollowers username
  listFollowersByUsername username
end

.listFollowersByID(id) ⇒ Object



16
17
18
# File 'lib/quotefm/user.rb', line 16

def self.listFollowersByID id
  res = HTTParty.get("https://quote.fm/api/user/listFollowers/?id="+id.to_s)
end

.listFollowersByUsername(username) ⇒ Object



12
13
14
# File 'lib/quotefm/user.rb', line 12

def self.listFollowersByUsername username
  res = HTTParty.get("https://quote.fm/api/user/listFollowers/?username="+username.to_s)
end

.listFollowings(username) ⇒ Object



33
34
35
# File 'lib/quotefm/user.rb', line 33

def self.listFollowings username
  listFollowingsByUsername username
end

.listFollowingsByID(id) ⇒ Object



24
25
26
# File 'lib/quotefm/user.rb', line 24

def self.listFollowingsByID id
  res = HTTParty.get("https://quote.fm/api/user/listFollowings/?id="+id.to_s)
end

.listFollowingsByUsername(username) ⇒ Object



20
21
22
# File 'lib/quotefm/user.rb', line 20

def self.listFollowingsByUsername username
  res = HTTParty.get("https://quote.fm/api/user/listFollowings/?username="+username.to_s)
end