Skip to content

Commit a367537

Browse files
committed
Undo path rename for now
1 parent acee8c5 commit a367537

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

voicemessage/voice_message.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ type voiceMessageRequest struct {
5858
ScheduledDatetime string `json:"scheduledDatetime,omitempty"`
5959
}
6060

61-
// path represents the path to the VoiceMessage resource.
62-
const path = "voicemessages"
61+
// VoiceMessagePath represents the VoiceMessagePath to the VoiceMessage resource.
62+
const VoiceMessagePath = "voicemessages"
6363

6464
// Read retrieves the information of an existing VoiceMessage.
6565
func Read(c *messagebird.Client, id string) (*VoiceMessage, error) {
6666
message := &VoiceMessage{}
67-
if err := c.Request(message, http.MethodGet, path+"/"+id, nil); err != nil {
67+
if err := c.Request(message, http.MethodGet, VoiceMessagePath+"/"+id, nil); err != nil {
6868
return nil, err
6969
}
7070

@@ -74,7 +74,7 @@ func Read(c *messagebird.Client, id string) (*VoiceMessage, error) {
7474
// List retrieves all VoiceMessages of the user.
7575
func List(c *messagebird.Client) (*VoiceMessageList, error) {
7676
messageList := &VoiceMessageList{}
77-
if err := c.Request(messageList, http.MethodGet, path, nil); err != nil {
77+
if err := c.Request(messageList, http.MethodGet, VoiceMessagePath, nil); err != nil {
7878
return nil, err
7979
}
8080

@@ -89,7 +89,7 @@ func Create(c *messagebird.Client, recipients []string, body string, params *Voi
8989
}
9090

9191
message := &VoiceMessage{}
92-
if err := c.Request(message, http.MethodPost, path, requestData); err != nil {
92+
if err := c.Request(message, http.MethodPost, VoiceMessagePath, requestData); err != nil {
9393
return nil, err
9494
}
9595

0 commit comments

Comments
 (0)