Skip to content

Commit

Permalink
Add get_owned_stores endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Aug 1, 2024
1 parent a171aa4 commit 29c94e4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/rpc/datalayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,29 @@ func (s *DataLayerService) Subscriptions(opts *DatalayerGetSubscriptionsOptions)

return r, resp, nil
}

// DatalayerGetOwnedStoresOptions Options for get_owned_stores
type DatalayerGetOwnedStoresOptions struct {}

// DatalayerGetOwnedStoresResponse Response for get_owned_stores
type DatalayerGetOwnedStoresResponse struct {
Response
StoreIDs []string `json:"store_ids"`
}

// GetOwnedStores RPC endpoint get_owned_stores
func (s *DataLayerService) GetOwnedStores(opts *DatalayerGetOwnedStoresOptions) (*DatalayerGetOwnedStoresResponse, *http.Response, error) {
request, err := s.NewRequest("get_owned_stores", opts)
if err != nil {
return nil, nil, err
}

r := &DatalayerGetOwnedStoresResponse{}

resp, err := s.Do(request, r)
if err != nil {
return nil, resp, err
}

return r, resp, nil
}

0 comments on commit 29c94e4

Please sign in to comment.