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

Method ListCollectionItems

internal/cli/client.go:225–232  ·  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

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