Class: PlayTime::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/play_time/client.rb

Constant Summary collapse

TOKEN_URI =
'https://accounts.google.com/o/oauth2/token'.freeze
SCOPE =
'https://www.googleapis.com/auth/androidpublisher'.freeze
API =
'androidpublisher'.freeze
API_VERSION =
'v2'.freeze

Instance Method Summary collapse

Instance Method Details

#authorize!Object



13
14
15
16
# File 'lib/play_time/client.rb', line 13

def authorize!
  client.authorization = oauth2_client
  client.authorization.fetch_access_token!
end

#commit(track) ⇒ Object



18
19
20
21
22
23
# File 'lib/play_time/client.rb', line 18

def commit(track)
  create_insert
  upload_apk
  update_track(track)
  save
end