From 2033530e5c4ffd040763f1b8127596ed3913d48b Mon Sep 17 00:00:00 2001 From: Kristof Daja Date: Mon, 18 May 2020 23:31:48 +0200 Subject: [PATCH] Added WikiService --- client.go | 2 ++ wiki_pages.go | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 wiki_pages.go diff --git a/client.go b/client.go index 1086092..d4c3283 100644 --- a/client.go +++ b/client.go @@ -39,6 +39,7 @@ type Client struct { UserStory *UserStoryService User *UserService Webhook *WebhookService + Wiki *WikiService } // TODO: Pack Taiga operations into services, such as, ProjectService, EpicService, MilestoneService, etc... @@ -129,6 +130,7 @@ func (c *Client) Initialise(credentials *Credentials) error { c.UserStory = &UserStoryService{c} c.User = &UserService{c} c.Webhook = &WebhookService{c} + c.Wiki = &WikiService{c} user, err := c.Auth.login(credentials) if err != nil { diff --git a/wiki_pages.go b/wiki_pages.go deleted file mode 100644 index 433eeee..0000000 --- a/wiki_pages.go +++ /dev/null @@ -1,14 +0,0 @@ -package taigo - -var wikiURI = "/wiki" - -// WikiCreateAttachment creates a new Wiki attachment => https://taigaio.github.io/taiga-doc/dist/api.html#wiki-create-attachment -func WikiCreateAttachment(c *Client, attachment *Attachment, filePath string) (*Attachment, error) { - url := c.APIURL + wikiURI + "/attachments" - attachment.filePath = filePath - attachment, err := newfileUploadRequest(c, url, attachment) - if err != nil { - return nil, err - } - return attachment, nil -}