lib/teachable_api/user.rb
# Asks the service for the latest information about this user. Updates the
# stored user token.
#
# Requires authentication.
Asks the service for the latest information about this user. Updates the
stored user token.

Requires authentication.
Asks the service for the latest information about this user . Updates the stored user token . Requires authentication .
def refresh!
      resp = API.connection.get 'api/users/current_user/edit', {
        user_email: @email,
        user_token: @token
      }
      case resp.status
      when 200
        refresh_from_user_response resp
      when 401
        raise Teachable::AuthError, resp.body['error']
      else
        raise Teachable::Error, 'Unknown response.'
      end
    end
def refresh! resp = API . connection . get 'api/users/current_user/edit' , { user_email : @email , user_token : @token } case resp . status when 200 refresh_from_user_response resp when 401 raise Teachable :: AuthError , resp . body [ 'error' ] else raise Teachable :: Error , 'Unknown response.' end end
Asks the service for the latest information about this user.
Asks the service for the latest information about this user .