Google Play 개발자 콘솔은 보고서를 특별한 Google 클라우드 저장소 버킷에 저장하므로
gsutil을 사용하여 수익 보고서를 자동으로 다운로드할 수 있다.
1. gsutil 설치
1) gsutil 을 다운 받아 압축을 푸는 것 만으로 완료된다.
2) 설치 후 구글 보고서를 볼 수 있는 권한을 가진 계정으로 인증을 완료해야 함.
3) 현재 python 2.6 이상이어야 설치 가능 (python -V)
cd ~/ mkdir mylocal wget https://storage.googleapis.com/pub/gsutil.tar.gz unzip gsutil.tar.gz |
2. gsutil 계정 인증
cd ~/mylocal/gsutil python gsutil config ... Please navigate your browser to the following URL: http.... |
라고 나오면 해당 링크를 방문하여 authorization code 를 copy 하여
Enter the authorization code: 에 붙여 넣고 엔터.
Please navigate your browser to the following URL: http://code.google.com/apis/console What is your project-id? |
라고 나오면 서비스 중인 package name 중 하나를 입력해 주면 된다.
설정 완료!
( ~/.boto 파일에 설정 저장됨 )
3. 보고서 다운 받기
1) Google Play > Developer Console > 재무 보고서 페이지 하단을 보면 직접 신고 URI 를 확인 할 수 있는데, 해당 URI 를 통해 보고서가 저장되고 있는 Google 클라우드 저장소 버킷을 확인 할 수 있다.
gs://pubsite_prod_rev_????????????????????/payouts/ gs://pubsite_prod_rev_????????????????????/sales/ gs://pubsite_prod_rev_????????????????????/earnings/ |
2) gsutil cp 명령어를 이용해 보고서 다운로드
~/mylocal/gsutil/gsutil cp gs://pubsite_prod_rev_???????????????????/sales/salesreport_201412.zip . |
4. 참고 문서
1) 구글 Android 개발자 도움말 https://support.google.com/googleplay/android-developer/answer/2482017?hl=ko
2) gsutil 설치 https://cloud.google.com/storage/docs/gsutil_install
2) google storage 설치 과정(for windows) 블로그 http://blog.naver.com/windpriest/130140281215
4) gsutil 명령어 reference https://cloud.google.com/storage/docs/gsutil/commands/cp