media.go
changeset 138 23d3a518d0ad
parent 130 c450bb73f59a
child 162 68df3a01e1a7
--- a/media.go	Wed Apr 19 09:30:47 2017 +0200
+++ b/media.go	Wed Apr 19 10:43:38 2017 +0200
@@ -4,7 +4,7 @@
 Licensed under the MIT license.  Please see the LICENSE file is this directory.
 */
 
-package gondole
+package madon
 
 import (
 	"bytes"
@@ -19,7 +19,7 @@
 )
 
 // UploadMedia uploads the given file and returns an attachment
-func (g *Client) UploadMedia(filePath string) (*Attachment, error) {
+func (mc *Client) UploadMedia(filePath string) (*Attachment, error) {
 	var b bytes.Buffer
 
 	if filePath == "" {
@@ -43,7 +43,7 @@
 
 	w.Close()
 
-	req, err := g.prepareRequest("media", rest.Post, nil)
+	req, err := mc.prepareRequest("media", rest.Post, nil)
 	if err != nil {
 		return nil, fmt.Errorf("media prepareRequest failed: %s", err.Error())
 	}