Delete removes from a collection the object having the given ID.
(ctx context.Context, collection, id string)
| 119 | |
| 120 | // Delete removes from a collection the object having the given ID. |
| 121 | func (c *CollectionsClient) Delete(ctx context.Context, collection, id string) (*BaseResponse, error) { |
| 122 | if collection == "" { |
| 123 | return nil, errors.New("collection name required") |
| 124 | } |
| 125 | endpoint := c.client.makeEndpoint("collections/%s/%s/", collection, id) |
| 126 | |
| 127 | return decode(c.client.delete(ctx, endpoint, nil, c.client.authenticator.collectionsAuth)) |
| 128 | } |
| 129 | |
| 130 | // CreateReference returns a new reference string in the form SO:<collection>:<id>. |
| 131 | func (c *CollectionsClient) CreateReference(collection, id string) string { |
nothing calls this directly
no test coverage detected