def download(client, target_dir):
    """Download listing files from play and saves them into folder herachy."""
    print('')
    print('download store listings')
    print('---------------------')
    listings = client.list('listings')
    for listing in listings:
        path = os.path.join(target_dir, 'listings', listing['language'])
        mkdir_p(path)
        with open(os.path.join(path, 'listing.json'), 'w') as outfile:
            print("save listing for {0}".format(listing['language']))
            json.dump(
                listing, outfile, sort_keys=True,
                indent=4, separators=(',', ': '))
def download ( client , target_dir ) : print ( '' ) print ( 'download store listings' ) print ( '---------------------' ) listings = client . list ( 'listings' ) for listing in listings : path = os . path . join ( target_dir , 'listings' , listing [ 'language' ] ) mkdir_p ( path ) with open ( os . path . join ( path , 'listing.json' ) , 'w' ) as outfile : print ( "save listing for {0}" . format ( listing [ 'language' ] ) ) json . dump ( listing , outfile , sort_keys = True , indent = 4 , separators = ( ',' , ': ' ) )
Download listing files from play and saves them into folder herachy.