package tiktok

import (
	"git.rosy.net.cn/baseapi/platformapi"
	"net/http"
	"sync"
)

const (
	BaseURLTT             = "https://open.douyin.com" // 抖音
	BaseURL               = "https://open.snssdk.com" // 头条
	TiktokTokenUrl        = "oauth/access_token/"
	TiktokRefreshTokenUrl = "oauth/renew_refresh_token/"

	salt                = "TUsUuzcfWriQ8ZXUQOrxPcScjEGlgMSjJaDMCtVy" //京西菜市
	salt2               = "Ab25GOMdO2FukyGvgW8HtEzwQtBgNak6ffKUyebD" //京西到家
	ResponseCodeSuccess = "SUCCESS"
	ResponseCodeFail    = "FAIL"
)

type API struct {
	clientSecret string // 应用唯一标识对应的密钥
	clientKey    string // 应用唯一标识
	client       *http.Client
	config       *platformapi.APIConfig
	locker       sync.RWMutex
	msgToken     string // accessToken
	expiresIn    int64  // 过期时间
}
