File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed
Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 22Following guidelines of http://keepachangelog.com/
33
44## [ Unreleased]
5- - update to support Databox API version 3
5+
6+ ## [ 2.0.0] - Aug 19, 2016
7+ - implement ` GET /metrickeys `
8+ - update ` GET /lastpushes `
9+ - implement ` DELETE /data `
10+ - update ` user-agent ` and ` Accept ` request headers
11+ - update README
612
713## [ 0.1.6] - Jan 24, 2016
814- Changes related to last_push
@@ -28,7 +34,8 @@ Following guidelines of http://keepachangelog.com/
2834## [ 0.1] - May 20, 2015
2935- Initial release
3036
31- [ Unreleased ] : https://github.com/databox/databox-go/compare/0.1.6...master
37+ [ Unreleased ] : https://github.com/databox/databox-go/compare/2.0.0...master
38+ [ 2.0.0 ] : https://github.com/databox/databox-python/compare/0.1.6...2.0.0
3239[ 0.1.6 ] : https://github.com/databox/databox-python/compare/0.1.5...0.1.6
3340[ 0.1.5 ] : https://github.com/databox/databox-python/compare/0.1.4...0.1.5
3441[ 0.1.4 ] : https://github.com/databox/databox-python/compare/0.1.1...0.1.4
Original file line number Diff line number Diff line change 55
66
77def mock_push_json (data = None , path = '/' ):
8- return {'status ' : 'ok ' }
8+ return {'id ' : '2837643 ' }
99
1010
1111class TestPush (unittest .TestCase ):
@@ -68,7 +68,7 @@ def test_last_push(self):
6868
6969 def test_last_push_with_number (self ):
7070 self .client ._get_json = lambda data = None , path = '/' : path
71- assert self .client .last_push (3 ) == '/lastpushes/ 3'
71+ assert self .client .last_push (3 ) == '/lastpushes?limit= 3'
7272
7373
7474 def test_short (self ):
Original file line number Diff line number Diff line change 1313from databox import Client
1414
1515client = Client (TOKEN )
16- # client.push('sales.total', 1447.0)
17- #client.push('orders.total', 32, date='2015-01-01 09:00:00')
16+
17+ # client.push('orders.total', 32, date='2015-01-01 09:00:00')
1818
1919# key = 'temp.ljx'
2020# rows = []
2828#
2929#
3030
31+ push = client .push ('transaction' , 1447.4 )
32+
3133print client .insert_all ([
3234 {'key' : 'temp.boston' , 'value' : 51 },
3335 {'key' : 'temp.boston' , 'value' : 49 , 'date' : '2015-01-01 17:00:00' },
3436 {'key' : 'sales.total' , 'value' : 3000 , 'attributes' : {
3537 'name' : "Oto" ,
3638 'price' : 199
3739 }},
40+ {'key' : 'transaction' , 'value' : 45.6 , 'unit' : 'USD' }
3841])
3942
4043print "--------"
4144
42- print client .last_push (3 )
45+ lastPushes = client .last_push (3 )
4346
47+ print client .get_push (lastPushes [0 ]['response' ]['body' ]['id' ])
48+ print client .metrics ()
49+ print client .purge ()
You can’t perform that action at this time.
0 commit comments