MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / ListCollectionItems

Method ListCollectionItems

internal/cli/client.go:224–231  ·  view source on GitHub ↗

ListCollectionItems returns items within a specific collection.

(wsSlug, collSlug string, params url.Values)

Source from the content-addressed store, hash-verified

222
223// ListCollectionItems returns items within a specific collection.
224func (c *Client) ListCollectionItems(wsSlug, collSlug string, params url.Values) ([]models.Item, error) {
225 var result []models.Item
226 path := "/workspaces/" + wsSlug + "/collections/" + collSlug + "/items"
227 if len(params) > 0 {
228 path += "?" + params.Encode()
229 }
230 return result, c.get(path, &result)
231}
232
233func (c *Client) CreateItem(wsSlug, collSlug string, input models.ItemCreate) (*models.Item, error) {
234 var result models.Item

Callers 2

githubStatusCmdFunction · 0.80
listCmdFunction · 0.80

Calls 2

getMethod · 0.95
EncodeMethod · 0.65

Tested by

no test coverage detected