From a5ad89d400d3e1e2404df6ce594d2dd819ad5af4 Mon Sep 17 00:00:00 2001 From: Nate Smith Date: Wed, 25 Dec 2019 09:23:14 -0800 Subject: [PATCH] removed unresolved and unreferenced symbols from plivo client struct --- plivoclient.go | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/plivoclient.go b/plivoclient.go index c1fc032..a77f628 100644 --- a/plivoclient.go +++ b/plivoclient.go @@ -5,34 +5,30 @@ import ( "net/http" "net/url" "os" - "time" "runtime" + "time" ) - const baseUrlString = "https://api.plivo.com/" const baseRequestString = "/v1/Account/%s/" - type Client struct { BaseClient - Messages *MessageService - Accounts *AccountService - Subaccounts *SubaccountService - Applications *ApplicationService - Endpoints *EndpointService - Numbers *NumberService - PhoneNumbers *PhoneNumberService - Pricing *PricingService // TODO Rename? - Recordings *RecordingService - Calls *CallService - LiveCalls *LiveCallService - QueuedCalls *QueuedCallService - Conferences *ConferenceService - Powerpack *PowerpackService - Addresses *AddressService - Identities *IdentityService + Messages *MessageService + Accounts *AccountService + Subaccounts *SubaccountService + Applications *ApplicationService + Endpoints *EndpointService + Numbers *NumberService + PhoneNumbers *PhoneNumberService + Pricing *PricingService // TODO Rename? + Recordings *RecordingService + Calls *CallService + LiveCalls *LiveCallService + QueuedCalls *QueuedCallService + Conferences *ConferenceService + Powerpack *PowerpackService RequestInterceptor func(request *http.Request) ResponseInterceptor func(response *http.Response) } @@ -91,13 +87,11 @@ func NewClient(authId, authToken string, options *ClientOptions) (client *Client client.QueuedCalls = &QueuedCallService{client: client} client.Conferences = &ConferenceService{client: client} client.Powerpack = &PowerpackService{client: client} - client.Addresses = &AddressService{client:client} - client.Identities = &IdentityService{client:client} return } func (client *Client) NewRequest(method string, params interface{}, formatString string, -formatParams ...interface{}) (*http.Request, error) { + formatParams ...interface{}) (*http.Request, error) { formatParams = append([]interface{}{client.AuthId}, formatParams...) formatString = fmt.Sprintf("%s/%s", "%s", formatString) return client.BaseClient.NewRequest(method, params, baseRequestString, formatString, formatParams...)