You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Google::Apis::Core::ApiCommand#decode_response_body it checks to see if the content_type starts with JSON_CONTENT_TYPE. The content type comes back as text/csv so it has an explicit return of nil.
defdecode_response_body(content_type,body)returnsuperunlessresponse_representationreturnsuperifoptions && options.skip_deserializationreturnsuperifcontent_type.nil?# HERE content_type = "text/csv" when making a generate_account_report_csv request so it returns nilreturnnilunlesscontent_type.start_with?(JSON_CONTENT_TYPE)body="{}"ifbody.empty?instance=response_class.newresponse_representation.new(instance).from_json(body,unwrap: response_class)instanceend
Environment details
OS: Ubuntu 20.04
Ruby version: 3.2.2
Gem name and version: google-apis-adsense_v2 / 0.31.0
Steps to reproduce
Make a call to generate_account_report_csv
Code example
sense=Google::Apis::AdsenseV2::AdsenseService.newscope=['https://www.googleapis.com/auth/adsense']sense.authorization=Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: File.open('./account.json'),scope: scope)account="accounts/pub-xxxxxxxxxxxxx"result=sense.generate_account_report_csv(account,date_range: 'YESTERDAY',dimensions: %w[DATE],metrics: %w[PAGE_VIEWSIMPRESSIONSCLICKS])ppresult# will be nil
The text was updated successfully, but these errors were encountered:
In Google::Apis::Core::ApiCommand#decode_response_body it checks to see if the content_type starts with JSON_CONTENT_TYPE. The content type comes back as text/csv so it has an explicit return of nil.
Environment details
Steps to reproduce
Make a call to
generate_account_report_csv
Code example
The text was updated successfully, but these errors were encountered: