Class: Medium::Users
- Inherits:
-
Object
- Object
- Medium::Users
- Defined in:
- lib/medium/users.rb
Overview
Users class is used to interact with the Users API endpoint of Medium
Instance Method Summary collapse
-
#initialize(client) ⇒ Medium::Users
constructor
Initialize a new Medium::Users client.
-
#me ⇒ Hash
Returns details of the user who has granted permission to the application.
Constructor Details
#initialize(client) ⇒ Medium::Users
Initialize a new Medium::Users client
10 11 12 |
# File 'lib/medium/users.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#me ⇒ Hash
Returns details of the user who has granted permission to the application.
31 32 33 34 |
# File 'lib/medium/users.rb', line 31 def me response = @client.get 'me' Medium::Client.validate response end |