MCPcopy Create free account
hub / github.com/UiPath/uipathcli / GetFolderFeed

Method GetFolderFeed

utils/api/orchestrator_client.go:489–509  ·  view source on GitHub ↗
(folderId int)

Source from the content-addressed store, hash-verified

487}
488
489func (c OrchestratorClient) GetFolderFeed(folderId int) (string, error) {
490 request := c.createGetFolderFeedRequest(folderId)
491 client := network.NewHttpClient(c.logger, c.httpClientSettings())
492 response, err := client.Send(request)
493 if err != nil {
494 return "", err
495 }
496 defer func() { _ = response.Body.Close() }()
497 body, err := io.ReadAll(response.Body)
498 if err != nil {
499 return "", fmt.Errorf("Error reading response: %w", err)
500 }
501 if response.StatusCode != http.StatusOK {
502 return "", fmt.Errorf("Orchestrator returned status code '%v' and body '%v'", response.StatusCode, string(body))
503 }
504 feedId := string(body)
505 if feedId == "null" {
506 return "", nil
507 }
508 return strings.Trim(feedId, "\""), nil
509}
510
511func (c OrchestratorClient) createGetFolderFeedRequest(folderId int) *network.HttpRequest {
512 uri := c.newUriBuilder("/api/PackageFeeds/GetFolderFeed").

Callers 2

runTestsMethod · 0.95
publishMethod · 0.95

Calls 5

httpClientSettingsMethod · 0.95
SendMethod · 0.95
NewHttpClientFunction · 0.92
CloseMethod · 0.80

Tested by

no test coverage detected