func (c *ClaimTreeClient) List(ctx context.Context, orgID *identity.ID,
	ownerID *identity.ID) ([]ClaimTree, error) {

	query := &url.Values{}
	if orgID != nil {
		query.Set("org_id", orgID.String())
	}

	if ownerID != nil {
		query.Set("owner_id", ownerID.String())
	}

	req, err := c.client.NewRequest("GET", "/claimtree", query, nil)
	if err != nil {
		log.Printf("Error building http request: %s", err)
		return nil, err
	}

	resp := []ClaimTree{}
	_, err = c.client.Do(ctx, req, &resp)
	if err != nil {
		return nil, err
	}

	return resp, nil
}
// List returns a list of all claimtrees for a given orgID. If no orgID is
// provided then it returns all claimtrees for every organization the user
// belongs too.
//
// If an ownerID is provided then only public keys and claims related to that
// user or machine will be returned.
List returns a list of all claimtrees for a given orgID. If no orgID is
provided then it returns all claimtrees for every organization the user
belongs too.

If an ownerID is provided then only public keys and claims related to that
user or machine will be returned.
// List returns a list of all claimtrees for a given orgID . If no orgID is // provided then it returns all claimtrees for every organization the user // belongs too . // // If an ownerID is provided then only public keys and claims related to that // user or machine will be returned .
func (c *ClaimTreeClient) List(ctx context.Context, orgID *identity.ID,
	ownerID *identity.ID) ([]ClaimTree, error) {
	query := &url.Values{}
	if orgID != nil {
		query.Set("org_id", orgID.String())
	}
	if ownerID != nil {
		query.Set("owner_id", ownerID.String())
	}
	req, err := c.client.NewRequest("GET", "/claimtree", query, nil)
	if err != nil {
		log.Printf("Error building http request: %s", err)
		return nil, err
	}
	resp := []ClaimTree{}
	_, err = c.client.Do(ctx, req, &resp)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func ( c * ClaimTreeClient ) List ( ctx context . Context , orgID * identity . ID , ownerID * identity . ID ) ( [ ] ClaimTree , error ) { query := & url . Values { } if orgID != nil { query . Set ( " " , orgID . String ( ) ) } if ownerID != nil { query . Set ( " " , ownerID . String ( ) ) } req , err := c . client . NewRequest ( " " , " " , query , nil ) if err != nil { log . Printf ( " " , err ) return nil , err } resp := [ ] ClaimTree { } _ , err = c . client . Do ( ctx , req , & resp ) if err != nil { return nil , err } return resp , nil }
List returns a list of all claimtrees for a given orgID.
List returns a list of all claimtrees for a given orgID .