File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -429,6 +429,18 @@ func (d *Client) AddressList(account *string, address *string) (*AddressListResp
429429 return response , d .call (response , "address_list" , structs .Map (args ))
430430}
431431
432+ func (d * Client ) StreamList (account * string ) (* StreamListResponse , error ) {
433+ response := new (StreamListResponse )
434+ err := d .call (response , "stream_list" , map [string ]interface {}{
435+ "account_id" : account ,
436+ "include_protobuf" : true ,
437+ })
438+ if err != nil {
439+ return nil , err
440+ }
441+ return response , nil
442+ }
443+
432444func (d * Client ) ClaimList (account * string , page uint64 , pageSize uint64 ) (* ClaimListResponse , error ) {
433445 if page == 0 {
434446 return nil , errors .Err ("pages start from 1" )
Original file line number Diff line number Diff line change @@ -280,6 +280,17 @@ func TestClient_ClaimList(t *testing.T) {
280280 prettyPrint (* got )
281281}
282282
283+ func TestClient_StreamList (t * testing.T ) {
284+ _ = os .Setenv ("BLOCKCHAIN_NAME" , "lbrycrd_regtest" )
285+ d := NewClient ("" )
286+ got , err := d .StreamList (nil )
287+ if err != nil {
288+ t .Error (err )
289+ return
290+ }
291+ prettyPrint (* got )
292+ }
293+
283294func TestClient_TransactionList (t * testing.T ) {
284295 _ = os .Setenv ("BLOCKCHAIN_NAME" , "lbrycrd_regtest" )
285296 d := NewClient ("" )
Original file line number Diff line number Diff line change @@ -396,6 +396,8 @@ func (c *Claim) GetStreamSizeByMagic() (streamSize uint64, e error) {
396396 return streamSize , nil
397397}
398398
399+ type StreamListResponse []Claim
400+
399401type ClaimListResponse struct {
400402 Claims []Claim `json:"items"`
401403 Page uint64 `json:"page"`
You can’t perform that action at this time.
0 commit comments