Initial AS213905 SDK release

This commit is contained in:
AS213905 Engineering
2026-08-14 11:06:03 +00:00
commit ff4aa1b64e
29 changed files with 3313 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package main
import (
"context"
"fmt"
"log"
"os"
as213905 "git.datacoria.com/Phylex/as213905-sdk/go/as213905"
)
func main() {
client := as213905.New(os.Getenv("AS213905_API_KEY"))
traffic, err := client.Traffic(context.Background(), &as213905.TrafficQuery{Days: 7})
if err != nil {
log.Fatal(err)
}
fmt.Printf("p95: %d kbit/s, volume: %.2f GB\n", traffic.P95Kbps, traffic.TotalGB)
}