package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Tags.List(ctx)
if err != nil {
log.Fatal(err)
}
if res.CustomTags != nil {
// handle response
}
}{
"data": [
{
"id": "tag_br3pyBM8YeIyBQGR0rbocVrmJnE",
"type": "tags",
"attributes": {
"name": "Angrod",
"slug": "angrod",
"description": "Dolorem vel distinctio et.",
"color": "#141515",
"team": {
"id": "team_RPp3R8oZyjSAGGP7oeMEsR8yPNgo",
"name": "627 Team",
"slug": "627-team",
"description": "627 Team",
"address": "977 Julietta Views, West Ocie, KS 10398-1982",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
]
}List all Tags in the team.
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Tags.List(ctx)
if err != nil {
log.Fatal(err)
}
if res.CustomTags != nil {
// handle response
}
}{
"data": [
{
"id": "tag_br3pyBM8YeIyBQGR0rbocVrmJnE",
"type": "tags",
"attributes": {
"name": "Angrod",
"slug": "angrod",
"description": "Dolorem vel distinctio et.",
"color": "#141515",
"team": {
"id": "team_RPp3R8oZyjSAGGP7oeMEsR8yPNgo",
"name": "627 Team",
"slug": "627-team",
"description": "627 Team",
"address": "977 Julietta Views, West Ocie, KS 10398-1982",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
]
}Was this page helpful?