Class: GetAFreelancer::User
- Inherits:
-
Object
- Object
- GetAFreelancer::User
- Defined in:
- lib/getafreelancer/user.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#ident ⇒ Object
readonly
Returns the value of attribute ident.
Instance Method Summary collapse
- #buyer_rating_average ⇒ Object
- #buyer_rating_count ⇒ Object
- #city ⇒ Object
- #company ⇒ Object
- #country ⇒ Object
- #gold ⇒ Object
- #hourly_rate ⇒ Object
- #id ⇒ Object
- #info ⇒ Object
-
#initialize(client, ident) ⇒ User
constructor
A new instance of User.
- #jobs ⇒ Object
- #logo_url ⇒ Object
- #provider_rating_average ⇒ Object
- #provider_rating_count ⇒ Object
- #rating_average ⇒ Object
- #rating_count ⇒ Object
- #reg_date ⇒ Object
- #reg_unixtime ⇒ Object
- #url ⇒ Object
- #username ⇒ Object
Constructor Details
#initialize(client, ident) ⇒ User
Returns a new instance of User.
5 6 7 8 |
# File 'lib/getafreelancer/user.rb', line 5 def initialize(client, ident) @client, @ident = client, ident @user = client.get("/User/Properties.json?id=#{ident}")['profile'] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/getafreelancer/user.rb', line 3 def client @client end |
#ident ⇒ Object (readonly)
Returns the value of attribute ident.
3 4 5 |
# File 'lib/getafreelancer/user.rb', line 3 def ident @ident end |
Instance Method Details
#buyer_rating_average ⇒ Object
74 75 76 |
# File 'lib/getafreelancer/user.rb', line 74 def @user['buyer_rating']['avg'] end |
#buyer_rating_count ⇒ Object
78 79 80 |
# File 'lib/getafreelancer/user.rb', line 78 def @user['buyer_rating']['count'] end |
#city ⇒ Object
50 51 52 |
# File 'lib/getafreelancer/user.rb', line 50 def city @user['address']['city'] end |
#company ⇒ Object
38 39 40 |
# File 'lib/getafreelancer/user.rb', line 38 def company @user['company'] end |
#country ⇒ Object
46 47 48 |
# File 'lib/getafreelancer/user.rb', line 46 def country @user['address']['country'] end |
#gold ⇒ Object
42 43 44 |
# File 'lib/getafreelancer/user.rb', line 42 def gold @user['gold'] end |
#hourly_rate ⇒ Object
54 55 56 |
# File 'lib/getafreelancer/user.rb', line 54 def hourly_rate @user['hourlyrate'] end |
#id ⇒ Object
18 19 20 |
# File 'lib/getafreelancer/user.rb', line 18 def id @user['id'] end |
#info ⇒ Object
10 11 12 |
# File 'lib/getafreelancer/user.rb', line 10 def info @user end |
#jobs ⇒ Object
82 83 84 |
# File 'lib/getafreelancer/user.rb', line 82 def jobs @user['jobs'] end |
#logo_url ⇒ Object
26 27 28 |
# File 'lib/getafreelancer/user.rb', line 26 def logo_url @user['logo_url'] end |
#provider_rating_average ⇒ Object
66 67 68 |
# File 'lib/getafreelancer/user.rb', line 66 def @user['provider_rating']['avg'] end |
#provider_rating_count ⇒ Object
70 71 72 |
# File 'lib/getafreelancer/user.rb', line 70 def @user['provider_rating']['count'] end |
#rating_average ⇒ Object
58 59 60 |
# File 'lib/getafreelancer/user.rb', line 58 def @user['rating']['avg'] end |
#rating_count ⇒ Object
62 63 64 |
# File 'lib/getafreelancer/user.rb', line 62 def @user['rating']['count'] end |
#reg_date ⇒ Object
34 35 36 |
# File 'lib/getafreelancer/user.rb', line 34 def reg_date @user['reg_date'] end |
#reg_unixtime ⇒ Object
30 31 32 |
# File 'lib/getafreelancer/user.rb', line 30 def reg_unixtime @user['reg_unixtime'] end |
#url ⇒ Object
14 15 16 |
# File 'lib/getafreelancer/user.rb', line 14 def url @user['url'] end |
#username ⇒ Object
22 23 24 |
# File 'lib/getafreelancer/user.rb', line 22 def username @user['username'] end |