Ejemplo n.º 1
0
def _fetch_mozillians():
    mozillians_client = MozilliansClient(settings.MOZILLIANS_API_URL,
                                         settings.MOZILLIANS_API_KEY)

    vouched = mozillians_client.get_users(params={'is_vouched': True})['count']
    total = mozillians_client.get_users()['count']
    Mozillian.objects.create(vouched=vouched, total=total)
Ejemplo n.º 2
0
def fetch_countries():
    mozillians_client = MozilliansClient(settings.MOZILLIANS_API_URL, settings.MOZILLIANS_API_KEY)
    countries = sorted(product_details.get_regions("en-US").values())

    for country in countries:
        vouched = mozillians_client.get_users(params={"is_vouched": True, "country": country})["count"]
        total = mozillians_client.get_users(params={"country": country})["count"]
        Country.objects.create(name=country, vouched=vouched, total=total)
Ejemplo n.º 3
0
def fetch_countries():
    mozillians_client = MozilliansClient(settings.MOZILLIANS_API_URL,
                                         settings.MOZILLIANS_API_KEY)
    countries = sorted(product_details.get_regions('en-US').values())

    for country in countries:
        vouched = mozillians_client.get_users(params={
            'is_vouched': True,
            'country': country
        })['count']
        total = mozillians_client.get_users(
            params={'country': country})['count']
        Country.objects.create(name=country, vouched=vouched, total=total)
Ejemplo n.º 4
0
def _fetch_countries():
    mozillians_client = MozilliansClient(settings.MOZILLIANS_API_URL,
                                         settings.MOZILLIANS_API_KEY)
    countries = sorted(product_details.get_regions('en-US').values())

    for country in countries:
        vouched = mozillians_client.get_users(
            params={
                'is_vouched': True,
                'country': country
            })['count']
        total = mozillians_client.get_users(
            params={
                'country': country
            })['count']
        Country.objects.create(name=country, vouched=vouched, total=total)
Ejemplo n.º 5
0
def fetch_mozillians():
    mozillians_client = MozilliansClient(settings.MOZILLIANS_API_URL,
                                         settings.MOZILLIANS_API_KEY)
    vouched = mozillians_client.get_users(params={'is_vouched': True})['count']
    total = mozillians_client.get_users()['count']
    Mozillian.objects.create(vouched=vouched, total=total)