// NewClient with either http.Client or with pemFile and keyFile
NewClient with either http.Client or with pemFile and keyFile
// NewClient with either http . Client or with pemFile and keyFile
func NewClient(httpClient *http.Client, certPEMBlock, keyPEMBlock []byte, orgID *int64) (*Client, error) {
	if httpClient == nil {
		var err error
		httpClient, err = setClientWithCerts(certPEMBlock, keyPEMBlock)
		if err != nil {
			return nil, err
		}
	}
	baseURL, _ := url.Parse(defaultBaseURL)
	c := &Client{client: httpClient, BaseURL: baseURL, UserAgent: userAgent, OrgID: orgID}
	c.common.client = c
	c.Campaign = (*CampaignService)(&c.common)
	c.CampaignNegativeKeyword = (*CampaignNegativeKeywordService)(&c.common)
	c.AdGroup = (*AdGroupService)(&c.common)
	c.AdGroupNegativeKeyword = (*AdGroupNegativeKeywordService)(&c.common)
	c.AdGroupTargetingKeyword = (*AdGroupTargetingKeywordService)(&c.common)
	c.ACL = (*ACLService)(&c.common)
	c.Report = (*ReportService)(&c.common)
	return c, nil
}
func NewClient ( httpClient * http . Client , certPEMBlock , keyPEMBlock [ ] byte , orgID * int64 ) ( * Client , error ) { if httpClient == nil { var err error httpClient , err = setClientWithCerts ( certPEMBlock , keyPEMBlock ) if err != nil { return nil , err } } baseURL , _ := url . Parse ( defaultBaseURL ) c := & Client { client : httpClient , BaseURL : baseURL , UserAgent : userAgent , OrgID : orgID } c . common . client = c c . Campaign = ( * CampaignService ) ( & c . common ) c . CampaignNegativeKeyword = ( * CampaignNegativeKeywordService ) ( & c . common ) c . AdGroup = ( * AdGroupService ) ( & c . common ) c . AdGroupNegativeKeyword = ( * AdGroupNegativeKeywordService ) ( & c . common ) c . AdGroupTargetingKeyword = ( * AdGroupTargetingKeywordService ) ( & c . common ) c . ACL = ( * ACLService ) ( & c . common ) c . Report = ( * ReportService ) ( & c . common ) return c , nil }
NewClient with either http.Client or with pemFile and keyFile
NewClient with either http . Client or with pemFile and keyFile