Skip to content

Commit

Permalink
feat!: modified twilio.go
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Mar 11, 2024
1 parent ed17b11 commit 10abdbc
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 94 deletions.
85 changes: 44 additions & 41 deletions twilio.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
NotifyV1 "github.com/twilio/twilio-go/rest/notify/v1"
NumbersV1 "github.com/twilio/twilio-go/rest/numbers/v1"
NumbersV2 "github.com/twilio/twilio-go/rest/numbers/v2"
PreviewMessagingV1 "github.com/twilio/twilio-go/rest/preview_messaging/v1"
PricingV1 "github.com/twilio/twilio-go/rest/pricing/v1"
PricingV2 "github.com/twilio/twilio-go/rest/pricing/v2"
ProxyV1 "github.com/twilio/twilio-go/rest/proxy/v1"
Expand All @@ -62,47 +63,48 @@ import (
// RestClient provides access to Twilio services.
type RestClient struct {
*client.RequestHandler
AccountsV1 *AccountsV1.ApiService
Api *Api.ApiService
BulkexportsV1 *BulkexportsV1.ApiService
ChatV1 *ChatV1.ApiService
ChatV2 *ChatV2.ApiService
ChatV3 *ChatV3.ApiService
ContentV1 *ContentV1.ApiService
ConversationsV1 *ConversationsV1.ApiService
EventsV1 *EventsV1.ApiService
FlexV1 *FlexV1.ApiService
FlexV2 *FlexV2.ApiService
FrontlineV1 *FrontlineV1.ApiService
InsightsV1 *InsightsV1.ApiService
IntelligenceV2 *IntelligenceV2.ApiService
IpMessagingV1 *IpMessagingV1.ApiService
IpMessagingV2 *IpMessagingV2.ApiService
LookupsV1 *LookupsV1.ApiService
LookupsV2 *LookupsV2.ApiService
MediaV1 *MediaV1.ApiService
MessagingV1 *MessagingV1.ApiService
MicrovisorV1 *MicrovisorV1.ApiService
MonitorV1 *MonitorV1.ApiService
NotifyV1 *NotifyV1.ApiService
NumbersV1 *NumbersV1.ApiService
NumbersV2 *NumbersV2.ApiService
PricingV1 *PricingV1.ApiService
PricingV2 *PricingV2.ApiService
ProxyV1 *ProxyV1.ApiService
RoutesV2 *RoutesV2.ApiService
ServerlessV1 *ServerlessV1.ApiService
StudioV1 *StudioV1.ApiService
StudioV2 *StudioV2.ApiService
SupersimV1 *SupersimV1.ApiService
SyncV1 *SyncV1.ApiService
TaskrouterV1 *TaskrouterV1.ApiService
TrunkingV1 *TrunkingV1.ApiService
TrusthubV1 *TrusthubV1.ApiService
VerifyV2 *VerifyV2.ApiService
VideoV1 *VideoV1.ApiService
VoiceV1 *VoiceV1.ApiService
WirelessV1 *WirelessV1.ApiService
AccountsV1 *AccountsV1.ApiService
Api *Api.ApiService
BulkexportsV1 *BulkexportsV1.ApiService
ChatV1 *ChatV1.ApiService
ChatV2 *ChatV2.ApiService
ChatV3 *ChatV3.ApiService
ContentV1 *ContentV1.ApiService
ConversationsV1 *ConversationsV1.ApiService
EventsV1 *EventsV1.ApiService
FlexV1 *FlexV1.ApiService
FlexV2 *FlexV2.ApiService
FrontlineV1 *FrontlineV1.ApiService
InsightsV1 *InsightsV1.ApiService
IntelligenceV2 *IntelligenceV2.ApiService
IpMessagingV1 *IpMessagingV1.ApiService
IpMessagingV2 *IpMessagingV2.ApiService
LookupsV1 *LookupsV1.ApiService
LookupsV2 *LookupsV2.ApiService
MediaV1 *MediaV1.ApiService
PreviewMessagingV1 *PreviewMessagingV1.ApiService
MessagingV1 *MessagingV1.ApiService
MicrovisorV1 *MicrovisorV1.ApiService
MonitorV1 *MonitorV1.ApiService
NotifyV1 *NotifyV1.ApiService
NumbersV1 *NumbersV1.ApiService
NumbersV2 *NumbersV2.ApiService
PricingV1 *PricingV1.ApiService
PricingV2 *PricingV2.ApiService
ProxyV1 *ProxyV1.ApiService
RoutesV2 *RoutesV2.ApiService
ServerlessV1 *ServerlessV1.ApiService
StudioV1 *StudioV1.ApiService
StudioV2 *StudioV2.ApiService
SupersimV1 *SupersimV1.ApiService
SyncV1 *SyncV1.ApiService
TaskrouterV1 *TaskrouterV1.ApiService
TrunkingV1 *TrunkingV1.ApiService
TrusthubV1 *TrusthubV1.ApiService
VerifyV2 *VerifyV2.ApiService
VideoV1 *VideoV1.ApiService
VoiceV1 *VoiceV1.ApiService
WirelessV1 *WirelessV1.ApiService
}

// Meta holds relevant pagination resources.
Expand Down Expand Up @@ -174,6 +176,7 @@ func NewRestClientWithParams(params ClientParams) *RestClient {
c.LookupsV1 = LookupsV1.NewApiService(c.RequestHandler)
c.LookupsV2 = LookupsV2.NewApiService(c.RequestHandler)
c.MediaV1 = MediaV1.NewApiService(c.RequestHandler)
c.PreviewMessagingV1 = PreviewMessagingV1.NewApiService(c.RequestHandler)
c.MessagingV1 = MessagingV1.NewApiService(c.RequestHandler)
c.MicrovisorV1 = MicrovisorV1.NewApiService(c.RequestHandler)
c.MonitorV1 = MonitorV1.NewApiService(c.RequestHandler)
Expand Down
10 changes: 5 additions & 5 deletions twiml/messaging_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Messages(verbs []Element) (string, error) {
return ToXML(doc)
}

//MessagingRedirect <Redirect> TwiML Verb
// MessagingRedirect <Redirect> TwiML Verb
type MessagingRedirect struct {
// url: Redirect URL
// method: Redirect URL method
Expand Down Expand Up @@ -43,12 +43,12 @@ func (m MessagingRedirect) GetInnerElements() []Element {
return m.InnerElements
}

//MessagingMessage <Message> TwiML Verb
// MessagingMessage <Message> TwiML Verb
type MessagingMessage struct {
// body: Message Body
// to: Phone Number to send Message to
// from: Phone Number to send Message from
// action: Action URL
// action: A URL specifying where Twilio should send status callbacks for the created outbound message.
// method: Action URL Method
// status_callback: Status callback URL. Deprecated in favor of action.
// OptionalAttributes: additional attributes
Expand Down Expand Up @@ -85,7 +85,7 @@ func (m MessagingMessage) GetInnerElements() []Element {
return m.InnerElements
}

//MessagingMedia <Media> TwiML Noun
// MessagingMedia <Media> TwiML Noun
type MessagingMedia struct {
// url: Media URL
// OptionalAttributes: additional attributes
Expand All @@ -110,7 +110,7 @@ func (m MessagingMedia) GetInnerElements() []Element {
return m.InnerElements
}

//MessagingBody <Body> TwiML Noun
// MessagingBody <Body> TwiML Noun
type MessagingBody struct {
// message: Message Body
// OptionalAttributes: additional attributes
Expand Down
Loading

0 comments on commit 10abdbc

Please sign in to comment.