Class: GeekparkApi::User
- Inherits:
-
Object
- Object
- GeekparkApi::User
- Defined in:
- lib/geekpark_api/user.rb
Class Method Summary collapse
Class Method Details
.update(token, params = {}) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/geekpark_api/user.rb', line 4 def self.update token, params = {} res = Faraday.patch GeekparkApi.config.user_api_base_uri do |req| req.headers['Authorization'] = "Bearer #{token}" req.body = params end {status: res.status, body: JSON.parse(res.body)} end |