mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -4,6 +4,34 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/ping/api](http
|
||||
|
||||
Endpoints:
|
||||
|
||||
## Ip
|
||||
|
||||
Ping an IP address
|
||||
|
||||
|
||||
[https://m3o.com/ping/api#Ip](https://m3o.com/ping/api#Ip)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/ping"
|
||||
)
|
||||
|
||||
// Ping an IP address
|
||||
func PingAnIp() {
|
||||
pingService := ping.NewPingService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := pingService.Ip(&ping.IpRequest{
|
||||
Address: "google.com",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
## Tcp
|
||||
|
||||
Ping a TCP port is open
|
||||
@@ -60,31 +88,3 @@ func CheckAurl() {
|
||||
|
||||
}
|
||||
```
|
||||
## Ip
|
||||
|
||||
Ping an IP address
|
||||
|
||||
|
||||
[https://m3o.com/ping/api#Ip](https://m3o.com/ping/api#Ip)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/ping"
|
||||
)
|
||||
|
||||
// Ping an IP address
|
||||
func PingAnIp() {
|
||||
pingService := ping.NewPingService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := pingService.Ip(&ping.IpRequest{
|
||||
Address: "google.com",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user