Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #31 from odesk/v0.5.7
Browse files Browse the repository at this point in the history
v0.5.7
  • Loading branch information
mnovozhylov committed Mar 5, 2015
2 parents ba76db2 + 135b258 commit 2ded864
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 7 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
Changelog
***************

.. _0.5.7:

Version 0.5.7
-------------
* Added new API call - :py:meth:`Accept or decline an offer <odesk.routers.offers.Offers.accept_or_decline>`.
* Added new conditionally required parameter ``category2`` to :py:meth:`Post job <odesk.routers.hr.HR.post_job>` API.

.. _0.5.6:

Version 0.5.6
Expand Down
2 changes: 1 addition & 1 deletion odesk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""

VERSION = '0.5.6'
VERSION = '0.5.7'


def get_version():
Expand Down
17 changes: 17 additions & 0 deletions odesk/routers/offers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 2ded864

Please sign in to comment.