<commit_before>package gocca

import (
	"github.com/cloud-ca/go-cloudca/services/cloudca"
	"github.com/cloud-ca/go-cloudca/services"
	"github.com/cloud-ca/go-cloudca/api"
)

const (
	DEFAULT_API_URL = "https://api.cloud.ca/v1/"
)

type CcaClient struct {
	apiURL string
	apiKey string
	apiClient api.CcaApiClient
	Tasks services.TaskService
}

func NewCcaClient(apiKey string) *CcaClient {
	return NewCCAClientWithCustomURL(DEFAULT_API_URL, apiKey)
}

func NewCcaClientWithCustomURL(apiURL string, apiKey string) *CcaClient {
	apiClient := api.NewApiClient(apiURL, apiKey)
	ccaClient := CcaClient{
		apiURL: apiURL,
		apiKey: apiKey,
		apiClient: apiClient,
		Tasks: services.NewTaskService(apiClient),
	}
	return &ccaClient
}

//Get the Resources for a specific serviceCode and environmentName
//For now it assumes that the serviceCode belongs to a cloud.ca service
func (c CcaClient) GetResources(serviceCode string, environmentName string) services.ServiceResources {
	//TODO: change to check service type of service code
	return cloudca.NewResources(c.apiClient, serviceCode, environmentName)
}

func (c CcaClient) GetApiURL() string {
	return c.apiURL
}

func (c CcaClient) GetApiKey() string {
	return c.apiKey
}


func (c CcaClient) GetApiClient() api.CcaApiClient {
	return c.apiClient
}
<commit_msg>Renamed NewCcaClientWithCustomURL<commit_after>package gocca

import (
	"github.com/cloud-ca/go-cloudca/services/cloudca"
	"github.com/cloud-ca/go-cloudca/services"
	"github.com/cloud-ca/go-cloudca/api"
)

const (
	DEFAULT_API_URL = "https://api.cloud.ca/v1/"
)

type CcaClient struct {
	apiURL string
	apiKey string
	apiClient api.CcaApiClient
	Tasks services.TaskService
}

func NewCcaClient(apiKey string) *CcaClient {
	return NewCcaClientWithURL(DEFAULT_API_URL, apiKey)
}

func NewCcaClientWithURL(apiURL string, apiKey string) *CcaClient {
	apiClient := api.NewApiClient(apiURL, apiKey)
	ccaClient := CcaClient{
		apiURL: apiURL,
		apiKey: apiKey,
		apiClient: apiClient,
		Tasks: services.NewTaskService(apiClient),
	}
	return &ccaClient
}

//Get the Resources for a specific serviceCode and environmentName
//For now it assumes that the serviceCode belongs to a cloud.ca service
func (c CcaClient) GetResources(serviceCode string, environmentName string) services.ServiceResources {
	//TODO: change to check service type of service code
	return cloudca.NewResources(c.apiClient, serviceCode, environmentName)
}

func (c CcaClient) GetApiURL() string {
	return c.apiURL
}

func (c CcaClient) GetApiKey() string {
	return c.apiKey
}


func (c CcaClient) GetApiClient() api.CcaApiClient {
	return c.apiClient
}

{'fraction_non_alphanumeric': 0.09230769230769231, 'fraction_numerical': 0.0007326007326007326, 'mean_word_length': 4.133458646616542, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3035415', 'n_tokens_mistral': 956, 'n_tokens_neox': 918, 'n_words': 223}