Skip to content

Schema

statistics_dataset_schema()

Resource ID.

Returns:

Type Description

schema

Source code in ckanext/statistics/logic/schema.py
38
39
40
41
42
43
44
45
46
47
def statistics_dataset_schema():
    """
    Resource ID.

    :returns: schema
    """
    schema = {
        'resource_id': [ignore_missing, resource_id_exists],
    }
    return schema

statistics_downloads_schema()

Month and Year parameters.

Returns:

Type Description

schema

Source code in ckanext/statistics/logic/schema.py
24
25
26
27
28
29
30
31
32
33
34
35
def statistics_downloads_schema():
    """
    Month and Year parameters.

    :returns: schema
    """
    schema = {
        'month': [ignore_missing, int_validator],
        'year': [ignore_missing, int_validator],
        'resource_id': [ignore_missing, list_of_resource_ids],
    }
    return schema