pulp_hugging_face_client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +176 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +18 -0
- data/docs/ContentHuggingFaceApi.md +424 -0
- data/docs/ContentSummaryResponse.md +22 -0
- data/docs/DistributionsHuggingFaceApi.md +671 -0
- data/docs/HuggingFaceHuggingFaceContent.md +36 -0
- data/docs/HuggingFaceHuggingFaceContentResponse.md +42 -0
- data/docs/HuggingFaceHuggingFaceDistribution.md +32 -0
- data/docs/HuggingFaceHuggingFaceDistributionResponse.md +44 -0
- data/docs/HuggingFaceHuggingFacePublication.md +20 -0
- data/docs/HuggingFaceHuggingFacePublicationResponse.md +28 -0
- data/docs/HuggingFaceHuggingFaceRemote.md +62 -0
- data/docs/HuggingFaceHuggingFaceRemoteResponse.md +62 -0
- data/docs/HuggingFaceHuggingFaceRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/HuggingFaceHuggingFaceRepository.md +26 -0
- data/docs/HuggingFaceHuggingFaceRepositoryResponse.md +38 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceContentResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceDistributionResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFacePublicationResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceRemoteResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceRepositoryResponseList.md +24 -0
- data/docs/PatchedhuggingFaceHuggingFaceDistribution.md +32 -0
- data/docs/PatchedhuggingFaceHuggingFaceRemote.md +62 -0
- data/docs/PatchedhuggingFaceHuggingFaceRepository.md +26 -0
- data/docs/PolicyEnum.md +15 -0
- data/docs/PublicationsHuggingFaceApi.md +350 -0
- data/docs/RemotesHuggingFaceApi.md +669 -0
- data/docs/Repair.md +18 -0
- data/docs/RepoTypeEnum.md +15 -0
- data/docs/RepositoriesHuggingFaceApi.md +831 -0
- data/docs/RepositoriesHuggingFaceVersionsApi.md +359 -0
- data/docs/RepositoryAddRemoveContent.md +22 -0
- data/docs/RepositorySyncURL.md +20 -0
- data/docs/RepositoryVersionResponse.md +32 -0
- data/docs/SetLabel.md +20 -0
- data/docs/SetLabelResponse.md +20 -0
- data/docs/UnsetLabel.md +18 -0
- data/docs/UnsetLabelResponse.md +20 -0
- data/lib/pulp_hugging_face_client/api/content_hugging_face_api.rb +441 -0
- data/lib/pulp_hugging_face_client/api/distributions_hugging_face_api.rb +684 -0
- data/lib/pulp_hugging_face_client/api/publications_hugging_face_api.rb +356 -0
- data/lib/pulp_hugging_face_client/api/remotes_hugging_face_api.rb +681 -0
- data/lib/pulp_hugging_face_client/api/repositories_hugging_face_api.rb +847 -0
- data/lib/pulp_hugging_face_client/api/repositories_hugging_face_versions_api.rb +374 -0
- data/lib/pulp_hugging_face_client/api_client.rb +438 -0
- data/lib/pulp_hugging_face_client/api_error.rb +58 -0
- data/lib/pulp_hugging_face_client/configuration.rb +392 -0
- data/lib/pulp_hugging_face_client/models/async_operation_response.rb +223 -0
- data/lib/pulp_hugging_face_client/models/content_summary_response.rb +260 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_content.rb +428 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_content_response.rb +385 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution.rb +345 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution_response.rb +366 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_publication.rb +225 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_publication_response.rb +264 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote.rb +745 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote_response.rb +564 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote_response_hidden_fields_inner.rb +237 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository.rb +316 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository_response.rb +339 -0
- data/lib/pulp_hugging_face_client/models/paginated_repository_version_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_content_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_distribution_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_publication_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_remote_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_repository_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_distribution.rb +331 -0
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_remote.rb +731 -0
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_repository.rb +309 -0
- data/lib/pulp_hugging_face_client/models/policy_enum.rb +41 -0
- data/lib/pulp_hugging_face_client/models/repair.rb +217 -0
- data/lib/pulp_hugging_face_client/models/repo_type_enum.rb +41 -0
- data/lib/pulp_hugging_face_client/models/repository_add_remove_content.rb +240 -0
- data/lib/pulp_hugging_face_client/models/repository_sync_url.rb +228 -0
- data/lib/pulp_hugging_face_client/models/repository_version_response.rb +283 -0
- data/lib/pulp_hugging_face_client/models/set_label.rb +264 -0
- data/lib/pulp_hugging_face_client/models/set_label_response.rb +255 -0
- data/lib/pulp_hugging_face_client/models/unset_label.rb +252 -0
- data/lib/pulp_hugging_face_client/models/unset_label_response.rb +252 -0
- data/lib/pulp_hugging_face_client/version.rb +15 -0
- data/lib/pulp_hugging_face_client.rb +77 -0
- data/pulp_hugging_face_client.gemspec +41 -0
- data/spec/api/content_hugging_face_api_spec.rb +121 -0
- data/spec/api/distributions_hugging_face_api_spec.rb +171 -0
- data/spec/api/publications_hugging_face_api_spec.rb +109 -0
- data/spec/api/remotes_hugging_face_api_spec.rb +170 -0
- data/spec/api/repositories_hugging_face_api_spec.rb +202 -0
- data/spec/api/repositories_hugging_face_versions_api_spec.rb +112 -0
- data/spec/models/async_operation_response_spec.rb +36 -0
- data/spec/models/content_summary_response_spec.rb +48 -0
- data/spec/models/hugging_face_hugging_face_content_response_spec.rb +108 -0
- data/spec/models/hugging_face_hugging_face_content_spec.rb +90 -0
- data/spec/models/hugging_face_hugging_face_distribution_response_spec.rb +114 -0
- data/spec/models/hugging_face_hugging_face_distribution_spec.rb +78 -0
- data/spec/models/hugging_face_hugging_face_publication_response_spec.rb +66 -0
- data/spec/models/hugging_face_hugging_face_publication_spec.rb +42 -0
- data/spec/models/hugging_face_hugging_face_remote_response_hidden_fields_inner_spec.rb +42 -0
- data/spec/models/hugging_face_hugging_face_remote_response_spec.rb +168 -0
- data/spec/models/hugging_face_hugging_face_remote_spec.rb +168 -0
- data/spec/models/hugging_face_hugging_face_repository_response_spec.rb +96 -0
- data/spec/models/hugging_face_hugging_face_repository_spec.rb +60 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_content_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_distribution_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_publication_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_remote_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_repository_response_list_spec.rb +54 -0
- data/spec/models/patchedhugging_face_hugging_face_distribution_spec.rb +78 -0
- data/spec/models/patchedhugging_face_hugging_face_remote_spec.rb +168 -0
- data/spec/models/patchedhugging_face_hugging_face_repository_spec.rb +60 -0
- data/spec/models/policy_enum_spec.rb +30 -0
- data/spec/models/repair_spec.rb +36 -0
- data/spec/models/repo_type_enum_spec.rb +30 -0
- data/spec/models/repository_add_remove_content_spec.rb +48 -0
- data/spec/models/repository_sync_url_spec.rb +42 -0
- data/spec/models/repository_version_response_spec.rb +78 -0
- data/spec/models/set_label_response_spec.rb +42 -0
- data/spec/models/set_label_spec.rb +42 -0
- data/spec/models/unset_label_response_spec.rb +42 -0
- data/spec/models/unset_label_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- metadata +274 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
# PulpHuggingFaceClient::PatchedhuggingFaceHuggingFaceRemote
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | A unique name for this remote. | [optional] |
|
8
|
+
| **url** | **String** | The URL of an external content source. | [optional] |
|
9
|
+
| **ca_cert** | **String** | A PEM encoded CA certificate used to validate the server certificate presented by the remote server. | [optional] |
|
10
|
+
| **client_cert** | **String** | A PEM encoded client certificate used for authentication. | [optional] |
|
11
|
+
| **client_key** | **String** | A PEM encoded private key used for authentication. | [optional] |
|
12
|
+
| **tls_validation** | **Boolean** | If True, TLS peer validation must be performed. | [optional] |
|
13
|
+
| **proxy_url** | **String** | The proxy URL. Format: scheme://host:port | [optional] |
|
14
|
+
| **proxy_username** | **String** | The username to authenticte to the proxy. | [optional] |
|
15
|
+
| **proxy_password** | **String** | The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. | [optional] |
|
16
|
+
| **username** | **String** | The username to be used for authentication when syncing. | [optional] |
|
17
|
+
| **password** | **String** | The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. | [optional] |
|
18
|
+
| **pulp_labels** | **Hash<String, String>** | | [optional] |
|
19
|
+
| **download_concurrency** | **Integer** | Total number of simultaneous connections. If not set then the default value will be used. | [optional] |
|
20
|
+
| **max_retries** | **Integer** | Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. | [optional] |
|
21
|
+
| **policy** | [**PolicyEnum**](PolicyEnum.md) | The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' enables pull-through caching. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again. | [optional] |
|
22
|
+
| **total_timeout** | **Float** | aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
23
|
+
| **connect_timeout** | **Float** | aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
24
|
+
| **sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
25
|
+
| **sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
26
|
+
| **headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional] |
|
27
|
+
| **rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional] |
|
28
|
+
| **hf_hub_url** | **String** | Base URL for Hugging Face Hub | [optional][default to 'https://huggingface.co'] |
|
29
|
+
| **hf_token** | **String** | Hugging Face authentication token for private repositories | [optional] |
|
30
|
+
|
31
|
+
## Example
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
require 'pulp_hugging_face_client'
|
35
|
+
|
36
|
+
instance = PulpHuggingFaceClient::PatchedhuggingFaceHuggingFaceRemote.new(
|
37
|
+
name: null,
|
38
|
+
url: null,
|
39
|
+
ca_cert: null,
|
40
|
+
client_cert: null,
|
41
|
+
client_key: null,
|
42
|
+
tls_validation: null,
|
43
|
+
proxy_url: null,
|
44
|
+
proxy_username: null,
|
45
|
+
proxy_password: null,
|
46
|
+
username: null,
|
47
|
+
password: null,
|
48
|
+
pulp_labels: null,
|
49
|
+
download_concurrency: null,
|
50
|
+
max_retries: null,
|
51
|
+
policy: null,
|
52
|
+
total_timeout: null,
|
53
|
+
connect_timeout: null,
|
54
|
+
sock_connect_timeout: null,
|
55
|
+
sock_read_timeout: null,
|
56
|
+
headers: null,
|
57
|
+
rate_limit: null,
|
58
|
+
hf_hub_url: null,
|
59
|
+
hf_token: null
|
60
|
+
)
|
61
|
+
```
|
62
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# PulpHuggingFaceClient::PatchedhuggingFaceHuggingFaceRepository
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **pulp_labels** | **Hash<String, String>** | | [optional] |
|
8
|
+
| **name** | **String** | A unique name for this repository. | [optional] |
|
9
|
+
| **description** | **String** | An optional description. | [optional] |
|
10
|
+
| **retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. | [optional] |
|
11
|
+
| **remote** | **String** | An optional remote to use by default when syncing. | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'pulp_hugging_face_client'
|
17
|
+
|
18
|
+
instance = PulpHuggingFaceClient::PatchedhuggingFaceHuggingFaceRepository.new(
|
19
|
+
pulp_labels: null,
|
20
|
+
name: null,
|
21
|
+
description: null,
|
22
|
+
retain_repo_versions: null,
|
23
|
+
remote: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/PolicyEnum.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# PulpHuggingFaceClient::PolicyEnum
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'pulp_hugging_face_client'
|
12
|
+
|
13
|
+
instance = PulpHuggingFaceClient::PolicyEnum.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,350 @@
|
|
1
|
+
# PulpHuggingFaceClient::PublicationsHuggingFaceApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:24817*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create**](PublicationsHuggingFaceApi.md#create) | **POST** /pulp/api/v3/publications/hugging_face/hugging-face/ | Create a hugging face publication |
|
8
|
+
| [**delete**](PublicationsHuggingFaceApi.md#delete) | **DELETE** {hugging_face_hugging_face_publication_href} | Delete a hugging face publication |
|
9
|
+
| [**list**](PublicationsHuggingFaceApi.md#list) | **GET** /pulp/api/v3/publications/hugging_face/hugging-face/ | List hugging face publications |
|
10
|
+
| [**read**](PublicationsHuggingFaceApi.md#read) | **GET** {hugging_face_hugging_face_publication_href} | Inspect a hugging face publication |
|
11
|
+
|
12
|
+
|
13
|
+
## create
|
14
|
+
|
15
|
+
> <AsyncOperationResponse> create(hugging_face_hugging_face_publication, opts)
|
16
|
+
|
17
|
+
Create a hugging face publication
|
18
|
+
|
19
|
+
Trigger an asynchronous task to publish content
|
20
|
+
|
21
|
+
### Examples
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'time'
|
25
|
+
require 'pulp_hugging_face_client'
|
26
|
+
# setup authorization
|
27
|
+
PulpHuggingFaceClient.configure do |config|
|
28
|
+
# Configure HTTP basic authorization: basicAuth
|
29
|
+
config.username = 'YOUR USERNAME'
|
30
|
+
config.password = 'YOUR PASSWORD'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = PulpHuggingFaceClient::PublicationsHuggingFaceApi.new
|
34
|
+
hugging_face_hugging_face_publication = PulpHuggingFaceClient::HuggingFaceHuggingFacePublication.new # HuggingFaceHuggingFacePublication |
|
35
|
+
opts = {
|
36
|
+
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
# Create a hugging face publication
|
41
|
+
result = api_instance.create(hugging_face_hugging_face_publication, opts)
|
42
|
+
p result
|
43
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
44
|
+
puts "Error when calling PublicationsHuggingFaceApi->create: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
#### Using the create_with_http_info variant
|
49
|
+
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
51
|
+
|
52
|
+
> <Array(<AsyncOperationResponse>, Integer, Hash)> create_with_http_info(hugging_face_hugging_face_publication, opts)
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
begin
|
56
|
+
# Create a hugging face publication
|
57
|
+
data, status_code, headers = api_instance.create_with_http_info(hugging_face_hugging_face_publication, opts)
|
58
|
+
p status_code # => 2xx
|
59
|
+
p headers # => { ... }
|
60
|
+
p data # => <AsyncOperationResponse>
|
61
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
62
|
+
puts "Error when calling PublicationsHuggingFaceApi->create_with_http_info: #{e}"
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
67
|
+
|
68
|
+
| Name | Type | Description | Notes |
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
70
|
+
| **hugging_face_hugging_face_publication** | [**HuggingFaceHuggingFacePublication**](HuggingFaceHuggingFacePublication.md) | | |
|
71
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
72
|
+
|
73
|
+
### Return type
|
74
|
+
|
75
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
76
|
+
|
77
|
+
### Authorization
|
78
|
+
|
79
|
+
[basicAuth](../README.md#basicAuth)
|
80
|
+
|
81
|
+
### HTTP request headers
|
82
|
+
|
83
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
84
|
+
- **Accept**: application/json
|
85
|
+
|
86
|
+
|
87
|
+
## delete
|
88
|
+
|
89
|
+
> delete(hugging_face_hugging_face_publication_href, opts)
|
90
|
+
|
91
|
+
Delete a hugging face publication
|
92
|
+
|
93
|
+
A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
94
|
+
|
95
|
+
### Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'time'
|
99
|
+
require 'pulp_hugging_face_client'
|
100
|
+
# setup authorization
|
101
|
+
PulpHuggingFaceClient.configure do |config|
|
102
|
+
# Configure HTTP basic authorization: basicAuth
|
103
|
+
config.username = 'YOUR USERNAME'
|
104
|
+
config.password = 'YOUR PASSWORD'
|
105
|
+
end
|
106
|
+
|
107
|
+
api_instance = PulpHuggingFaceClient::PublicationsHuggingFaceApi.new
|
108
|
+
hugging_face_hugging_face_publication_href = 'hugging_face_hugging_face_publication_href_example' # String |
|
109
|
+
opts = {
|
110
|
+
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
111
|
+
}
|
112
|
+
|
113
|
+
begin
|
114
|
+
# Delete a hugging face publication
|
115
|
+
api_instance.delete(hugging_face_hugging_face_publication_href, opts)
|
116
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
117
|
+
puts "Error when calling PublicationsHuggingFaceApi->delete: #{e}"
|
118
|
+
end
|
119
|
+
```
|
120
|
+
|
121
|
+
#### Using the delete_with_http_info variant
|
122
|
+
|
123
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
124
|
+
|
125
|
+
> <Array(nil, Integer, Hash)> delete_with_http_info(hugging_face_hugging_face_publication_href, opts)
|
126
|
+
|
127
|
+
```ruby
|
128
|
+
begin
|
129
|
+
# Delete a hugging face publication
|
130
|
+
data, status_code, headers = api_instance.delete_with_http_info(hugging_face_hugging_face_publication_href, opts)
|
131
|
+
p status_code # => 2xx
|
132
|
+
p headers # => { ... }
|
133
|
+
p data # => nil
|
134
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
135
|
+
puts "Error when calling PublicationsHuggingFaceApi->delete_with_http_info: #{e}"
|
136
|
+
end
|
137
|
+
```
|
138
|
+
|
139
|
+
### Parameters
|
140
|
+
|
141
|
+
| Name | Type | Description | Notes |
|
142
|
+
| ---- | ---- | ----------- | ----- |
|
143
|
+
| **hugging_face_hugging_face_publication_href** | **String** | | |
|
144
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
145
|
+
|
146
|
+
### Return type
|
147
|
+
|
148
|
+
nil (empty response body)
|
149
|
+
|
150
|
+
### Authorization
|
151
|
+
|
152
|
+
[basicAuth](../README.md#basicAuth)
|
153
|
+
|
154
|
+
### HTTP request headers
|
155
|
+
|
156
|
+
- **Content-Type**: Not defined
|
157
|
+
- **Accept**: Not defined
|
158
|
+
|
159
|
+
|
160
|
+
## list
|
161
|
+
|
162
|
+
> <PaginatedhuggingFaceHuggingFacePublicationResponseList> list(opts)
|
163
|
+
|
164
|
+
List hugging face publications
|
165
|
+
|
166
|
+
A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
167
|
+
|
168
|
+
### Examples
|
169
|
+
|
170
|
+
```ruby
|
171
|
+
require 'time'
|
172
|
+
require 'pulp_hugging_face_client'
|
173
|
+
# setup authorization
|
174
|
+
PulpHuggingFaceClient.configure do |config|
|
175
|
+
# Configure HTTP basic authorization: basicAuth
|
176
|
+
config.username = 'YOUR USERNAME'
|
177
|
+
config.password = 'YOUR PASSWORD'
|
178
|
+
end
|
179
|
+
|
180
|
+
api_instance = PulpHuggingFaceClient::PublicationsHuggingFaceApi.new
|
181
|
+
opts = {
|
182
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
183
|
+
checkpoint: true, # Boolean | Filter results where checkpoint matches value
|
184
|
+
content: 'content_example', # String | Content Unit referenced by HREF/PRN
|
185
|
+
content__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
186
|
+
limit: 56, # Integer | Number of results to return per page.
|
187
|
+
offset: 56, # Integer | The initial index from which to return the results.
|
188
|
+
ordering: ['-checkpoint'], # Array<String> | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
189
|
+
prn__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
190
|
+
pulp_created: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter results where pulp_created matches value
|
191
|
+
pulp_created__gt: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter results where pulp_created is greater than value
|
192
|
+
pulp_created__gte: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter results where pulp_created is greater than or equal to value
|
193
|
+
pulp_created__isnull: true, # Boolean | Filter results where pulp_created has a null value
|
194
|
+
pulp_created__lt: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter results where pulp_created is less than value
|
195
|
+
pulp_created__lte: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter results where pulp_created is less than or equal to value
|
196
|
+
pulp_created__range: [Time.now], # Array<Time> | Filter results where pulp_created is between two comma separated values
|
197
|
+
pulp_href__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
198
|
+
pulp_id__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
199
|
+
q: 'q_example', # String | Filter results by using NOT, AND and OR operations on other filters
|
200
|
+
repository: 'repository_example', # String | Repository referenced by HREF/PRN
|
201
|
+
repository_version: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Repository Version referenced by HREF/PRN
|
202
|
+
fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
|
203
|
+
exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
|
204
|
+
}
|
205
|
+
|
206
|
+
begin
|
207
|
+
# List hugging face publications
|
208
|
+
result = api_instance.list(opts)
|
209
|
+
p result
|
210
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
211
|
+
puts "Error when calling PublicationsHuggingFaceApi->list: #{e}"
|
212
|
+
end
|
213
|
+
```
|
214
|
+
|
215
|
+
#### Using the list_with_http_info variant
|
216
|
+
|
217
|
+
This returns an Array which contains the response data, status code and headers.
|
218
|
+
|
219
|
+
> <Array(<PaginatedhuggingFaceHuggingFacePublicationResponseList>, Integer, Hash)> list_with_http_info(opts)
|
220
|
+
|
221
|
+
```ruby
|
222
|
+
begin
|
223
|
+
# List hugging face publications
|
224
|
+
data, status_code, headers = api_instance.list_with_http_info(opts)
|
225
|
+
p status_code # => 2xx
|
226
|
+
p headers # => { ... }
|
227
|
+
p data # => <PaginatedhuggingFaceHuggingFacePublicationResponseList>
|
228
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
229
|
+
puts "Error when calling PublicationsHuggingFaceApi->list_with_http_info: #{e}"
|
230
|
+
end
|
231
|
+
```
|
232
|
+
|
233
|
+
### Parameters
|
234
|
+
|
235
|
+
| Name | Type | Description | Notes |
|
236
|
+
| ---- | ---- | ----------- | ----- |
|
237
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
238
|
+
| **checkpoint** | **Boolean** | Filter results where checkpoint matches value | [optional] |
|
239
|
+
| **content** | **String** | Content Unit referenced by HREF/PRN | [optional] |
|
240
|
+
| **content__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
241
|
+
| **limit** | **Integer** | Number of results to return per page. | [optional] |
|
242
|
+
| **offset** | **Integer** | The initial index from which to return the results. | [optional] |
|
243
|
+
| **ordering** | [**Array<String>**](String.md) | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] |
|
244
|
+
| **prn__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
245
|
+
| **pulp_created** | **Time** | Filter results where pulp_created matches value | [optional] |
|
246
|
+
| **pulp_created__gt** | **Time** | Filter results where pulp_created is greater than value | [optional] |
|
247
|
+
| **pulp_created__gte** | **Time** | Filter results where pulp_created is greater than or equal to value | [optional] |
|
248
|
+
| **pulp_created__isnull** | **Boolean** | Filter results where pulp_created has a null value | [optional] |
|
249
|
+
| **pulp_created__lt** | **Time** | Filter results where pulp_created is less than value | [optional] |
|
250
|
+
| **pulp_created__lte** | **Time** | Filter results where pulp_created is less than or equal to value | [optional] |
|
251
|
+
| **pulp_created__range** | [**Array<Time>**](Time.md) | Filter results where pulp_created is between two comma separated values | [optional] |
|
252
|
+
| **pulp_href__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
253
|
+
| **pulp_id__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
254
|
+
| **q** | **String** | Filter results by using NOT, AND and OR operations on other filters | [optional] |
|
255
|
+
| **repository** | **String** | Repository referenced by HREF/PRN | [optional] |
|
256
|
+
| **repository_version** | **String** | Repository Version referenced by HREF/PRN | [optional] |
|
257
|
+
| **fields** | [**Array<String>**](String.md) | A list of fields to include in the response. | [optional] |
|
258
|
+
| **exclude_fields** | [**Array<String>**](String.md) | A list of fields to exclude from the response. | [optional] |
|
259
|
+
|
260
|
+
### Return type
|
261
|
+
|
262
|
+
[**PaginatedhuggingFaceHuggingFacePublicationResponseList**](PaginatedhuggingFaceHuggingFacePublicationResponseList.md)
|
263
|
+
|
264
|
+
### Authorization
|
265
|
+
|
266
|
+
[basicAuth](../README.md#basicAuth)
|
267
|
+
|
268
|
+
### HTTP request headers
|
269
|
+
|
270
|
+
- **Content-Type**: Not defined
|
271
|
+
- **Accept**: application/json
|
272
|
+
|
273
|
+
|
274
|
+
## read
|
275
|
+
|
276
|
+
> <HuggingFaceHuggingFacePublicationResponse> read(hugging_face_hugging_face_publication_href, opts)
|
277
|
+
|
278
|
+
Inspect a hugging face publication
|
279
|
+
|
280
|
+
A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
281
|
+
|
282
|
+
### Examples
|
283
|
+
|
284
|
+
```ruby
|
285
|
+
require 'time'
|
286
|
+
require 'pulp_hugging_face_client'
|
287
|
+
# setup authorization
|
288
|
+
PulpHuggingFaceClient.configure do |config|
|
289
|
+
# Configure HTTP basic authorization: basicAuth
|
290
|
+
config.username = 'YOUR USERNAME'
|
291
|
+
config.password = 'YOUR PASSWORD'
|
292
|
+
end
|
293
|
+
|
294
|
+
api_instance = PulpHuggingFaceClient::PublicationsHuggingFaceApi.new
|
295
|
+
hugging_face_hugging_face_publication_href = 'hugging_face_hugging_face_publication_href_example' # String |
|
296
|
+
opts = {
|
297
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
298
|
+
fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
|
299
|
+
exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
|
300
|
+
}
|
301
|
+
|
302
|
+
begin
|
303
|
+
# Inspect a hugging face publication
|
304
|
+
result = api_instance.read(hugging_face_hugging_face_publication_href, opts)
|
305
|
+
p result
|
306
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
307
|
+
puts "Error when calling PublicationsHuggingFaceApi->read: #{e}"
|
308
|
+
end
|
309
|
+
```
|
310
|
+
|
311
|
+
#### Using the read_with_http_info variant
|
312
|
+
|
313
|
+
This returns an Array which contains the response data, status code and headers.
|
314
|
+
|
315
|
+
> <Array(<HuggingFaceHuggingFacePublicationResponse>, Integer, Hash)> read_with_http_info(hugging_face_hugging_face_publication_href, opts)
|
316
|
+
|
317
|
+
```ruby
|
318
|
+
begin
|
319
|
+
# Inspect a hugging face publication
|
320
|
+
data, status_code, headers = api_instance.read_with_http_info(hugging_face_hugging_face_publication_href, opts)
|
321
|
+
p status_code # => 2xx
|
322
|
+
p headers # => { ... }
|
323
|
+
p data # => <HuggingFaceHuggingFacePublicationResponse>
|
324
|
+
rescue PulpHuggingFaceClient::ApiError => e
|
325
|
+
puts "Error when calling PublicationsHuggingFaceApi->read_with_http_info: #{e}"
|
326
|
+
end
|
327
|
+
```
|
328
|
+
|
329
|
+
### Parameters
|
330
|
+
|
331
|
+
| Name | Type | Description | Notes |
|
332
|
+
| ---- | ---- | ----------- | ----- |
|
333
|
+
| **hugging_face_hugging_face_publication_href** | **String** | | |
|
334
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
335
|
+
| **fields** | [**Array<String>**](String.md) | A list of fields to include in the response. | [optional] |
|
336
|
+
| **exclude_fields** | [**Array<String>**](String.md) | A list of fields to exclude from the response. | [optional] |
|
337
|
+
|
338
|
+
### Return type
|
339
|
+
|
340
|
+
[**HuggingFaceHuggingFacePublicationResponse**](HuggingFaceHuggingFacePublicationResponse.md)
|
341
|
+
|
342
|
+
### Authorization
|
343
|
+
|
344
|
+
[basicAuth](../README.md#basicAuth)
|
345
|
+
|
346
|
+
### HTTP request headers
|
347
|
+
|
348
|
+
- **Content-Type**: Not defined
|
349
|
+
- **Accept**: application/json
|
350
|
+
|