Skip to content

Commit 3cb4069

Browse files
committed
fix: restructure
1 parent da6a634 commit 3cb4069

File tree

64 files changed

+179
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+179
-268
lines changed
File renamed without changes.

v3/client/client.go renamed to axm/client/client.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"time"
77

8-
"github.com/deploymenttheory/go-api-sdk-apple/v3/interfaces"
8+
"github.com/deploymenttheory/go-api-sdk-apple/axm/interfaces"
99
"go.uber.org/zap"
1010
"resty.dev/v3"
1111
)
@@ -38,8 +38,8 @@ type APIResponse[T any] struct {
3838
Links Links `json:"links"`
3939
}
4040

41-
// NewClient creates a new Apple Business Manager API client with embedded services
42-
func NewClient(config Config) (*Client, error) {
41+
// NewTransport creates a new HTTP transport for Apple Business Manager API
42+
func NewTransport(config Config) (*Client, error) {
4343
if config.BaseURL == "" {
4444
config.BaseURL = "https://api-business.apple.com/v1"
4545
}
@@ -142,9 +142,9 @@ func (c *Client) Close() error {
142142
return nil
143143
}
144144

145-
// NewClientFromEnv creates a client using environment variables
145+
// NewTransportFromEnv creates a transport using environment variables
146146
// Expects: APPLE_KEY_ID, APPLE_ISSUER_ID, APPLE_PRIVATE_KEY_PATH
147-
func NewClientFromEnv() (*Client, error) {
147+
func NewTransportFromEnv() (*Client, error) {
148148
keyID := os.Getenv("APPLE_KEY_ID")
149149
issuerID := os.Getenv("APPLE_ISSUER_ID")
150150
privateKeyPath := os.Getenv("APPLE_PRIVATE_KEY_PATH")
@@ -178,11 +178,11 @@ func NewClientFromEnv() (*Client, error) {
178178
UserAgent: "go-api-sdk-apple/3.0.0",
179179
}
180180

181-
return NewClient(config)
181+
return NewTransport(config)
182182
}
183183

184-
// NewClientFromFile creates a client using credentials from files
185-
func NewClientFromFile(keyID, issuerID, privateKeyPath string) (*Client, error) {
184+
// NewTransportFromFile creates a transport using credentials from files
185+
func NewTransportFromFile(keyID, issuerID, privateKeyPath string) (*Client, error) {
186186
if keyID == "" {
187187
return nil, fmt.Errorf("keyID is required")
188188
}
@@ -212,5 +212,5 @@ func NewClientFromFile(keyID, issuerID, privateKeyPath string) (*Client, error)
212212
UserAgent: "go-api-sdk-apple/3.0.0",
213213
}
214214

215-
return NewClient(config)
215+
return NewTransport(config)
216216
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

v3/client/pagination.go renamed to axm/client/pagination.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"maps"
88
"net/url"
99

10-
"github.com/deploymenttheory/go-api-sdk-apple/v3/interfaces"
10+
"github.com/deploymenttheory/go-api-sdk-apple/axm/interfaces"
1111
)
1212

1313
// Meta contains pagination metadata matching Apple's API format

v3/client/query.go renamed to axm/client/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"strconv"
55
"time"
66

7-
"github.com/deploymenttheory/go-api-sdk-apple/v3/interfaces"
7+
"github.com/deploymenttheory/go-api-sdk-apple/axm/interfaces"
88
)
99

1010
// QueryBuilder provides a fluent interface for building query parameters
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)