Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ PyBossa supports webhooks, notifying via an HTTP POST request the task that has
been completed by the volunteers or users. The POST sends basically the
following data:

```JSON
```

{'fired_at':,
'app_short_name': 'project-slug',
'app_id': 1,
'project_short_name': 'project-slug',
'project_id': 1,
'task_id': 1,
'event': 'task_completed'}

```

The PyBossa server sends all the required information to analyze the results of
Expand Down
2 changes: 1 addition & 1 deletion analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def basic(**kwargs):
"""A basic analyzer."""
e = enki.Enki(endpoint=settings.endpoint,
api_key=settings.api_key,
app_short_name=kwargs['app_short_name'])
project_short_name=kwargs['project_short_name'])
e.get_tasks(task_id=kwargs['task_id'])
e.get_task_runs()
print e.tasks
Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 Daniel Lombraña González
# Copyright (C) 2015 Daniel Lombraña González
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class Test(object):
"""Class for Testing the PyBossa application."""

payload = dict(fired_at=u'2014-11-17 09:49:27',
app_short_name=u'project',
app_id=1,
project_short_name=u'project',
project_id=1,
task_id=1,
event=u'task_completed')

Expand Down
2 changes: 1 addition & 1 deletion test/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_basic(self):
with patch('enki.Enki', autospec=True):
enki_mock = enki.Enki(endpoint='server',
api_key='api',
app_short_name='project')
project_short_name='project')
enki_mock.tasks = []
res = basic(**self.payload)
assert enki_mock.get_tasks.called
Expand Down