-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
3 comments
on commit 6b7cd9d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh great @unpairestgood, this is very interesting. I look forward to implementing all that ... Very good Paul
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'm very happy to say I got add_player to work in my latest commit! However, I simplified a lot of the code because I was trying to debug an error, which ended up being a simple example of this:(http://stackoverflow.com/questions/14247732/python-syntaxerror-non-keyword-after-keyword-arg) in the init parameters for the Transaction class.
To test the other functions I will undo some of the commenting out to make the program more flexible. I'm referring in particular to my use of a dictionary in line 184 to call different xml_builder functions based on the transaction type. Do you think this is a good way of doing this? I was trying to be a little more sophisticated than writing a bunch of if statements 😀
I know the code is perhaps a little less elegant with multiple build_xml functions. But I thought it was the easiest way to make the function calls in tests.py as simple as possible. For example, I wanted the parameters for add_player to be just the player code of the player you wish to add to your team. Right now you do have to also type in your team code and league code, but I envision those being moved to more of 'global' variables soon.
If there were only one build_xml function for all of add_player, pending_trade, edit waiver, etc... then the build_xml function would have tons of if statements because the input XML string is very different for each of them. That's my justification for splitting them up into more but simpler xml_builder functions.
Take care,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @unpairestgood ,
To test the other functions I will undo some of the commenting out to make the program more flexible. I'm referring in particular to my use of a dictionary in line 184 to call different xml_builder functions based on the transaction type. Do you think this is a good way of doing this? I was trying to be a little more sophisticated than writing a bunch of if statements
It's alright for me, i think i would have done the same. Waiting for you pull request 😉
Have a good one buddy
You've skipped the ":"