-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathurl.go
53 lines (44 loc) · 1.63 KB
/
url.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package luis
const (
//LuisURL :Basic URL (V1.0)
LuisURL string = "https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/"
// {ap/pId}/versions/{versionId}/example
//LuisAPIIntents :API Intent List
LuisAPIIntents string = "intents"
//LuisAPIActionChannels :API Action Channels
LuisAPIActionChannels string = "actionChannels"
//LuisAPIPredict :API Predict
LuisAPIPredict string = "predict"
//LuisAPITrain :API Train
LuisAPITrain string = "train"
//LuisAPIAddExample :API Add Label
LuisAPIAddExample string = "example"
//LuisAPIPublish :API Publish your application
LuisAPIPublish string = "publish"
//LuisAPIVersion :API Get application version
LuisAPIVersion string = "version"
)
func getAppInfo(appid string) string {
return LuisURL + appid
}
func getIntentListURL(apid string, versionid string) string {
return LuisURL + apid + "/versions/" + versionid + "/" + LuisAPIIntents
}
func getActionChannels(apid string, versionid string) string {
return LuisURL + apid + "/versions/" + versionid + "/" + LuisAPIActionChannels
}
func getPredictURL(apid string, versionid string) string {
return "https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/" + apid
}
func getTrainURL(apid string, versionid string) string {
return LuisURL + apid + "/versions/" + versionid + "/" + LuisAPITrain
}
func getAddExampleURL(apid string, versionid string) string {
return LuisURL + apid + "/versions/" + versionid + "/" + LuisAPIAddExample
}
func getPublishURL(apid string, versionid string) string {
return LuisURL + apid + "/" + LuisAPIPublish
}
func getVersionURL(apid string, versionid string) string {
return LuisURL + apid + "/versions/"
}