add face recognition

This commit is contained in:
2025-01-22 10:36:28 +08:00
parent eab806fb9b
commit c6af9a0461
47 changed files with 3621 additions and 454 deletions

View File

@@ -0,0 +1,50 @@
package gao_map
import (
"fmt"
"testing"
)
const key = ""
const secret = ""
func TestDistricts(t *testing.T) {
client := NewAmapClient(key, secret)
resp, err := client.Location.ChinaDistricts()
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}
func TestIp(t *testing.T) {
client := NewAmapClient(key, secret)
resp, err := client.Location.IpLocation("121.224.33.99")
if err != nil {
t.Fatal(err)
}
fmt.Println(*resp)
}
func TestGeo(t *testing.T) {
client := NewAmapClient(key, secret)
resp, err := client.Location.Geo("乐东公园一品墅", "")
if err != nil {
t.Fatal(err)
}
fmt.Println(*resp)
}
func TestReGeo(t *testing.T) {
client := NewAmapClient(key, secret)
request := ReGeoRequest{Location: "118.567824,29.306175"}
resp, err := client.Location.ReGeo(&request)
if err != nil {
t.Fatal(err)
}
fmt.Println(*resp)
}