bunnyshell.com/sdk@v0.16.0/docs/TemplatesRepositoryAPI.md (about) 1 # \TemplatesRepositoryAPI 2 3 All URIs are relative to *https://api.environments.bunnyshell.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**TemplatesRepositoryList**](TemplatesRepositoryAPI.md#TemplatesRepositoryList) | **Get** /v1/templates_repositories | List templates repositories matching any selected filters. 8 [**TemplatesRepositoryView**](TemplatesRepositoryAPI.md#TemplatesRepositoryView) | **Get** /v1/templates_repositories/{id} | View a specific templates repository. 9 10 11 12 ## TemplatesRepositoryList 13 14 > PaginatedTemplatesRepositoryCollection TemplatesRepositoryList(ctx).Page(page).Organization(organization).Execute() 15 16 List templates repositories matching any selected filters. 17 18 19 20 ### Example 21 22 ```go 23 package main 24 25 import ( 26 "context" 27 "fmt" 28 "os" 29 openapiclient "bunnyshell.com/sdk" 30 ) 31 32 func main() { 33 page := int32(56) // int32 | The collection page number (optional) (default to 1) 34 organization := "organization_example" // string | Filter by organization (optional) 35 36 configuration := openapiclient.NewConfiguration() 37 apiClient := openapiclient.NewAPIClient(configuration) 38 resp, r, err := apiClient.TemplatesRepositoryAPI.TemplatesRepositoryList(context.Background()).Page(page).Organization(organization).Execute() 39 if err != nil { 40 fmt.Fprintf(os.Stderr, "Error when calling `TemplatesRepositoryAPI.TemplatesRepositoryList``: %v\n", err) 41 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 42 } 43 // response from `TemplatesRepositoryList`: PaginatedTemplatesRepositoryCollection 44 fmt.Fprintf(os.Stdout, "Response from `TemplatesRepositoryAPI.TemplatesRepositoryList`: %v\n", resp) 45 } 46 ``` 47 48 ### Path Parameters 49 50 51 52 ### Other Parameters 53 54 Other parameters are passed through a pointer to a apiTemplatesRepositoryListRequest struct via the builder pattern 55 56 57 Name | Type | Description | Notes 58 ------------- | ------------- | ------------- | ------------- 59 **page** | **int32** | The collection page number | [default to 1] 60 **organization** | **string** | Filter by organization | 61 62 ### Return type 63 64 [**PaginatedTemplatesRepositoryCollection**](PaginatedTemplatesRepositoryCollection.md) 65 66 ### Authorization 67 68 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 69 70 ### HTTP request headers 71 72 - **Content-Type**: Not defined 73 - **Accept**: application/hal+json, application/problem+json 74 75 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 76 [[Back to Model list]](../README.md#documentation-for-models) 77 [[Back to README]](../README.md) 78 79 80 ## TemplatesRepositoryView 81 82 > TemplatesRepositoryItem TemplatesRepositoryView(ctx, id).Execute() 83 84 View a specific templates repository. 85 86 87 88 ### Example 89 90 ```go 91 package main 92 93 import ( 94 "context" 95 "fmt" 96 "os" 97 openapiclient "bunnyshell.com/sdk" 98 ) 99 100 func main() { 101 id := "id_example" // string | Resource identifier 102 103 configuration := openapiclient.NewConfiguration() 104 apiClient := openapiclient.NewAPIClient(configuration) 105 resp, r, err := apiClient.TemplatesRepositoryAPI.TemplatesRepositoryView(context.Background(), id).Execute() 106 if err != nil { 107 fmt.Fprintf(os.Stderr, "Error when calling `TemplatesRepositoryAPI.TemplatesRepositoryView``: %v\n", err) 108 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 109 } 110 // response from `TemplatesRepositoryView`: TemplatesRepositoryItem 111 fmt.Fprintf(os.Stdout, "Response from `TemplatesRepositoryAPI.TemplatesRepositoryView`: %v\n", resp) 112 } 113 ``` 114 115 ### Path Parameters 116 117 118 Name | Type | Description | Notes 119 ------------- | ------------- | ------------- | ------------- 120 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 121 **id** | **string** | Resource identifier | 122 123 ### Other Parameters 124 125 Other parameters are passed through a pointer to a apiTemplatesRepositoryViewRequest struct via the builder pattern 126 127 128 Name | Type | Description | Notes 129 ------------- | ------------- | ------------- | ------------- 130 131 132 ### Return type 133 134 [**TemplatesRepositoryItem**](TemplatesRepositoryItem.md) 135 136 ### Authorization 137 138 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 139 140 ### HTTP request headers 141 142 - **Content-Type**: Not defined 143 - **Accept**: application/hal+json, application/problem+json 144 145 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 146 [[Back to Model list]](../README.md#documentation-for-models) 147 [[Back to README]](../README.md) 148