Skip to content

Commit 1d7265c

Browse files
committed
updated subscriber, added event names
1 parent 74a5334 commit 1d7265c

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,18 @@ None
7171
>>> URL = 'clumsy-clementine'
7272
>>> S = firebase.subscriber(URL, pprint) # pprint will be called on all Firebase updates
7373
>>> S.start() # will get called with initial value of URL, which is empty
74-
{u'data': None, u'path': u'/'}
74+
(u'put', {u'data': None, u'path': u'/'})
7575

7676
>>> firebase.put(URL, ';-)') # will make S print something
77-
{u'data': u';-)', u'path': u'/'}
77+
(u'put', {u'data': u';-)', u'path': u'/'})
7878

7979
>>> firebase.put(URL, {'status': 'mortified'}) # continuing from above
80-
{u'data': {u'status': u'mortified'}, u'path': u'/'}
81-
>>> firebase.patch(URL, {'reason': 'blushing'}) # this one is scary
82-
{u'data': {u'reason': u'blushing'}, u'path': u'/'}
83-
>>> print firebase.get(URL) # notice the update only gave us the new k,v without telling us
84-
{u'status': u'mortified', u'reason': u'blushing'}
85-
86-
>>> firebase.put(URL, {'color': 'orange-red'}) # expect change from S
87-
{u'data': {u'color': u'orange-red'}, u'path': u'/'}
88-
>>> print firebase.get(URL) # put overwrites, but S doesn't tell us!
89-
{u'color': u'orange-red'}
80+
(u'put', {u'data': {u'status': u'mortified'}, u'path': u'/'})
81+
>>> firebase.patch(URL, {'reason': 'blushing'}) # same data, different method
82+
(u'patch', {u'data': {u'reason': u'blushing'}, u'path': u'/'})
9083

9184
>>> firebase.put(URL + '/color', 'red')
92-
{u'data': u'red', u'path': u'/color'}
85+
(u'put', {u'data': u'red', u'path': u'/color'})
9386

9487
>>> S.stop()
9588
```

0 commit comments

Comments
 (0)