Class: AirbnbApi::Service::Token

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Includes:
APIOperations::Find, AirbnbApi::Service
Defined in:
lib/airbnb_api/service/token.rb

Instance Attribute Summary

Attributes included from ClassMethods

#parameters, #path, #requires_oauth_token

Instance Method Summary collapse

Methods included from ClassMethods

can_use_client?, require_oauth_token, requires_oauth_token?, set_parameter, set_path

Methods included from APIOperations::Find

#find

Methods included from AirbnbApi::Service

#build, #initialize

Instance Method Details

#create_from_code(code) ⇒ Object



10
11
12
# File 'lib/airbnb_api/service/token.rb', line 10

def create_from_code(code)
  build @client.post(self.class.path.to_s, { code: code }.to_json)
end

#refresh_token(refresh_token) ⇒ Object



14
15
16
# File 'lib/airbnb_api/service/token.rb', line 14

def refresh_token(refresh_token)
  build @client.post(self.class.path.to_s, { refresh_token: refresh_token }.to_json)
end