@@ -46,9 +46,9 @@ type Client interface {
46
46
Request (v interface {}, method , path string , data interface {}) error
47
47
}
48
48
49
- // BasicClient is used to access API with a given key.
49
+ // DefaultClient is used to access API with a given key.
50
50
// Uses standard lib HTTP client internally, so should be reused instead of created as needed and it is safe for concurrent use.
51
- type BasicClient struct {
51
+ type DefaultClient struct {
52
52
AccessKey string // The API access key.
53
53
HTTPClient * http.Client // The HTTP client to send requests on.
54
54
DebugLog * log.Logger // Optional logger for debugging purposes.
@@ -73,8 +73,8 @@ func SetErrorReader(r errorReader) {
73
73
}
74
74
75
75
// New creates a new MessageBird client object.
76
- func New (accessKey string ) * BasicClient {
77
- return & BasicClient {
76
+ func New (accessKey string ) * DefaultClient {
77
+ return & DefaultClient {
78
78
AccessKey : accessKey ,
79
79
HTTPClient : & http.Client {
80
80
Timeout : httpClientTimeout ,
@@ -83,7 +83,7 @@ func New(accessKey string) *BasicClient {
83
83
}
84
84
85
85
// Request is for internal use only and unstable.
86
- func (c * BasicClient ) Request (v interface {}, method , path string , data interface {}) error {
86
+ func (c * DefaultClient ) Request (v interface {}, method , path string , data interface {}) error {
87
87
if ! strings .HasPrefix (path , "https://" ) && ! strings .HasPrefix (path , "http://" ) {
88
88
path = fmt .Sprintf ("%s/%s" , Endpoint , path )
89
89
}
0 commit comments