Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-03-01 16:46:43 +00:00
parent ca3f935e80
commit fa7dfe82c6
28 changed files with 1397 additions and 1395 deletions

View File

@@ -4,6 +4,33 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/postcode/api](
Endpoints:
## Random
Return a random postcode and its related info
[https://m3o.com/postcode/api#Random](https://m3o.com/postcode/api#Random)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/postcode"
)
// Return a random postcode and its related info
func ReturnArandomPostcodeAndItsInformation() {
postcodeService := postcode.NewPostcodeService(os.Getenv("M3O_API_TOKEN"))
rsp, err := postcodeService.Random(&postcode.RandomRequest{
})
fmt.Println(rsp, err)
}
```
## Validate
Validate a postcode.
@@ -60,30 +87,3 @@ func LookupPostcode() {
}
```
## Random
Return a random postcode and its related info
[https://m3o.com/postcode/api#Random](https://m3o.com/postcode/api#Random)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/postcode"
)
// Return a random postcode and its related info
func ReturnArandomPostcodeAndItsInformation() {
postcodeService := postcode.NewPostcodeService(os.Getenv("M3O_API_TOKEN"))
rsp, err := postcodeService.Random(&postcode.RandomRequest{
})
fmt.Println(rsp, err)
}
```