josuebrunel / yahoo-fantasy-sport

Python Yahoo! Fantasy Sports
MIT License
28 stars 9 forks source link

Transactions: Post #39

Open peacing opened 9 years ago

peacing commented 9 years ago

Add player Drop Player Add & Drop Player Add player on Waivers Add player on Waivers with FAAB (Free agent acquisition budget) bid Propose Trades

josuebrunel commented 9 years ago

Paul, i do believe that transaction doesn't support put but post. The method isn't that different anyway

def _post(uri, transaction):
       headers = {'Content-Type':'application/xml'}
       data = transaction.to_xml() 
       response = self.oauth.session.put(uri, data=data, headers=headers)
       return response

By the way, you haven't added the

return response

in the _put method, tests will definitely fail without that statement :smile: