func (k *KeyPairs) List(ctx context.Context, orgID *identity.ID) ([]ClaimedKeyPair, error) {
	query := &url.Values{}
	if orgID != nil {
		query.Set("org_id", orgID.String())
	}

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

	resp := []ClaimedKeyPair{}
	_, err = k.client.Do(ctx, req, &resp)
	if err != nil {
		log.Printf("Failed to retrieve keypairs: %s", err)
		return nil, err
	}

	return resp, nil
}
// List returns all KeyPairs for the logged in user in the given, or all orgs
// if orgID is nil.
List returns all KeyPairs for the logged in user in the given, or all orgs
if orgID is nil.
// List returns all KeyPairs for the logged in user in the given or all orgs // if orgID is nil .
func (k *KeyPairs) List(ctx context.Context, orgID *identity.ID) ([]ClaimedKeyPair, error) {
	query := &url.Values{}
	if orgID != nil {
		query.Set("org_id", orgID.String())
	}
	req, err := k.client.NewRequest("GET", "/keypairs", query, nil)
	if err != nil {
		log.Printf("Error building http request: %s", err)
		return nil, err
	}
	resp := []ClaimedKeyPair{}
	_, err = k.client.Do(ctx, req, &resp)
	if err != nil {
		log.Printf("Failed to retrieve keypairs: %s", err)
		return nil, err
	}
	return resp, nil
}
func ( k * KeyPairs ) List ( ctx context . Context , orgID * identity . ID ) ( [ ] ClaimedKeyPair , error ) { query := & url . Values { } if orgID != nil { query . Set ( " " , orgID . String ( ) ) } req , err := k . client . NewRequest ( " " , " " , query , nil ) if err != nil { log . Printf ( " " , err ) return nil , err } resp := [ ] ClaimedKeyPair { } _ , err = k . client . Do ( ctx , req , & resp ) if err != nil { log . Printf ( " " , err ) return nil , err } return resp , nil }
List returns all KeyPairs for the logged in user in the given, or all orgs
if orgID is nil.
List returns all KeyPairs for the logged in user in the given or all orgs if orgID is nil .