Sha256: 403521401d3eaddbcdacf775b44d09eaba03548a0e6f693d69f488a08c142ecf
Contents?: true
Size: 957 Bytes
Versions: 3
Compression:
Stored size: 957 Bytes
Contents
# frozen_string_literal: true module AndroidInAppBilling class PublisherClient # Knows how to build android publisher v2 api client class ClientBuilder SCOPE = ['https://www.googleapis.com/auth/androidpublisher'].freeze class << self # @return [Google::Apis::AndroidpublisherV2::AndroidPublisherService] def build client_class.new.tap do |client| client.authorization = build_authorization end end private def client_class Google::Apis::AndroidpublisherV2::AndroidPublisherService end def build_authorization json_key_io = StringIO.new(File.read(json_key_path)) Google::Auth::DefaultCredentials.make_creds( scope: SCOPE, json_key_io: json_key_io ) end def json_key_path AndroidInAppBilling.config.json_key_path end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems