weblate 0.1.0
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/CHANGELOG.md +5 -0
- data/COPYING +674 -0
- data/Gemfile +8 -0
- data/README.md +334 -0
- data/Rakefile +49 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/bin/smoketest +14 -0
- data/bin/smoketest~ +0 -0
- data/docs/ActionEnum.md +15 -0
- data/docs/Addon.md +28 -0
- data/docs/AddonsApi.md +366 -0
- data/docs/AutoComponentList.md +20 -0
- data/docs/BasicUser.md +22 -0
- data/docs/BlankEnum.md +15 -0
- data/docs/CategoriesApi.md +520 -0
- data/docs/Category.md +30 -0
- data/docs/Change.md +42 -0
- data/docs/ChangesApi.md +163 -0
- data/docs/ColorEnum.md +15 -0
- data/docs/Component.md +146 -0
- data/docs/ComponentLanguageCodeStyle.md +49 -0
- data/docs/ComponentList.md +30 -0
- data/docs/ComponentListsApi.md +667 -0
- data/docs/ComponentsApi.md +1653 -0
- data/docs/ConflictsEnum.md +15 -0
- data/docs/DirectionEnum.md +15 -0
- data/docs/FileFormatEnum.md +15 -0
- data/docs/FrequencyEnum.md +15 -0
- data/docs/FuzzyEnum.md +15 -0
- data/docs/Group.md +40 -0
- data/docs/GroupsApi.md +1257 -0
- data/docs/Language.md +36 -0
- data/docs/LanguageCodeStyleEnum.md +15 -0
- data/docs/LanguagePlural.md +26 -0
- data/docs/LanguageSelectionEnum.md +15 -0
- data/docs/LanguagesApi.md +520 -0
- data/docs/LicenseEnum.md +15 -0
- data/docs/LockRequest.md +18 -0
- data/docs/Memory.md +34 -0
- data/docs/MemoryApi.md +448 -0
- data/docs/MergeStyleEnum.md +15 -0
- data/docs/MethodEnum.md +15 -0
- data/docs/Metrics.md +42 -0
- data/docs/MetricsApi.md +81 -0
- data/docs/NewLangEnum.md +15 -0
- data/docs/Notification.md +28 -0
- data/docs/NotificationEnum.md +15 -0
- data/docs/OperationEnum.md +15 -0
- data/docs/PaginatedAddonList.md +24 -0
- data/docs/PaginatedBasicUserList.md +24 -0
- data/docs/PaginatedCategoryList.md +24 -0
- data/docs/PaginatedChangeList.md +24 -0
- data/docs/PaginatedComponentList.md +24 -0
- data/docs/PaginatedComponentListList.md +24 -0
- data/docs/PaginatedGroupList.md +24 -0
- data/docs/PaginatedLanguageList.md +24 -0
- data/docs/PaginatedMemoryList.md +24 -0
- data/docs/PaginatedNotificationList.md +24 -0
- data/docs/PaginatedProjectList.md +24 -0
- data/docs/PaginatedRoleList.md +24 -0
- data/docs/PaginatedScreenshotList.md +24 -0
- data/docs/PaginatedTranslationList.md +24 -0
- data/docs/PaginatedUnitList.md +24 -0
- data/docs/PatchedAddon.md +28 -0
- data/docs/PatchedBasicUser.md +22 -0
- data/docs/PatchedCategory.md +30 -0
- data/docs/PatchedComponent.md +146 -0
- data/docs/PatchedComponentList.md +30 -0
- data/docs/PatchedGroup.md +40 -0
- data/docs/PatchedLanguage.md +36 -0
- data/docs/PatchedMemory.md +34 -0
- data/docs/PatchedNotification.md +28 -0
- data/docs/PatchedProject.md +58 -0
- data/docs/PatchedRole.md +24 -0
- data/docs/PatchedScreenshot.md +30 -0
- data/docs/PatchedUnitWrite.md +26 -0
- data/docs/PriorityEnum.md +15 -0
- data/docs/Project.md +58 -0
- data/docs/ProjectSelectionEnum.md +15 -0
- data/docs/ProjectsApi.md +1392 -0
- data/docs/RepoRequest.md +18 -0
- data/docs/Role.md +24 -0
- data/docs/RolesApi.md +448 -0
- data/docs/ScopeEnum.md +15 -0
- data/docs/Screenshot.md +30 -0
- data/docs/ScreenshotFile.md +18 -0
- data/docs/ScreenshotsApi.md +815 -0
- data/docs/SearchApi.md +75 -0
- data/docs/SourceEnum.md +15 -0
- data/docs/StateEnum.md +15 -0
- data/docs/TasksApi.md +145 -0
- data/docs/TextDirection.md +49 -0
- data/docs/Translation.md +80 -0
- data/docs/TranslationsApi.md +1028 -0
- data/docs/Unit.md +76 -0
- data/docs/UnitFlatLabels.md +24 -0
- data/docs/UnitLabels.md +24 -0
- data/docs/UnitWrite.md +26 -0
- data/docs/UnitsApi.md +376 -0
- data/docs/UploadRequest.md +28 -0
- data/docs/UploadRequestConflicts.md +49 -0
- data/docs/UploadRequestFuzzy.md +49 -0
- data/docs/UsersApi.md +1130 -0
- data/docs/VcsEnum.md +15 -0
- data/git_push.sh +57 -0
- data/lib/weblate/api/addons_api.rb +353 -0
- data/lib/weblate/api/categories_api.rb +495 -0
- data/lib/weblate/api/changes_api.rb +165 -0
- data/lib/weblate/api/component_lists_api.rb +642 -0
- data/lib/weblate/api/components_api.rb +1775 -0
- data/lib/weblate/api/groups_api.rb +1261 -0
- data/lib/weblate/api/languages_api.rb +495 -0
- data/lib/weblate/api/memory_api.rb +429 -0
- data/lib/weblate/api/metrics_api.rb +84 -0
- data/lib/weblate/api/projects_api.rb +1331 -0
- data/lib/weblate/api/roles_api.rb +429 -0
- data/lib/weblate/api/screenshots_api.rb +803 -0
- data/lib/weblate/api/search_api.rb +75 -0
- data/lib/weblate/api/tasks_api.rb +146 -0
- data/lib/weblate/api/translations_api.rb +1232 -0
- data/lib/weblate/api/units_api.rb +363 -0
- data/lib/weblate/api/users_api.rb +1104 -0
- data/lib/weblate/api_client.rb +437 -0
- data/lib/weblate/api_error.rb +58 -0
- data/lib/weblate/configuration.rb +392 -0
- data/lib/weblate/models/action_enum.rb +108 -0
- data/lib/weblate/models/addon.rb +314 -0
- data/lib/weblate/models/auto_component_list.rb +263 -0
- data/lib/weblate/models/basic_user.rb +292 -0
- data/lib/weblate/models/blank_enum.rb +39 -0
- data/lib/weblate/models/category.rb +361 -0
- data/lib/weblate/models/change.rb +408 -0
- data/lib/weblate/models/color_enum.rb +54 -0
- data/lib/weblate/models/component.rb +1377 -0
- data/lib/weblate/models/component_language_code_style.rb +106 -0
- data/lib/weblate/models/component_list.rb +366 -0
- data/lib/weblate/models/conflicts_enum.rb +41 -0
- data/lib/weblate/models/direction_enum.rb +40 -0
- data/lib/weblate/models/file_format_enum.rb +101 -0
- data/lib/weblate/models/frequency_enum.rb +43 -0
- data/lib/weblate/models/fuzzy_enum.rb +40 -0
- data/lib/weblate/models/group.rb +421 -0
- data/lib/weblate/models/language.rb +417 -0
- data/lib/weblate/models/language_code_style_enum.rb +51 -0
- data/lib/weblate/models/language_plural.rb +314 -0
- data/lib/weblate/models/language_selection_enum.rb +40 -0
- data/lib/weblate/models/license_enum.rb +677 -0
- data/lib/weblate/models/lock_request.rb +221 -0
- data/lib/weblate/models/memory.rb +329 -0
- data/lib/weblate/models/merge_style_enum.rb +41 -0
- data/lib/weblate/models/method_enum.rb +45 -0
- data/lib/weblate/models/metrics.rb +415 -0
- data/lib/weblate/models/new_lang_enum.rb +42 -0
- data/lib/weblate/models/notification.rb +323 -0
- data/lib/weblate/models/notification_enum.rb +60 -0
- data/lib/weblate/models/operation_enum.rb +43 -0
- data/lib/weblate/models/paginated_addon_list.rb +259 -0
- data/lib/weblate/models/paginated_basic_user_list.rb +259 -0
- data/lib/weblate/models/paginated_category_list.rb +259 -0
- data/lib/weblate/models/paginated_change_list.rb +259 -0
- data/lib/weblate/models/paginated_component_list.rb +259 -0
- data/lib/weblate/models/paginated_component_list_list.rb +259 -0
- data/lib/weblate/models/paginated_group_list.rb +259 -0
- data/lib/weblate/models/paginated_language_list.rb +259 -0
- data/lib/weblate/models/paginated_memory_list.rb +259 -0
- data/lib/weblate/models/paginated_notification_list.rb +259 -0
- data/lib/weblate/models/paginated_project_list.rb +259 -0
- data/lib/weblate/models/paginated_role_list.rb +259 -0
- data/lib/weblate/models/paginated_screenshot_list.rb +259 -0
- data/lib/weblate/models/paginated_translation_list.rb +259 -0
- data/lib/weblate/models/paginated_unit_list.rb +259 -0
- data/lib/weblate/models/patched_addon.rb +279 -0
- data/lib/weblate/models/patched_basic_user.rb +271 -0
- data/lib/weblate/models/patched_category.rb +319 -0
- data/lib/weblate/models/patched_component.rb +1242 -0
- data/lib/weblate/models/patched_component_list.rb +324 -0
- data/lib/weblate/models/patched_group.rb +365 -0
- data/lib/weblate/models/patched_language.rb +375 -0
- data/lib/weblate/models/patched_memory.rb +287 -0
- data/lib/weblate/models/patched_notification.rb +281 -0
- data/lib/weblate/models/patched_project.rb +472 -0
- data/lib/weblate/models/patched_role.rb +262 -0
- data/lib/weblate/models/patched_screenshot.rb +309 -0
- data/lib/weblate/models/patched_unit_write.rb +279 -0
- data/lib/weblate/models/priority_enum.rb +43 -0
- data/lib/weblate/models/project.rb +563 -0
- data/lib/weblate/models/project_selection_enum.rb +43 -0
- data/lib/weblate/models/repo_request.rb +243 -0
- data/lib/weblate/models/role.rb +290 -0
- data/lib/weblate/models/scope_enum.rb +43 -0
- data/lib/weblate/models/screenshot.rb +351 -0
- data/lib/weblate/models/screenshot_file.rb +221 -0
- data/lib/weblate/models/source_enum.rb +45 -0
- data/lib/weblate/models/state_enum.rb +43 -0
- data/lib/weblate/models/text_direction.rb +105 -0
- data/lib/weblate/models/translation.rb +760 -0
- data/lib/weblate/models/unit.rb +757 -0
- data/lib/weblate/models/unit_flat_labels.rb +315 -0
- data/lib/weblate/models/unit_labels.rb +315 -0
- data/lib/weblate/models/unit_write.rb +293 -0
- data/lib/weblate/models/upload_request.rb +307 -0
- data/lib/weblate/models/upload_request_conflicts.rb +105 -0
- data/lib/weblate/models/upload_request_fuzzy.rb +105 -0
- data/lib/weblate/models/vcs_enum.rb +46 -0
- data/lib/weblate/version.rb +15 -0
- data/lib/weblate.rb +135 -0
- data/manifest.scm +6 -0
- data/schema.patched.yaml +10113 -0
- data/schema.yaml +10116 -0
- data/sig/weblate.rbs +4 -0
- data/spec/api/addons_api_spec.rb +88 -0
- data/spec/api/categories_api_spec.rb +115 -0
- data/spec/api/changes_api_spec.rb +62 -0
- data/spec/api/component_lists_api_spec.rb +139 -0
- data/spec/api/components_api_spec.rb +307 -0
- data/spec/api/groups_api_spec.rb +236 -0
- data/spec/api/languages_api_spec.rb +115 -0
- data/spec/api/memory_api_spec.rb +104 -0
- data/spec/api/metrics_api_spec.rb +46 -0
- data/spec/api/projects_api_spec.rb +251 -0
- data/spec/api/roles_api_spec.rb +104 -0
- data/spec/api/screenshots_api_spec.rb +163 -0
- data/spec/api/search_api_spec.rb +45 -0
- data/spec/api/tasks_api_spec.rb +55 -0
- data/spec/api/translations_api_spec.rb +218 -0
- data/spec/api/units_api_spec.rb +93 -0
- data/spec/api/users_api_spec.rb +218 -0
- data/spec/models/action_enum_spec.rb +30 -0
- data/spec/models/addon_spec.rb +66 -0
- data/spec/models/auto_component_list_spec.rb +42 -0
- data/spec/models/basic_user_spec.rb +48 -0
- data/spec/models/blank_enum_spec.rb +30 -0
- data/spec/models/category_spec.rb +72 -0
- data/spec/models/change_spec.rb +108 -0
- data/spec/models/color_enum_spec.rb +30 -0
- data/spec/models/component_language_code_style_spec.rb +32 -0
- data/spec/models/component_list_spec.rb +72 -0
- data/spec/models/component_spec.rb +420 -0
- data/spec/models/conflicts_enum_spec.rb +30 -0
- data/spec/models/direction_enum_spec.rb +30 -0
- data/spec/models/file_format_enum_spec.rb +30 -0
- data/spec/models/frequency_enum_spec.rb +30 -0
- data/spec/models/fuzzy_enum_spec.rb +30 -0
- data/spec/models/group_spec.rb +102 -0
- data/spec/models/language_code_style_enum_spec.rb +30 -0
- data/spec/models/language_plural_spec.rb +60 -0
- data/spec/models/language_selection_enum_spec.rb +30 -0
- data/spec/models/language_spec.rb +90 -0
- data/spec/models/license_enum_spec.rb +30 -0
- data/spec/models/lock_request_spec.rb +36 -0
- data/spec/models/memory_spec.rb +84 -0
- data/spec/models/merge_style_enum_spec.rb +30 -0
- data/spec/models/method_enum_spec.rb +30 -0
- data/spec/models/metrics_spec.rb +108 -0
- data/spec/models/new_lang_enum_spec.rb +30 -0
- data/spec/models/notification_enum_spec.rb +30 -0
- data/spec/models/notification_spec.rb +66 -0
- data/spec/models/operation_enum_spec.rb +30 -0
- data/spec/models/paginated_addon_list_spec.rb +54 -0
- data/spec/models/paginated_basic_user_list_spec.rb +54 -0
- data/spec/models/paginated_category_list_spec.rb +54 -0
- data/spec/models/paginated_change_list_spec.rb +54 -0
- data/spec/models/paginated_component_list_list_spec.rb +54 -0
- data/spec/models/paginated_component_list_spec.rb +54 -0
- data/spec/models/paginated_group_list_spec.rb +54 -0
- data/spec/models/paginated_language_list_spec.rb +54 -0
- data/spec/models/paginated_memory_list_spec.rb +54 -0
- data/spec/models/paginated_notification_list_spec.rb +54 -0
- data/spec/models/paginated_project_list_spec.rb +54 -0
- data/spec/models/paginated_role_list_spec.rb +54 -0
- data/spec/models/paginated_screenshot_list_spec.rb +54 -0
- data/spec/models/paginated_translation_list_spec.rb +54 -0
- data/spec/models/paginated_unit_list_spec.rb +54 -0
- data/spec/models/patched_addon_spec.rb +66 -0
- data/spec/models/patched_basic_user_spec.rb +48 -0
- data/spec/models/patched_category_spec.rb +72 -0
- data/spec/models/patched_component_list_spec.rb +72 -0
- data/spec/models/patched_component_spec.rb +420 -0
- data/spec/models/patched_group_spec.rb +102 -0
- data/spec/models/patched_language_spec.rb +90 -0
- data/spec/models/patched_memory_spec.rb +84 -0
- data/spec/models/patched_notification_spec.rb +66 -0
- data/spec/models/patched_project_spec.rb +156 -0
- data/spec/models/patched_role_spec.rb +54 -0
- data/spec/models/patched_screenshot_spec.rb +72 -0
- data/spec/models/patched_unit_write_spec.rb +60 -0
- data/spec/models/priority_enum_spec.rb +30 -0
- data/spec/models/project_selection_enum_spec.rb +30 -0
- data/spec/models/project_spec.rb +156 -0
- data/spec/models/repo_request_spec.rb +36 -0
- data/spec/models/role_spec.rb +54 -0
- data/spec/models/scope_enum_spec.rb +30 -0
- data/spec/models/screenshot_file_spec.rb +36 -0
- data/spec/models/screenshot_spec.rb +72 -0
- data/spec/models/source_enum_spec.rb +30 -0
- data/spec/models/state_enum_spec.rb +30 -0
- data/spec/models/text_direction_spec.rb +32 -0
- data/spec/models/translation_spec.rb +222 -0
- data/spec/models/unit_flat_labels_spec.rb +54 -0
- data/spec/models/unit_labels_spec.rb +54 -0
- data/spec/models/unit_spec.rb +210 -0
- data/spec/models/unit_write_spec.rb +60 -0
- data/spec/models/upload_request_conflicts_spec.rb +32 -0
- data/spec/models/upload_request_fuzzy_spec.rb +32 -0
- data/spec/models/upload_request_spec.rb +66 -0
- data/spec/models/vcs_enum_spec.rb +30 -0
- data/spec/spec_helper.rb +111 -0
- data/weblate.gemspec +47 -0
- metadata +526 -0
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Weblate's REST API
|
|
3
|
+
|
|
4
|
+
# The API is accessible on the ``/api/`` URL and it is based on [Django REST framework](https://www.django-rest-framework.org/). The OpenAPI specification is available as feature preview, feedback welcome!
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document:
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Weblate
|
|
16
|
+
class ComponentListsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Component lists API.
|
|
23
|
+
# @param slug [String]
|
|
24
|
+
# @param component_list [ComponentList]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [ComponentList]
|
|
27
|
+
def component_lists_components_create(slug, component_list, opts = {})
|
|
28
|
+
data, _status_code, _headers = component_lists_components_create_with_http_info(slug, component_list, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Component lists API.
|
|
33
|
+
# @param slug [String]
|
|
34
|
+
# @param component_list [ComponentList]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(ComponentList, Integer, Hash)>] ComponentList data, response status code and response headers
|
|
37
|
+
def component_lists_components_create_with_http_info(slug, component_list, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_components_create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'slug' is set
|
|
42
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_components_create"
|
|
44
|
+
end
|
|
45
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
46
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
47
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_components_create, must conform to the pattern #{pattern}."
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# verify the required parameter 'component_list' is set
|
|
51
|
+
if @api_client.config.client_side_validation && component_list.nil?
|
|
52
|
+
fail ArgumentError, "Missing the required parameter 'component_list' when calling ComponentListsApi.component_lists_components_create"
|
|
53
|
+
end
|
|
54
|
+
# resource path
|
|
55
|
+
local_var_path = '/component-lists/{slug}/components/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
56
|
+
|
|
57
|
+
# query parameters
|
|
58
|
+
query_params = opts[:query_params] || {}
|
|
59
|
+
|
|
60
|
+
# header parameters
|
|
61
|
+
header_params = opts[:header_params] || {}
|
|
62
|
+
# HTTP header 'Accept' (if needed)
|
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
64
|
+
# HTTP header 'Content-Type'
|
|
65
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
66
|
+
if !content_type.nil?
|
|
67
|
+
header_params['Content-Type'] = content_type
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(component_list)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'ComponentList'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"ComponentListsApi.component_lists_components_create",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_components_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Component lists API.
|
|
100
|
+
# @param component_slug [String]
|
|
101
|
+
# @param slug [String]
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @return [nil]
|
|
104
|
+
def component_lists_components_destroy(component_slug, slug, opts = {})
|
|
105
|
+
component_lists_components_destroy_with_http_info(component_slug, slug, opts)
|
|
106
|
+
nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Component lists API.
|
|
110
|
+
# @param component_slug [String]
|
|
111
|
+
# @param slug [String]
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
114
|
+
def component_lists_components_destroy_with_http_info(component_slug, slug, opts = {})
|
|
115
|
+
if @api_client.config.debugging
|
|
116
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_components_destroy ...'
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'component_slug' is set
|
|
119
|
+
if @api_client.config.client_side_validation && component_slug.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'component_slug' when calling ComponentListsApi.component_lists_components_destroy"
|
|
121
|
+
end
|
|
122
|
+
# verify the required parameter 'slug' is set
|
|
123
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
124
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_components_destroy"
|
|
125
|
+
end
|
|
126
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
127
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
128
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_components_destroy, must conform to the pattern #{pattern}."
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# resource path
|
|
132
|
+
local_var_path = '/component-lists/{slug}/components/{component_slug}/'.sub('{' + 'component_slug' + '}', CGI.escape(component_slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
133
|
+
|
|
134
|
+
# query parameters
|
|
135
|
+
query_params = opts[:query_params] || {}
|
|
136
|
+
|
|
137
|
+
# header parameters
|
|
138
|
+
header_params = opts[:header_params] || {}
|
|
139
|
+
|
|
140
|
+
# form parameters
|
|
141
|
+
form_params = opts[:form_params] || {}
|
|
142
|
+
|
|
143
|
+
# http body (model)
|
|
144
|
+
post_body = opts[:debug_body]
|
|
145
|
+
|
|
146
|
+
# return_type
|
|
147
|
+
return_type = opts[:debug_return_type]
|
|
148
|
+
|
|
149
|
+
# auth_names
|
|
150
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
151
|
+
|
|
152
|
+
new_options = opts.merge(
|
|
153
|
+
:operation => :"ComponentListsApi.component_lists_components_destroy",
|
|
154
|
+
:header_params => header_params,
|
|
155
|
+
:query_params => query_params,
|
|
156
|
+
:form_params => form_params,
|
|
157
|
+
:body => post_body,
|
|
158
|
+
:auth_names => auth_names,
|
|
159
|
+
:return_type => return_type
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
163
|
+
if @api_client.config.debugging
|
|
164
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_components_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
165
|
+
end
|
|
166
|
+
return data, status_code, headers
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Component lists API.
|
|
170
|
+
# @param slug [String]
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @return [ComponentList]
|
|
173
|
+
def component_lists_components_retrieve(slug, opts = {})
|
|
174
|
+
data, _status_code, _headers = component_lists_components_retrieve_with_http_info(slug, opts)
|
|
175
|
+
data
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Component lists API.
|
|
179
|
+
# @param slug [String]
|
|
180
|
+
# @param [Hash] opts the optional parameters
|
|
181
|
+
# @return [Array<(ComponentList, Integer, Hash)>] ComponentList data, response status code and response headers
|
|
182
|
+
def component_lists_components_retrieve_with_http_info(slug, opts = {})
|
|
183
|
+
if @api_client.config.debugging
|
|
184
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_components_retrieve ...'
|
|
185
|
+
end
|
|
186
|
+
# verify the required parameter 'slug' is set
|
|
187
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
188
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_components_retrieve"
|
|
189
|
+
end
|
|
190
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
191
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
192
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_components_retrieve, must conform to the pattern #{pattern}."
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# resource path
|
|
196
|
+
local_var_path = '/component-lists/{slug}/components/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
197
|
+
|
|
198
|
+
# query parameters
|
|
199
|
+
query_params = opts[:query_params] || {}
|
|
200
|
+
|
|
201
|
+
# header parameters
|
|
202
|
+
header_params = opts[:header_params] || {}
|
|
203
|
+
# HTTP header 'Accept' (if needed)
|
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
205
|
+
|
|
206
|
+
# form parameters
|
|
207
|
+
form_params = opts[:form_params] || {}
|
|
208
|
+
|
|
209
|
+
# http body (model)
|
|
210
|
+
post_body = opts[:debug_body]
|
|
211
|
+
|
|
212
|
+
# return_type
|
|
213
|
+
return_type = opts[:debug_return_type] || 'ComponentList'
|
|
214
|
+
|
|
215
|
+
# auth_names
|
|
216
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
217
|
+
|
|
218
|
+
new_options = opts.merge(
|
|
219
|
+
:operation => :"ComponentListsApi.component_lists_components_retrieve",
|
|
220
|
+
:header_params => header_params,
|
|
221
|
+
:query_params => query_params,
|
|
222
|
+
:form_params => form_params,
|
|
223
|
+
:body => post_body,
|
|
224
|
+
:auth_names => auth_names,
|
|
225
|
+
:return_type => return_type
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
229
|
+
if @api_client.config.debugging
|
|
230
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_components_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
231
|
+
end
|
|
232
|
+
return data, status_code, headers
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Component lists API.
|
|
236
|
+
# @param component_list [ComponentList]
|
|
237
|
+
# @param [Hash] opts the optional parameters
|
|
238
|
+
# @return [ComponentList]
|
|
239
|
+
def component_lists_create(component_list, opts = {})
|
|
240
|
+
data, _status_code, _headers = component_lists_create_with_http_info(component_list, opts)
|
|
241
|
+
data
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Component lists API.
|
|
245
|
+
# @param component_list [ComponentList]
|
|
246
|
+
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @return [Array<(ComponentList, Integer, Hash)>] ComponentList data, response status code and response headers
|
|
248
|
+
def component_lists_create_with_http_info(component_list, opts = {})
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_create ...'
|
|
251
|
+
end
|
|
252
|
+
# verify the required parameter 'component_list' is set
|
|
253
|
+
if @api_client.config.client_side_validation && component_list.nil?
|
|
254
|
+
fail ArgumentError, "Missing the required parameter 'component_list' when calling ComponentListsApi.component_lists_create"
|
|
255
|
+
end
|
|
256
|
+
# resource path
|
|
257
|
+
local_var_path = '/component-lists/'
|
|
258
|
+
|
|
259
|
+
# query parameters
|
|
260
|
+
query_params = opts[:query_params] || {}
|
|
261
|
+
|
|
262
|
+
# header parameters
|
|
263
|
+
header_params = opts[:header_params] || {}
|
|
264
|
+
# HTTP header 'Accept' (if needed)
|
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
266
|
+
# HTTP header 'Content-Type'
|
|
267
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
268
|
+
if !content_type.nil?
|
|
269
|
+
header_params['Content-Type'] = content_type
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = opts[:form_params] || {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(component_list)
|
|
277
|
+
|
|
278
|
+
# return_type
|
|
279
|
+
return_type = opts[:debug_return_type] || 'ComponentList'
|
|
280
|
+
|
|
281
|
+
# auth_names
|
|
282
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
283
|
+
|
|
284
|
+
new_options = opts.merge(
|
|
285
|
+
:operation => :"ComponentListsApi.component_lists_create",
|
|
286
|
+
:header_params => header_params,
|
|
287
|
+
:query_params => query_params,
|
|
288
|
+
:form_params => form_params,
|
|
289
|
+
:body => post_body,
|
|
290
|
+
:auth_names => auth_names,
|
|
291
|
+
:return_type => return_type
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
297
|
+
end
|
|
298
|
+
return data, status_code, headers
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Component lists API.
|
|
302
|
+
# @param slug [String]
|
|
303
|
+
# @param [Hash] opts the optional parameters
|
|
304
|
+
# @return [nil]
|
|
305
|
+
def component_lists_destroy(slug, opts = {})
|
|
306
|
+
component_lists_destroy_with_http_info(slug, opts)
|
|
307
|
+
nil
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Component lists API.
|
|
311
|
+
# @param slug [String]
|
|
312
|
+
# @param [Hash] opts the optional parameters
|
|
313
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
314
|
+
def component_lists_destroy_with_http_info(slug, opts = {})
|
|
315
|
+
if @api_client.config.debugging
|
|
316
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_destroy ...'
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'slug' is set
|
|
319
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_destroy"
|
|
321
|
+
end
|
|
322
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
323
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
324
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_destroy, must conform to the pattern #{pattern}."
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# resource path
|
|
328
|
+
local_var_path = '/component-lists/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
329
|
+
|
|
330
|
+
# query parameters
|
|
331
|
+
query_params = opts[:query_params] || {}
|
|
332
|
+
|
|
333
|
+
# header parameters
|
|
334
|
+
header_params = opts[:header_params] || {}
|
|
335
|
+
|
|
336
|
+
# form parameters
|
|
337
|
+
form_params = opts[:form_params] || {}
|
|
338
|
+
|
|
339
|
+
# http body (model)
|
|
340
|
+
post_body = opts[:debug_body]
|
|
341
|
+
|
|
342
|
+
# return_type
|
|
343
|
+
return_type = opts[:debug_return_type]
|
|
344
|
+
|
|
345
|
+
# auth_names
|
|
346
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
347
|
+
|
|
348
|
+
new_options = opts.merge(
|
|
349
|
+
:operation => :"ComponentListsApi.component_lists_destroy",
|
|
350
|
+
:header_params => header_params,
|
|
351
|
+
:query_params => query_params,
|
|
352
|
+
:form_params => form_params,
|
|
353
|
+
:body => post_body,
|
|
354
|
+
:auth_names => auth_names,
|
|
355
|
+
:return_type => return_type
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
359
|
+
if @api_client.config.debugging
|
|
360
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
361
|
+
end
|
|
362
|
+
return data, status_code, headers
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Component lists API.
|
|
366
|
+
# @param [Hash] opts the optional parameters
|
|
367
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
368
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
369
|
+
# @return [PaginatedComponentListList]
|
|
370
|
+
def component_lists_list(opts = {})
|
|
371
|
+
data, _status_code, _headers = component_lists_list_with_http_info(opts)
|
|
372
|
+
data
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Component lists API.
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
378
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
379
|
+
# @return [Array<(PaginatedComponentListList, Integer, Hash)>] PaginatedComponentListList data, response status code and response headers
|
|
380
|
+
def component_lists_list_with_http_info(opts = {})
|
|
381
|
+
if @api_client.config.debugging
|
|
382
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_list ...'
|
|
383
|
+
end
|
|
384
|
+
# resource path
|
|
385
|
+
local_var_path = '/component-lists/'
|
|
386
|
+
|
|
387
|
+
# query parameters
|
|
388
|
+
query_params = opts[:query_params] || {}
|
|
389
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
390
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
391
|
+
|
|
392
|
+
# header parameters
|
|
393
|
+
header_params = opts[:header_params] || {}
|
|
394
|
+
# HTTP header 'Accept' (if needed)
|
|
395
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
396
|
+
|
|
397
|
+
# form parameters
|
|
398
|
+
form_params = opts[:form_params] || {}
|
|
399
|
+
|
|
400
|
+
# http body (model)
|
|
401
|
+
post_body = opts[:debug_body]
|
|
402
|
+
|
|
403
|
+
# return_type
|
|
404
|
+
return_type = opts[:debug_return_type] || 'PaginatedComponentListList'
|
|
405
|
+
|
|
406
|
+
# auth_names
|
|
407
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
408
|
+
|
|
409
|
+
new_options = opts.merge(
|
|
410
|
+
:operation => :"ComponentListsApi.component_lists_list",
|
|
411
|
+
:header_params => header_params,
|
|
412
|
+
:query_params => query_params,
|
|
413
|
+
:form_params => form_params,
|
|
414
|
+
:body => post_body,
|
|
415
|
+
:auth_names => auth_names,
|
|
416
|
+
:return_type => return_type
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
420
|
+
if @api_client.config.debugging
|
|
421
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
422
|
+
end
|
|
423
|
+
return data, status_code, headers
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Component lists API.
|
|
427
|
+
# @param slug [String]
|
|
428
|
+
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @option opts [PatchedComponentList] :patched_component_list
|
|
430
|
+
# @return [ComponentList]
|
|
431
|
+
def component_lists_partial_update(slug, opts = {})
|
|
432
|
+
data, _status_code, _headers = component_lists_partial_update_with_http_info(slug, opts)
|
|
433
|
+
data
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# Component lists API.
|
|
437
|
+
# @param slug [String]
|
|
438
|
+
# @param [Hash] opts the optional parameters
|
|
439
|
+
# @option opts [PatchedComponentList] :patched_component_list
|
|
440
|
+
# @return [Array<(ComponentList, Integer, Hash)>] ComponentList data, response status code and response headers
|
|
441
|
+
def component_lists_partial_update_with_http_info(slug, opts = {})
|
|
442
|
+
if @api_client.config.debugging
|
|
443
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_partial_update ...'
|
|
444
|
+
end
|
|
445
|
+
# verify the required parameter 'slug' is set
|
|
446
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
447
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_partial_update"
|
|
448
|
+
end
|
|
449
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
450
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
451
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_partial_update, must conform to the pattern #{pattern}."
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# resource path
|
|
455
|
+
local_var_path = '/component-lists/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
456
|
+
|
|
457
|
+
# query parameters
|
|
458
|
+
query_params = opts[:query_params] || {}
|
|
459
|
+
|
|
460
|
+
# header parameters
|
|
461
|
+
header_params = opts[:header_params] || {}
|
|
462
|
+
# HTTP header 'Accept' (if needed)
|
|
463
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
464
|
+
# HTTP header 'Content-Type'
|
|
465
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
466
|
+
if !content_type.nil?
|
|
467
|
+
header_params['Content-Type'] = content_type
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# form parameters
|
|
471
|
+
form_params = opts[:form_params] || {}
|
|
472
|
+
|
|
473
|
+
# http body (model)
|
|
474
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_component_list'])
|
|
475
|
+
|
|
476
|
+
# return_type
|
|
477
|
+
return_type = opts[:debug_return_type] || 'ComponentList'
|
|
478
|
+
|
|
479
|
+
# auth_names
|
|
480
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
481
|
+
|
|
482
|
+
new_options = opts.merge(
|
|
483
|
+
:operation => :"ComponentListsApi.component_lists_partial_update",
|
|
484
|
+
:header_params => header_params,
|
|
485
|
+
:query_params => query_params,
|
|
486
|
+
:form_params => form_params,
|
|
487
|
+
:body => post_body,
|
|
488
|
+
:auth_names => auth_names,
|
|
489
|
+
:return_type => return_type
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
493
|
+
if @api_client.config.debugging
|
|
494
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
495
|
+
end
|
|
496
|
+
return data, status_code, headers
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# Component lists API.
|
|
500
|
+
# @param slug [String]
|
|
501
|
+
# @param [Hash] opts the optional parameters
|
|
502
|
+
# @return [ComponentList]
|
|
503
|
+
def component_lists_retrieve(slug, opts = {})
|
|
504
|
+
data, _status_code, _headers = component_lists_retrieve_with_http_info(slug, opts)
|
|
505
|
+
data
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# Component lists API.
|
|
509
|
+
# @param slug [String]
|
|
510
|
+
# @param [Hash] opts the optional parameters
|
|
511
|
+
# @return [Array<(ComponentList, Integer, Hash)>] ComponentList data, response status code and response headers
|
|
512
|
+
def component_lists_retrieve_with_http_info(slug, opts = {})
|
|
513
|
+
if @api_client.config.debugging
|
|
514
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_retrieve ...'
|
|
515
|
+
end
|
|
516
|
+
# verify the required parameter 'slug' is set
|
|
517
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
518
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_retrieve"
|
|
519
|
+
end
|
|
520
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
521
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
522
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_retrieve, must conform to the pattern #{pattern}."
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
# resource path
|
|
526
|
+
local_var_path = '/component-lists/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
527
|
+
|
|
528
|
+
# query parameters
|
|
529
|
+
query_params = opts[:query_params] || {}
|
|
530
|
+
|
|
531
|
+
# header parameters
|
|
532
|
+
header_params = opts[:header_params] || {}
|
|
533
|
+
# HTTP header 'Accept' (if needed)
|
|
534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
535
|
+
|
|
536
|
+
# form parameters
|
|
537
|
+
form_params = opts[:form_params] || {}
|
|
538
|
+
|
|
539
|
+
# http body (model)
|
|
540
|
+
post_body = opts[:debug_body]
|
|
541
|
+
|
|
542
|
+
# return_type
|
|
543
|
+
return_type = opts[:debug_return_type] || 'ComponentList'
|
|
544
|
+
|
|
545
|
+
# auth_names
|
|
546
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
547
|
+
|
|
548
|
+
new_options = opts.merge(
|
|
549
|
+
:operation => :"ComponentListsApi.component_lists_retrieve",
|
|
550
|
+
:header_params => header_params,
|
|
551
|
+
:query_params => query_params,
|
|
552
|
+
:form_params => form_params,
|
|
553
|
+
:body => post_body,
|
|
554
|
+
:auth_names => auth_names,
|
|
555
|
+
:return_type => return_type
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
559
|
+
if @api_client.config.debugging
|
|
560
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
561
|
+
end
|
|
562
|
+
return data, status_code, headers
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# Component lists API.
|
|
566
|
+
# @param slug [String]
|
|
567
|
+
# @param component_list [ComponentList]
|
|
568
|
+
# @param [Hash] opts the optional parameters
|
|
569
|
+
# @return [ComponentList]
|
|
570
|
+
def component_lists_update(slug, component_list, opts = {})
|
|
571
|
+
data, _status_code, _headers = component_lists_update_with_http_info(slug, component_list, opts)
|
|
572
|
+
data
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
# Component lists API.
|
|
576
|
+
# @param slug [String]
|
|
577
|
+
# @param component_list [ComponentList]
|
|
578
|
+
# @param [Hash] opts the optional parameters
|
|
579
|
+
# @return [Array<(ComponentList, Integer, Hash)>] ComponentList data, response status code and response headers
|
|
580
|
+
def component_lists_update_with_http_info(slug, component_list, opts = {})
|
|
581
|
+
if @api_client.config.debugging
|
|
582
|
+
@api_client.config.logger.debug 'Calling API: ComponentListsApi.component_lists_update ...'
|
|
583
|
+
end
|
|
584
|
+
# verify the required parameter 'slug' is set
|
|
585
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
586
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentListsApi.component_lists_update"
|
|
587
|
+
end
|
|
588
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
589
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
590
|
+
fail ArgumentError, "invalid value for 'slug' when calling ComponentListsApi.component_lists_update, must conform to the pattern #{pattern}."
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
# verify the required parameter 'component_list' is set
|
|
594
|
+
if @api_client.config.client_side_validation && component_list.nil?
|
|
595
|
+
fail ArgumentError, "Missing the required parameter 'component_list' when calling ComponentListsApi.component_lists_update"
|
|
596
|
+
end
|
|
597
|
+
# resource path
|
|
598
|
+
local_var_path = '/component-lists/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
599
|
+
|
|
600
|
+
# query parameters
|
|
601
|
+
query_params = opts[:query_params] || {}
|
|
602
|
+
|
|
603
|
+
# header parameters
|
|
604
|
+
header_params = opts[:header_params] || {}
|
|
605
|
+
# HTTP header 'Accept' (if needed)
|
|
606
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
607
|
+
# HTTP header 'Content-Type'
|
|
608
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
609
|
+
if !content_type.nil?
|
|
610
|
+
header_params['Content-Type'] = content_type
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# form parameters
|
|
614
|
+
form_params = opts[:form_params] || {}
|
|
615
|
+
|
|
616
|
+
# http body (model)
|
|
617
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(component_list)
|
|
618
|
+
|
|
619
|
+
# return_type
|
|
620
|
+
return_type = opts[:debug_return_type] || 'ComponentList'
|
|
621
|
+
|
|
622
|
+
# auth_names
|
|
623
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
624
|
+
|
|
625
|
+
new_options = opts.merge(
|
|
626
|
+
:operation => :"ComponentListsApi.component_lists_update",
|
|
627
|
+
:header_params => header_params,
|
|
628
|
+
:query_params => query_params,
|
|
629
|
+
:form_params => form_params,
|
|
630
|
+
:body => post_body,
|
|
631
|
+
:auth_names => auth_names,
|
|
632
|
+
:return_type => return_type
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
636
|
+
if @api_client.config.debugging
|
|
637
|
+
@api_client.config.logger.debug "API called: ComponentListsApi#component_lists_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
638
|
+
end
|
|
639
|
+
return data, status_code, headers
|
|
640
|
+
end
|
|
641
|
+
end
|
|
642
|
+
end
|