api_keys.go
func (client *Client) CreateAPIKey(name string) (*APIKey, error) {
	toPost := struct {
		Name *string `json:"name,omitempty"`
	}{
		&name,
	}
	var out reqAPIKey
	if err := client.doJsonRequest("POST", "/v1/api_key", toPost, &out); err != nil {
		return nil, err
	}
	return out.APIKey, nil
}
func (client *Client) CreateAPIKey(name string) (*APIKey, error) {
	toPost := struct {
		Name *string `json:"name,omitempty"`
	}{
		&name,
	}
	var out reqAPIKey
	if err := client.doJsonRequest("POST", "/v1/api_key", toPost, &out); err != nil {
		return nil, err
	}
	return out.APIKey, nil
}
func ( client * Client ) CreateAPIKey ( name string ) ( * APIKey , error ) { toPost := struct { Name * string `json:"name,omitempty"` } { & name , } var out reqAPIKey if err := client . doJsonRequest ( " " , " " , toPost , & out ) ; err != nil { return nil , err } return out . APIKey , nil }
// CreateAPIKey creates an API key from given struct and fills the rest of its
// fields, or returns an error on failure
CreateAPIKey creates an API key from given struct and fills the rest of its fields or returns an error on failure