diff --git a/lunatask/client.go b/lunatask/client.go new file mode 100644 index 0000000000000000000000000000000000000000..d643891b38dd84537d072172d163a68b5fa07f1d --- /dev/null +++ b/lunatask/client.go @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: Amolith +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +package lunatask + +import ( + "net/http" +) + +// Client handles communication with the Lunatask API +type Client struct { + AccessToken string + BaseURL string + HTTPClient *http.Client +} + +// NewClient creates a new Lunatask API client +func NewClient(accessToken string) *Client { + return &Client{ + AccessToken: accessToken, + BaseURL: "https://api.lunatask.app/v1", + HTTPClient: &http.Client{}, + } +} diff --git a/lunatask/tasks.go b/lunatask/tasks.go index daa35329cd28282c3bda3cba5679c3a7016cccbc..c87b077fbc7ee13795ee76da41241304d7ffb431 100644 --- a/lunatask/tasks.go +++ b/lunatask/tasks.go @@ -17,22 +17,6 @@ import ( "github.com/go-playground/validator/v10" ) -// Client handles communication with the Lunatask API -type Client struct { - AccessToken string - BaseURL string - HTTPClient *http.Client -} - -// NewClient creates a new Lunatask API client -func NewClient(accessToken string) *Client { - return &Client{ - AccessToken: accessToken, - BaseURL: "https://api.lunatask.app/v1", - HTTPClient: &http.Client{}, - } -} - // Source represents a task source like GitHub or other integrations type Source struct { Source string `json:"source"`