Get retrieves a collection object having the given ID.
(ctx context.Context, collection, id string)
| 96 | |
| 97 | // Get retrieves a collection object having the given ID. |
| 98 | func (c *CollectionsClient) Get(ctx context.Context, collection, id string) (*CollectionObjectResponse, error) { |
| 99 | if collection == "" { |
| 100 | return nil, errors.New("collection name required") |
| 101 | } |
| 102 | endpoint := c.client.makeEndpoint("collections/%s/%s/", collection, id) |
| 103 | |
| 104 | return c.decodeObject(c.client.get(ctx, endpoint, nil, c.client.authenticator.collectionsAuth)) |
| 105 | } |
| 106 | |
| 107 | // Update updates the given collection object's data. |
| 108 | func (c *CollectionsClient) Update(ctx context.Context, collection, id string, data map[string]any) (*CollectionObjectResponse, error) { |
nothing calls this directly
no test coverage detected