diff --git a/README.rst b/README.rst index 0959384..196b65f 100644 --- a/README.rst +++ b/README.rst @@ -6,6 +6,10 @@ :target: http://badge.fury.io/py/python-odesk :alt: PyPI version +.. image:: https://travis-ci.org/odesk/php-odesk.svg + :target: http://travis-ci.org/odesk/php-odesk + :alt: Build status + Copyright (c) 2010-2014, oDesk http://www.odesk.com All rights reserved. diff --git a/changelog.rst b/changelog.rst index ef7c886..958e019 100644 --- a/changelog.rst +++ b/changelog.rst @@ -5,6 +5,13 @@ Changelog *************** +.. _0.5.7: + +Version 0.5.7 +------------- +* Added new API call - :py:meth:`Accept or decline an offer `. +* Added new conditionally required parameter ``category2`` to :py:meth:`Post job ` API. + .. _0.5.6: Version 0.5.6 diff --git a/odesk/__init__.py b/odesk/__init__.py index 2c9e64c..d780956 100644 --- a/odesk/__init__.py +++ b/odesk/__init__.py @@ -13,7 +13,7 @@ """ -VERSION = '0.5.6' +VERSION = '0.5.7' def get_version(): diff --git a/odesk/routers/offers.py b/odesk/routers/offers.py index 4b39cc1..9ad2dc8 100644 --- a/odesk/routers/offers.py +++ b/odesk/routers/offers.py @@ -245,3 +245,20 @@ def get_freelancer_offer(self, offer_id): url = 'contractors/offers/{0}'.format(offer_id) return self.get(url, data) + + def accept_or_decline(self, offer_id, action_name): + """ + Get specific offer as freelancer. + + *Parameters:* + :offer_id: Offer reference ID. + + :action_name: The name of the action to run. + + """ + data = {} + + data['action_name'] = action_name + + url = 'contractors/actions/{0}'.format(offer_id) + return self.post(url, data)