(ctx context.Context, orgSlug, serviceSlug string)
| 335 | } |
| 336 | |
| 337 | func (s *Session) GetService(ctx context.Context, orgSlug, serviceSlug string) (*Service, error) { |
| 338 | var svc Service |
| 339 | if err := s.get(ctx, getServicePath(orgSlug, serviceSlug), &svc); err != nil { |
| 340 | if errors.Is(err, NotFoundErr) { |
| 341 | return nil, nil |
| 342 | } |
| 343 | return nil, err |
| 344 | } |
| 345 | return &svc, nil |
| 346 | } |
| 347 | |
| 348 | func (s *Session) get(ctx context.Context, uri string, out any) error { |
| 349 | req, err := http.NewRequestWithContext(ctx, "GET", uri, nil) |