Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-09 15:06:12 +00:00
parent 92edd2c7df
commit f6a6c065b1
176 changed files with 918 additions and 1077 deletions

View File

@@ -4,6 +4,33 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Time/api](http
Endpoints:
## Now
Get the current time
[https://m3o.com/time/api#Now](https://m3o.com/time/api#Now)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/time"
)
// Get the current time
func ReturnsCurrentTimeOptionallyWithLocation() {
timeService := time.NewTimeService(os.Getenv("M3O_API_TOKEN"))
rsp, err := timeService.Now(&time.NowRequest{
})
fmt.Println(rsp, err)
}
```
## Zone
Get the timezone info for a specific location
@@ -32,30 +59,3 @@ func GetTheTimezoneInfoForAspecificLocation() {
}
```
## Now
Get the current time
[https://m3o.com/time/api#Now](https://m3o.com/time/api#Now)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/time"
)
// Get the current time
func ReturnsCurrentTimeOptionallyWithLocation() {
timeService := time.NewTimeService(os.Getenv("M3O_API_TOKEN"))
rsp, err := timeService.Now(&time.NowRequest{
})
fmt.Println(rsp, err)
}
```

View File

@@ -12,5 +12,4 @@ func main() {
timeService := time.NewTimeService(os.Getenv("M3O_API_TOKEN"))
rsp, err := timeService.Now(&time.NowRequest{})
fmt.Println(rsp, err)
}

View File

@@ -14,5 +14,4 @@ func main() {
Location: "London",
})
fmt.Println(rsp, err)
}