Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unresolved and unreferenced symbols from plivo client struct #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 16 additions & 22 deletions plivoclient.go
Original file line number Diff line number Diff line change
@@ -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...)