Class: Odnoklassniki::REST::User
- Inherits:
-
Object
- Object
- Odnoklassniki::REST::User
- Defined in:
- lib/odnoklassniki/rest/user.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #current_user(fields = []) ⇒ Object
-
#initialize(client) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(client) ⇒ User
Returns a new instance of User.
7 8 9 |
# File 'lib/odnoklassniki/rest/user.rb', line 7 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
5 6 7 |
# File 'lib/odnoklassniki/rest/user.rb', line 5 def client @client end |
Instance Method Details
#current_user(fields = []) ⇒ Object
11 12 13 14 |
# File 'lib/odnoklassniki/rest/user.rb', line 11 def current_user(fields=[]) = fields.empty? ? {} : fiels.join(',') client.get('users.getCurrentUser', ) end |