Beispiel #1
0
def download_categories():
    BreweryDb.configure('c7aeca2c6fa21f8a51e023c80332a870')
    # response = BreweryDb.beers({'withBreweries':'Y','withIngredients':'Y'})
    response = BreweryDb.categories()
    cat_data = response['data']
    variables = [x for x in dir(Category) if not (x.startswith('_'))]
    cat_dicts = parse_cat_data(cat_data)
    with open('categories-brewerydb.csv', 'w') as csvFile:
        writer = DictUnicodeWriter(csvFile, variables)
        print "Wrote header"
        writer.writeheader()
        writer.writerows(cat_dicts)
        print "Wrote %d categories to file " % len(cat_dicts)
Beispiel #2
0
 def method_to_invoke_with_params(self, params):
     return BreweryDb.categories(params)
Beispiel #3
0
 def method_to_invoke_with_params(self, params):
     return BreweryDb.categories(params)
Beispiel #4
0
 def method_to_invoke(self):
     return BreweryDb.categories()
Beispiel #5
0
 def method_to_invoke(self):
     return BreweryDb.categories()