mirror of
https://github.com/netzbegruenung/green-spider-api.git
synced 2024-05-05 02:03:41 +02:00
Remove /api/v1/spider-results/compact/ endpoint
This commit is contained in:
parent
d344060d3f
commit
afc65ec3e6
19
main.py
19
main.py
|
@ -48,24 +48,6 @@ def flatten(d, parent_key='', sep='.'):
|
||||||
return dict(items)
|
return dict(items)
|
||||||
|
|
||||||
|
|
||||||
def get_compact_results():
|
|
||||||
query = client.query(kind=spider_results_kind,
|
|
||||||
order=['-created'],
|
|
||||||
)
|
|
||||||
|
|
||||||
out = []
|
|
||||||
for entity in query.fetch(eventual=True):
|
|
||||||
created = convert_datastore_datetime(entity.get('created'))
|
|
||||||
|
|
||||||
out.append({
|
|
||||||
'input_url': entity.key.name,
|
|
||||||
'created': created.isoformat(),
|
|
||||||
'meta': entity.get('meta'),
|
|
||||||
'score': entity.get('score'),
|
|
||||||
})
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
def simplify_rating(d):
|
def simplify_rating(d):
|
||||||
"""
|
"""
|
||||||
Removes some keys from a flattened rating dict
|
Removes some keys from a flattened rating dict
|
||||||
|
@ -223,7 +205,6 @@ class Index(object):
|
||||||
"endpoints": [
|
"endpoints": [
|
||||||
"/api/v1/spider-results/last-updated/",
|
"/api/v1/spider-results/last-updated/",
|
||||||
"/api/v1/spider-results/table/",
|
"/api/v1/spider-results/table/",
|
||||||
"/api/v1/spider-results/compact/",
|
|
||||||
"/api/v1/spider-results/site",
|
"/api/v1/spider-results/site",
|
||||||
"/api/v1/screenshots/site",
|
"/api/v1/screenshots/site",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue