Browse Source

Added instructions for ListPushes

Piotr Czajkowski 3 years ago
parent
commit
aabaebfbce
2 changed files with 6 additions and 1 deletions
  1. 5 0
      README.md
  2. 1 1
      bullet.go

+ 5 - 0
README.md

@@ -33,4 +33,9 @@
 		t.Error(err)
 	}
 
+**List pushes, all pushes (modifiedAfter can be nil, limit <= 0 gives default of 500)**
 
+	devices, err := b.ListPushes(true, nil, 0, "")
+	if err != nil {
+		t.Error(err)
+	}

+ 1 - 1
bullet.go

@@ -220,7 +220,7 @@ func (b Bullet) ListDevices() (*Devices, error) {
 	return &result, nil
 }
 
-// ListPushes returns Pushes structure which contains slice of pushes
+// ListPushes returns Pushes structure which contains slice of pushes, limit <= 0 gives default of 500
 func (b Bullet) ListPushes(active bool, modifiedAfter *time.Time, limit int, cursor string) (*Pushes, error) {
 	params := url.Values{}