- add callbackURL for mtwm api
This commit is contained in:
@@ -36,22 +36,24 @@ const (
|
||||
)
|
||||
|
||||
type API struct {
|
||||
appID string
|
||||
secret string
|
||||
client *http.Client
|
||||
config *platformapi.APIConfig
|
||||
appID string
|
||||
secret string
|
||||
callbackURL string
|
||||
client *http.Client
|
||||
config *platformapi.APIConfig
|
||||
}
|
||||
|
||||
func New(appID, secret string, config ...*platformapi.APIConfig) *API {
|
||||
func New(appID, secret, callbackURL string, config ...*platformapi.APIConfig) *API {
|
||||
curConfig := platformapi.DefAPIConfig
|
||||
if len(config) > 0 {
|
||||
curConfig = *config[0]
|
||||
}
|
||||
return &API{
|
||||
appID: appID,
|
||||
secret: secret,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
config: &curConfig,
|
||||
appID: appID,
|
||||
secret: secret,
|
||||
callbackURL: callbackURL,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
config: &curConfig,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user