Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-03-01 09:15:35 +00:00
parent e259f67996
commit 0fed9fb4ae
27 changed files with 1302 additions and 1300 deletions

View File

@@ -4,34 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/location/api](
Endpoints:
## Read
Read an entity by its ID
[https://m3o.com/location/api#Read](https://m3o.com/location/api#Read)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/location"
)
// Read an entity by its ID
func GetLocationById() {
locationService := location.NewLocationService(os.Getenv("M3O_API_TOKEN"))
rsp, err := locationService.Read(&location.ReadRequest{
Id: "1",
})
fmt.Println(rsp, err)
}
```
## Search
Search for entities in a given radius
@@ -102,3 +74,31 @@ func SaveAnEntity() {
}
```
## Read
Read an entity by its ID
[https://m3o.com/location/api#Read](https://m3o.com/location/api#Read)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/location"
)
// Read an entity by its ID
func GetLocationById() {
locationService := location.NewLocationService(os.Getenv("M3O_API_TOKEN"))
rsp, err := locationService.Read(&location.ReadRequest{
Id: "1",
})
fmt.Println(rsp, err)
}
```