Change summary
lunatask/client.go | 25 +++++++++++++++++++++++++
lunatask/tasks.go | 16 ----------------
2 files changed, 25 insertions(+), 16 deletions(-)
Detailed changes
@@ -0,0 +1,25 @@
+// SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
+//
+// 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{},
+ }
+}
@@ -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"`