Find a record by property value
client.Prism.Objects.Events.Find(ctx, slug, value, params) (*PrismObjectEventFindResponse, error)
GET/v2/prism/{teamId}/event/by/{slug}/{value}
Returns the single record whose property {slug} equals {value}. 404 if nothing matches; 409 if more than one record matches.
Find a record by property value
package main
import (
"context"
"fmt"
"github.com/micro-so/micro-sdk-go"
"github.com/micro-so/micro-sdk-go/option"
)
func main() {
client := micro.NewClient(
option.WithAPIKey("My API Key"),
option.WithTeamID("My Team ID"),
)
response, err := client.Prism.Objects.Events.Find(
context.TODO(),
"slug",
"value",
micro.PrismObjectEventFindParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"default": {
"foo": "bar"
},
"list": {}
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"default": {
"foo": "bar"
},
"list": {}
}