Conversation
|
Hi, thanks very much for submitting this, apologies I haven't gotten to this yet. |
http.go
Outdated
| return c | ||
| } | ||
|
|
||
| // NewServiceResource returns a new Client to use Service Resource API |
There was a problem hiding this comment.
use the*
Can you link to documentation here?
service_resource_test.go
Outdated
| t.Parallel() | ||
| client, server := getServer(messagingResourceResponse) | ||
| defer server.Close() | ||
| msr, err := client.Resource.ServiceResourceService.Fetch(context.Background(), "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") |
There was a problem hiding this comment.
Could we change this to client.Messaging.ServiceResources.Fetch or similar?
There was a problem hiding this comment.
Unfortunately Messaging field exists in Client structure, so I changed ServiceResourceService to just ServiceResources.
I understand that Resource name is very generic one but I could not fine suitable name.
Maybe we can use Copilot name as it is main feature of the Messaging services. What do you think?
service_resource.go
Outdated
| // Fetch a service resource | ||
| // | ||
| // https://www.twilio.com/docs/sms/services/api#fetch-a-service-resource | ||
| func (s *MessagingService) Fetch(ctx context.Context, sid string) (*MessagingResource, error) { |
service_resource.go
Outdated
| // Fetch a phone number resource for messaging service | ||
| // | ||
| // https://www.twilio.com/docs/sms/services/api/phonenumber-resource#fetch-a-phonenumber-resource | ||
| func (s *PhoneNumberService) Fetch(ctx context.Context, serviceSID, sid string) (*PhoneNumberResource, error) { |
There was a problem hiding this comment.
Ditto here, we don't use Fetch() anywhere else in the API.
service_resource.go
Outdated
| AlphaSenders []*AlphaSenderResource `json:"alpha_senders"` | ||
| } | ||
|
|
||
| // Create a alpha sender resource for messaging service |
http.go
Outdated
| c.APIVersion = ServiceResourceVersion | ||
| c.ServiceResourceService = &ServiceResourceService{ | ||
| MessagingService: &MessagingService{c}, | ||
| PhoneNumber: &PhoneNumberService{c}, |
There was a problem hiding this comment.
Generally these are plural elsewhere in the API... PhoneNumbers, AlphaSenders, ShortCodes.
| @@ -0,0 +1,140 @@ | |||
| package twilio | |||
|
Hi @kevinburke I've updated the PR according to your comments apart from Messaging Service client name |
|
Could we get this updated to master and something finalized? I really want to use this in a terraform provider and I'm having to use a custom version of everything. |
|
I'll try to take a look at this, but to be clear, I don't get paid to maintain this project so I review and merge changes when I have time. |
|
Just out of curiosity, have you ever approached Twilio developer evangelists about them providing you with official support? |
|
Yes, we chat about it every six months or so, they haven't expressed any interest in doing it. Kevin |
|
@YReshetko can you resolve the conflicts here? |
Hello @kevinburke
We would like to have messaging service support in the framework
https://www.twilio.com/docs/sms/services/api