-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsearch.go
45 lines (41 loc) · 1 KB
/
search.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
package search
import (
app "github.com/TT527/app-store-search/App"
keyword "github.com/TT527/app-store-search/KeyWord"
itunes "github.com/TT527/app-store-search/iTunes"
)
func App2Json(term, country string, num int) (string, error) {
result, err := app.Sapp2Json(term, country, num)
if err != nil {
return "", err
}
return result, nil
}
func Itunes2Json(term, country string) (string, error) {
result, err := itunes.SiTunes2Json(term, country)
if err != nil {
return "", err
}
return result, nil
}
func Itunes(term, country string) ([]itunes.Result, error) {
result, err := itunes.SiTunes(term, country)
if err != nil {
return nil, err
}
return result, nil
}
func KeyWord2Json(term, country string) (string, error) {
result, err := keyword.Skeyword2Json(term, country)
if err != nil {
return "", err
}
return result, nil
}
func KeyWord(term, country string) (map[string]string, error) {
result, err := keyword.SkeyWord(term, country)
if err != nil {
return nil, err
}
return result, nil
}