Skip to content

Commit

Permalink
FIX for #32 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
peshay committed Mar 13, 2019
1 parent d582c40 commit c645089
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ All mandatory parameters have to be passed to a function, all optional are resol
* currency
* Optional Parameters:
* type
* date_start
* date_end
* datetime_start
* datetime_end
* page

*API Credits Cost: 3*
2 changes: 1 addition & 1 deletion btcde.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def showAccountLedger(self, currency, **args):
params = {'currency': currency}
params.update(args)
avail_params = ['currency', 'type',
'date_start', 'date_end', 'page']
'datetime_start', 'datetime_end', 'page']
p = ParameterBuilder(avail_params, params,
self.accounturi + '/ledger')
return self.APIConnect('GET', p)
4 changes: 2 additions & 2 deletions tests/test_btcde_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ def test_showAccountLedger(self, mock_logger, m):

def test_urlEncoding(self, mock_logger, m):
'''Test URL encoding on parameters.'''
params = {'currency': 'btc', 'date_start': '2018-01-01T01:00:00+01:00'}
params = {'currency': 'btc', 'datetime_start': '2018-01-01T01:00:00+01:00'}
base_url = 'https://api.bitcoin.de/v2/account/ledger'
url_args = '?' + urlencode(params)
response = self.sampleData('showAccountLedger')
m.get(requests_mock.ANY, json=response, status_code=200)
r = self.conn.showAccountLedger(params['currency'], date_start="2018-01-01T01:00:00+01:00")
r = self.conn.showAccountLedger(params['currency'], datetime_start="2018-01-01T01:00:00+01:00")
history = m.request_history
self.assertEqual(history[0].method, "GET")
self.assertEqual(history[0].url, base_url + url_args)
Expand Down

0 comments on commit c645089

Please sign in to comment.