Skip to content

Commit 2c1a437

Browse files
committed
am i going too far on the initialism fixes?
1 parent a09e35f commit 2c1a437

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

imessage/bluebubbles/api.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (bb *blueBubbles) connectAndListen() error {
116116
}
117117

118118
func (bb *blueBubbles) connectToWebSocket() (*websocket.Conn, error) {
119-
ws, _, err := websocket.DefaultDialer.Dial(bb.wsUrl(), nil)
119+
ws, _, err := websocket.DefaultDialer.Dial(bb.wsURL(), nil)
120120
if err != nil {
121121
return nil, err
122122
}
@@ -1211,7 +1211,7 @@ func (bb *blueBubbles) CreateGroup(users []string) (*imessage.CreateGroupRespons
12111211

12121212
// Helper functions
12131213

1214-
func (bb *blueBubbles) wsUrl() string {
1214+
func (bb *blueBubbles) wsURL() string {
12151215
u, err := url.Parse(strings.Replace(bb.bridge.GetConnectorConfig().BlueBubblesURL, "http", "ws", 1))
12161216
if err != nil {
12171217
bb.log.Error().Err(err).Msg("Error parsing BlueBubbles URL")
@@ -1232,7 +1232,7 @@ func (bb *blueBubbles) wsUrl() string {
12321232
return url
12331233
}
12341234

1235-
func (bb *blueBubbles) apiUrl(path string, queryParams map[string]string) string {
1235+
func (bb *blueBubbles) APIURL(path string, queryParams map[string]string) string {
12361236
u, err := url.Parse(bb.bridge.GetConnectorConfig().BlueBubblesURL)
12371237
if err != nil {
12381238
bb.log.Error().Err(err).Msg("Error parsing BlueBubbles URL")
@@ -1257,7 +1257,7 @@ func (bb *blueBubbles) apiUrl(path string, queryParams map[string]string) string
12571257
}
12581258

12591259
func (bb *blueBubbles) apiGet(path string, queryParams map[string]string, target interface{}) (err error) {
1260-
url := bb.apiUrl(path, queryParams)
1260+
url := bb.APIURL(path, queryParams)
12611261

12621262
bb.bbRequestLock.Lock()
12631263
response, err := http.Get(url)
@@ -1291,7 +1291,7 @@ func (bb *blueBubbles) apiDelete(path string, payload interface{}, target interf
12911291
}
12921292

12931293
func (bb *blueBubbles) apiRequest(method, path string, payload interface{}, target interface{}) (err error) {
1294-
url := bb.apiUrl(path, map[string]string{})
1294+
url := bb.APIURL(path, map[string]string{})
12951295

12961296
var payloadJSON []byte
12971297
if payload != nil {
@@ -1335,7 +1335,7 @@ func (bb *blueBubbles) apiRequest(method, path string, payload interface{}, targ
13351335
}
13361336

13371337
func (bb *blueBubbles) apiPostAsFormData(path string, formData map[string]interface{}, target interface{}) error {
1338-
url := bb.apiUrl(path, map[string]string{})
1338+
url := bb.APIURL(path, map[string]string{})
13391339

13401340
// Create a new buffer to store the file content
13411341
var body bytes.Buffer
@@ -1545,7 +1545,7 @@ func (bb *blueBubbles) downloadAttachment(guid string) (attachment *imessage.Att
15451545
return nil, err
15461546
}
15471547

1548-
url := bb.apiUrl(fmt.Sprintf("/api/v1/attachment/%s/download", guid), map[string]string{})
1548+
url := bb.APIURL(fmt.Sprintf("/api/v1/attachment/%s/download", guid), map[string]string{})
15491549

15501550
response, err := http.Get(url)
15511551
if err != nil {

0 commit comments

Comments
 (0)