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,1331 @@
|
|
|
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 ProjectsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Translation projects API.
|
|
23
|
+
# @param slug [String]
|
|
24
|
+
# @param project [Project]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Project]
|
|
27
|
+
def projects_addons_create(slug, project, opts = {})
|
|
28
|
+
data, _status_code, _headers = projects_addons_create_with_http_info(slug, project, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Translation projects API.
|
|
33
|
+
# @param slug [String]
|
|
34
|
+
# @param project [Project]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
37
|
+
def projects_addons_create_with_http_info(slug, project, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_addons_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 ProjectsApi.projects_addons_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 ProjectsApi.projects_addons_create, must conform to the pattern #{pattern}."
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# verify the required parameter 'project' is set
|
|
51
|
+
if @api_client.config.client_side_validation && project.nil?
|
|
52
|
+
fail ArgumentError, "Missing the required parameter 'project' when calling ProjectsApi.projects_addons_create"
|
|
53
|
+
end
|
|
54
|
+
# resource path
|
|
55
|
+
local_var_path = '/projects/{slug}/addons/'.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(project)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"ProjectsApi.projects_addons_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: ProjectsApi#projects_addons_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Translation projects API.
|
|
100
|
+
# @param slug [String]
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [Project]
|
|
103
|
+
def projects_categories_retrieve(slug, opts = {})
|
|
104
|
+
data, _status_code, _headers = projects_categories_retrieve_with_http_info(slug, opts)
|
|
105
|
+
data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Translation projects API.
|
|
109
|
+
# @param slug [String]
|
|
110
|
+
# @param [Hash] opts the optional parameters
|
|
111
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
112
|
+
def projects_categories_retrieve_with_http_info(slug, opts = {})
|
|
113
|
+
if @api_client.config.debugging
|
|
114
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_categories_retrieve ...'
|
|
115
|
+
end
|
|
116
|
+
# verify the required parameter 'slug' is set
|
|
117
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_categories_retrieve"
|
|
119
|
+
end
|
|
120
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
121
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
122
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_categories_retrieve, must conform to the pattern #{pattern}."
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# resource path
|
|
126
|
+
local_var_path = '/projects/{slug}/categories/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
127
|
+
|
|
128
|
+
# query parameters
|
|
129
|
+
query_params = opts[:query_params] || {}
|
|
130
|
+
|
|
131
|
+
# header parameters
|
|
132
|
+
header_params = opts[:header_params] || {}
|
|
133
|
+
# HTTP header 'Accept' (if needed)
|
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
135
|
+
|
|
136
|
+
# form parameters
|
|
137
|
+
form_params = opts[:form_params] || {}
|
|
138
|
+
|
|
139
|
+
# http body (model)
|
|
140
|
+
post_body = opts[:debug_body]
|
|
141
|
+
|
|
142
|
+
# return_type
|
|
143
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
144
|
+
|
|
145
|
+
# auth_names
|
|
146
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
147
|
+
|
|
148
|
+
new_options = opts.merge(
|
|
149
|
+
:operation => :"ProjectsApi.projects_categories_retrieve",
|
|
150
|
+
:header_params => header_params,
|
|
151
|
+
:query_params => query_params,
|
|
152
|
+
:form_params => form_params,
|
|
153
|
+
:body => post_body,
|
|
154
|
+
:auth_names => auth_names,
|
|
155
|
+
:return_type => return_type
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_categories_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
161
|
+
end
|
|
162
|
+
return data, status_code, headers
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Translation projects API.
|
|
166
|
+
# @param slug [String]
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @return [Project]
|
|
169
|
+
def projects_changes_retrieve(slug, opts = {})
|
|
170
|
+
data, _status_code, _headers = projects_changes_retrieve_with_http_info(slug, opts)
|
|
171
|
+
data
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Translation projects API.
|
|
175
|
+
# @param slug [String]
|
|
176
|
+
# @param [Hash] opts the optional parameters
|
|
177
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
178
|
+
def projects_changes_retrieve_with_http_info(slug, opts = {})
|
|
179
|
+
if @api_client.config.debugging
|
|
180
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_changes_retrieve ...'
|
|
181
|
+
end
|
|
182
|
+
# verify the required parameter 'slug' is set
|
|
183
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
184
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_changes_retrieve"
|
|
185
|
+
end
|
|
186
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
187
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
188
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_changes_retrieve, must conform to the pattern #{pattern}."
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# resource path
|
|
192
|
+
local_var_path = '/projects/{slug}/changes/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
193
|
+
|
|
194
|
+
# query parameters
|
|
195
|
+
query_params = opts[:query_params] || {}
|
|
196
|
+
|
|
197
|
+
# header parameters
|
|
198
|
+
header_params = opts[:header_params] || {}
|
|
199
|
+
# HTTP header 'Accept' (if needed)
|
|
200
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
201
|
+
|
|
202
|
+
# form parameters
|
|
203
|
+
form_params = opts[:form_params] || {}
|
|
204
|
+
|
|
205
|
+
# http body (model)
|
|
206
|
+
post_body = opts[:debug_body]
|
|
207
|
+
|
|
208
|
+
# return_type
|
|
209
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
210
|
+
|
|
211
|
+
# auth_names
|
|
212
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
213
|
+
|
|
214
|
+
new_options = opts.merge(
|
|
215
|
+
:operation => :"ProjectsApi.projects_changes_retrieve",
|
|
216
|
+
:header_params => header_params,
|
|
217
|
+
:query_params => query_params,
|
|
218
|
+
:form_params => form_params,
|
|
219
|
+
:body => post_body,
|
|
220
|
+
:auth_names => auth_names,
|
|
221
|
+
:return_type => return_type
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
225
|
+
if @api_client.config.debugging
|
|
226
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_changes_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
227
|
+
end
|
|
228
|
+
return data, status_code, headers
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Translation projects API.
|
|
232
|
+
# @param slug [String]
|
|
233
|
+
# @param component [Component]
|
|
234
|
+
# @param [Hash] opts the optional parameters
|
|
235
|
+
# @return [Component]
|
|
236
|
+
def projects_components_create(slug, component, opts = {})
|
|
237
|
+
data, _status_code, _headers = projects_components_create_with_http_info(slug, component, opts)
|
|
238
|
+
data
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Translation projects API.
|
|
242
|
+
# @param slug [String]
|
|
243
|
+
# @param component [Component]
|
|
244
|
+
# @param [Hash] opts the optional parameters
|
|
245
|
+
# @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
|
|
246
|
+
def projects_components_create_with_http_info(slug, component, opts = {})
|
|
247
|
+
if @api_client.config.debugging
|
|
248
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_components_create ...'
|
|
249
|
+
end
|
|
250
|
+
# verify the required parameter 'slug' is set
|
|
251
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
252
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_components_create"
|
|
253
|
+
end
|
|
254
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
255
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
256
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_components_create, must conform to the pattern #{pattern}."
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# verify the required parameter 'component' is set
|
|
260
|
+
if @api_client.config.client_side_validation && component.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'component' when calling ProjectsApi.projects_components_create"
|
|
262
|
+
end
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '/projects/{slug}/components/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
|
|
269
|
+
# header parameters
|
|
270
|
+
header_params = opts[:header_params] || {}
|
|
271
|
+
# HTTP header 'Accept' (if needed)
|
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
273
|
+
# HTTP header 'Content-Type'
|
|
274
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
275
|
+
if !content_type.nil?
|
|
276
|
+
header_params['Content-Type'] = content_type
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# form parameters
|
|
280
|
+
form_params = opts[:form_params] || {}
|
|
281
|
+
|
|
282
|
+
# http body (model)
|
|
283
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(component)
|
|
284
|
+
|
|
285
|
+
# return_type
|
|
286
|
+
return_type = opts[:debug_return_type] || 'Component'
|
|
287
|
+
|
|
288
|
+
# auth_names
|
|
289
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
290
|
+
|
|
291
|
+
new_options = opts.merge(
|
|
292
|
+
:operation => :"ProjectsApi.projects_components_create",
|
|
293
|
+
:header_params => header_params,
|
|
294
|
+
:query_params => query_params,
|
|
295
|
+
:form_params => form_params,
|
|
296
|
+
:body => post_body,
|
|
297
|
+
:auth_names => auth_names,
|
|
298
|
+
:return_type => return_type
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_components_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
304
|
+
end
|
|
305
|
+
return data, status_code, headers
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Translation projects API.
|
|
309
|
+
# @param slug [String]
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @return [Component]
|
|
312
|
+
def projects_components_retrieve(slug, opts = {})
|
|
313
|
+
data, _status_code, _headers = projects_components_retrieve_with_http_info(slug, opts)
|
|
314
|
+
data
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Translation projects API.
|
|
318
|
+
# @param slug [String]
|
|
319
|
+
# @param [Hash] opts the optional parameters
|
|
320
|
+
# @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
|
|
321
|
+
def projects_components_retrieve_with_http_info(slug, opts = {})
|
|
322
|
+
if @api_client.config.debugging
|
|
323
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_components_retrieve ...'
|
|
324
|
+
end
|
|
325
|
+
# verify the required parameter 'slug' is set
|
|
326
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
327
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_components_retrieve"
|
|
328
|
+
end
|
|
329
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
330
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
331
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_components_retrieve, must conform to the pattern #{pattern}."
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# resource path
|
|
335
|
+
local_var_path = '/projects/{slug}/components/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
336
|
+
|
|
337
|
+
# query parameters
|
|
338
|
+
query_params = opts[:query_params] || {}
|
|
339
|
+
|
|
340
|
+
# header parameters
|
|
341
|
+
header_params = opts[:header_params] || {}
|
|
342
|
+
# HTTP header 'Accept' (if needed)
|
|
343
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
344
|
+
|
|
345
|
+
# form parameters
|
|
346
|
+
form_params = opts[:form_params] || {}
|
|
347
|
+
|
|
348
|
+
# http body (model)
|
|
349
|
+
post_body = opts[:debug_body]
|
|
350
|
+
|
|
351
|
+
# return_type
|
|
352
|
+
return_type = opts[:debug_return_type] || 'Component'
|
|
353
|
+
|
|
354
|
+
# auth_names
|
|
355
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
356
|
+
|
|
357
|
+
new_options = opts.merge(
|
|
358
|
+
:operation => :"ProjectsApi.projects_components_retrieve",
|
|
359
|
+
:header_params => header_params,
|
|
360
|
+
:query_params => query_params,
|
|
361
|
+
:form_params => form_params,
|
|
362
|
+
:body => post_body,
|
|
363
|
+
:auth_names => auth_names,
|
|
364
|
+
:return_type => return_type
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
368
|
+
if @api_client.config.debugging
|
|
369
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_components_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
370
|
+
end
|
|
371
|
+
return data, status_code, headers
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Translation projects API.
|
|
375
|
+
# @param project [Project]
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @return [Project]
|
|
378
|
+
def projects_create(project, opts = {})
|
|
379
|
+
data, _status_code, _headers = projects_create_with_http_info(project, opts)
|
|
380
|
+
data
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Translation projects API.
|
|
384
|
+
# @param project [Project]
|
|
385
|
+
# @param [Hash] opts the optional parameters
|
|
386
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
387
|
+
def projects_create_with_http_info(project, opts = {})
|
|
388
|
+
if @api_client.config.debugging
|
|
389
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_create ...'
|
|
390
|
+
end
|
|
391
|
+
# verify the required parameter 'project' is set
|
|
392
|
+
if @api_client.config.client_side_validation && project.nil?
|
|
393
|
+
fail ArgumentError, "Missing the required parameter 'project' when calling ProjectsApi.projects_create"
|
|
394
|
+
end
|
|
395
|
+
# resource path
|
|
396
|
+
local_var_path = '/projects/'
|
|
397
|
+
|
|
398
|
+
# query parameters
|
|
399
|
+
query_params = opts[:query_params] || {}
|
|
400
|
+
|
|
401
|
+
# header parameters
|
|
402
|
+
header_params = opts[:header_params] || {}
|
|
403
|
+
# HTTP header 'Accept' (if needed)
|
|
404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
405
|
+
# HTTP header 'Content-Type'
|
|
406
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
407
|
+
if !content_type.nil?
|
|
408
|
+
header_params['Content-Type'] = content_type
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# form parameters
|
|
412
|
+
form_params = opts[:form_params] || {}
|
|
413
|
+
|
|
414
|
+
# http body (model)
|
|
415
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(project)
|
|
416
|
+
|
|
417
|
+
# return_type
|
|
418
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
419
|
+
|
|
420
|
+
# auth_names
|
|
421
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
422
|
+
|
|
423
|
+
new_options = opts.merge(
|
|
424
|
+
:operation => :"ProjectsApi.projects_create",
|
|
425
|
+
:header_params => header_params,
|
|
426
|
+
:query_params => query_params,
|
|
427
|
+
:form_params => form_params,
|
|
428
|
+
:body => post_body,
|
|
429
|
+
:auth_names => auth_names,
|
|
430
|
+
:return_type => return_type
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
434
|
+
if @api_client.config.debugging
|
|
435
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
436
|
+
end
|
|
437
|
+
return data, status_code, headers
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Translation projects API.
|
|
441
|
+
# @param slug [String]
|
|
442
|
+
# @param [Hash] opts the optional parameters
|
|
443
|
+
# @return [Project]
|
|
444
|
+
def projects_credits_retrieve(slug, opts = {})
|
|
445
|
+
data, _status_code, _headers = projects_credits_retrieve_with_http_info(slug, opts)
|
|
446
|
+
data
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# Translation projects API.
|
|
450
|
+
# @param slug [String]
|
|
451
|
+
# @param [Hash] opts the optional parameters
|
|
452
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
453
|
+
def projects_credits_retrieve_with_http_info(slug, opts = {})
|
|
454
|
+
if @api_client.config.debugging
|
|
455
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_credits_retrieve ...'
|
|
456
|
+
end
|
|
457
|
+
# verify the required parameter 'slug' is set
|
|
458
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
459
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_credits_retrieve"
|
|
460
|
+
end
|
|
461
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
462
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
463
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_credits_retrieve, must conform to the pattern #{pattern}."
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# resource path
|
|
467
|
+
local_var_path = '/projects/{slug}/credits/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
468
|
+
|
|
469
|
+
# query parameters
|
|
470
|
+
query_params = opts[:query_params] || {}
|
|
471
|
+
|
|
472
|
+
# header parameters
|
|
473
|
+
header_params = opts[:header_params] || {}
|
|
474
|
+
# HTTP header 'Accept' (if needed)
|
|
475
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
476
|
+
|
|
477
|
+
# form parameters
|
|
478
|
+
form_params = opts[:form_params] || {}
|
|
479
|
+
|
|
480
|
+
# http body (model)
|
|
481
|
+
post_body = opts[:debug_body]
|
|
482
|
+
|
|
483
|
+
# return_type
|
|
484
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
485
|
+
|
|
486
|
+
# auth_names
|
|
487
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
488
|
+
|
|
489
|
+
new_options = opts.merge(
|
|
490
|
+
:operation => :"ProjectsApi.projects_credits_retrieve",
|
|
491
|
+
:header_params => header_params,
|
|
492
|
+
:query_params => query_params,
|
|
493
|
+
:form_params => form_params,
|
|
494
|
+
:body => post_body,
|
|
495
|
+
:auth_names => auth_names,
|
|
496
|
+
:return_type => return_type
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
500
|
+
if @api_client.config.debugging
|
|
501
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_credits_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
502
|
+
end
|
|
503
|
+
return data, status_code, headers
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# Translation projects API.
|
|
507
|
+
# @param slug [String]
|
|
508
|
+
# @param [Hash] opts the optional parameters
|
|
509
|
+
# @return [nil]
|
|
510
|
+
def projects_destroy(slug, opts = {})
|
|
511
|
+
projects_destroy_with_http_info(slug, opts)
|
|
512
|
+
nil
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
# Translation projects API.
|
|
516
|
+
# @param slug [String]
|
|
517
|
+
# @param [Hash] opts the optional parameters
|
|
518
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
519
|
+
def projects_destroy_with_http_info(slug, opts = {})
|
|
520
|
+
if @api_client.config.debugging
|
|
521
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_destroy ...'
|
|
522
|
+
end
|
|
523
|
+
# verify the required parameter 'slug' is set
|
|
524
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
525
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_destroy"
|
|
526
|
+
end
|
|
527
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
528
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
529
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_destroy, must conform to the pattern #{pattern}."
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
# resource path
|
|
533
|
+
local_var_path = '/projects/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
534
|
+
|
|
535
|
+
# query parameters
|
|
536
|
+
query_params = opts[:query_params] || {}
|
|
537
|
+
|
|
538
|
+
# header parameters
|
|
539
|
+
header_params = opts[:header_params] || {}
|
|
540
|
+
|
|
541
|
+
# form parameters
|
|
542
|
+
form_params = opts[:form_params] || {}
|
|
543
|
+
|
|
544
|
+
# http body (model)
|
|
545
|
+
post_body = opts[:debug_body]
|
|
546
|
+
|
|
547
|
+
# return_type
|
|
548
|
+
return_type = opts[:debug_return_type]
|
|
549
|
+
|
|
550
|
+
# auth_names
|
|
551
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
552
|
+
|
|
553
|
+
new_options = opts.merge(
|
|
554
|
+
:operation => :"ProjectsApi.projects_destroy",
|
|
555
|
+
:header_params => header_params,
|
|
556
|
+
:query_params => query_params,
|
|
557
|
+
:form_params => form_params,
|
|
558
|
+
:body => post_body,
|
|
559
|
+
:auth_names => auth_names,
|
|
560
|
+
:return_type => return_type
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
564
|
+
if @api_client.config.debugging
|
|
565
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
566
|
+
end
|
|
567
|
+
return data, status_code, headers
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# Translation projects API.
|
|
571
|
+
# @param slug [String]
|
|
572
|
+
# @param [Hash] opts the optional parameters
|
|
573
|
+
# @return [Project]
|
|
574
|
+
def projects_file_retrieve(slug, opts = {})
|
|
575
|
+
data, _status_code, _headers = projects_file_retrieve_with_http_info(slug, opts)
|
|
576
|
+
data
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
# Translation projects API.
|
|
580
|
+
# @param slug [String]
|
|
581
|
+
# @param [Hash] opts the optional parameters
|
|
582
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
583
|
+
def projects_file_retrieve_with_http_info(slug, opts = {})
|
|
584
|
+
if @api_client.config.debugging
|
|
585
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_file_retrieve ...'
|
|
586
|
+
end
|
|
587
|
+
# verify the required parameter 'slug' is set
|
|
588
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
589
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_file_retrieve"
|
|
590
|
+
end
|
|
591
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
592
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
593
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_file_retrieve, must conform to the pattern #{pattern}."
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
# resource path
|
|
597
|
+
local_var_path = '/projects/{slug}/file/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
598
|
+
|
|
599
|
+
# query parameters
|
|
600
|
+
query_params = opts[:query_params] || {}
|
|
601
|
+
|
|
602
|
+
# header parameters
|
|
603
|
+
header_params = opts[:header_params] || {}
|
|
604
|
+
# HTTP header 'Accept' (if needed)
|
|
605
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
606
|
+
|
|
607
|
+
# form parameters
|
|
608
|
+
form_params = opts[:form_params] || {}
|
|
609
|
+
|
|
610
|
+
# http body (model)
|
|
611
|
+
post_body = opts[:debug_body]
|
|
612
|
+
|
|
613
|
+
# return_type
|
|
614
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
615
|
+
|
|
616
|
+
# auth_names
|
|
617
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
618
|
+
|
|
619
|
+
new_options = opts.merge(
|
|
620
|
+
:operation => :"ProjectsApi.projects_file_retrieve",
|
|
621
|
+
:header_params => header_params,
|
|
622
|
+
:query_params => query_params,
|
|
623
|
+
:form_params => form_params,
|
|
624
|
+
:body => post_body,
|
|
625
|
+
:auth_names => auth_names,
|
|
626
|
+
:return_type => return_type
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
630
|
+
if @api_client.config.debugging
|
|
631
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_file_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
632
|
+
end
|
|
633
|
+
return data, status_code, headers
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
# Translation projects API.
|
|
637
|
+
# @param slug [String]
|
|
638
|
+
# @param project [Project]
|
|
639
|
+
# @param [Hash] opts the optional parameters
|
|
640
|
+
# @return [Project]
|
|
641
|
+
def projects_labels_create(slug, project, opts = {})
|
|
642
|
+
data, _status_code, _headers = projects_labels_create_with_http_info(slug, project, opts)
|
|
643
|
+
data
|
|
644
|
+
end
|
|
645
|
+
|
|
646
|
+
# Translation projects API.
|
|
647
|
+
# @param slug [String]
|
|
648
|
+
# @param project [Project]
|
|
649
|
+
# @param [Hash] opts the optional parameters
|
|
650
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
651
|
+
def projects_labels_create_with_http_info(slug, project, opts = {})
|
|
652
|
+
if @api_client.config.debugging
|
|
653
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_labels_create ...'
|
|
654
|
+
end
|
|
655
|
+
# verify the required parameter 'slug' is set
|
|
656
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
657
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_labels_create"
|
|
658
|
+
end
|
|
659
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
660
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
661
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_labels_create, must conform to the pattern #{pattern}."
|
|
662
|
+
end
|
|
663
|
+
|
|
664
|
+
# verify the required parameter 'project' is set
|
|
665
|
+
if @api_client.config.client_side_validation && project.nil?
|
|
666
|
+
fail ArgumentError, "Missing the required parameter 'project' when calling ProjectsApi.projects_labels_create"
|
|
667
|
+
end
|
|
668
|
+
# resource path
|
|
669
|
+
local_var_path = '/projects/{slug}/labels/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
670
|
+
|
|
671
|
+
# query parameters
|
|
672
|
+
query_params = opts[:query_params] || {}
|
|
673
|
+
|
|
674
|
+
# header parameters
|
|
675
|
+
header_params = opts[:header_params] || {}
|
|
676
|
+
# HTTP header 'Accept' (if needed)
|
|
677
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
678
|
+
# HTTP header 'Content-Type'
|
|
679
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
680
|
+
if !content_type.nil?
|
|
681
|
+
header_params['Content-Type'] = content_type
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
# form parameters
|
|
685
|
+
form_params = opts[:form_params] || {}
|
|
686
|
+
|
|
687
|
+
# http body (model)
|
|
688
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(project)
|
|
689
|
+
|
|
690
|
+
# return_type
|
|
691
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
692
|
+
|
|
693
|
+
# auth_names
|
|
694
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
695
|
+
|
|
696
|
+
new_options = opts.merge(
|
|
697
|
+
:operation => :"ProjectsApi.projects_labels_create",
|
|
698
|
+
:header_params => header_params,
|
|
699
|
+
:query_params => query_params,
|
|
700
|
+
:form_params => form_params,
|
|
701
|
+
:body => post_body,
|
|
702
|
+
:auth_names => auth_names,
|
|
703
|
+
:return_type => return_type
|
|
704
|
+
)
|
|
705
|
+
|
|
706
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
707
|
+
if @api_client.config.debugging
|
|
708
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_labels_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
709
|
+
end
|
|
710
|
+
return data, status_code, headers
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
# Translation projects API.
|
|
714
|
+
# @param slug [String]
|
|
715
|
+
# @param [Hash] opts the optional parameters
|
|
716
|
+
# @return [Project]
|
|
717
|
+
def projects_labels_retrieve(slug, opts = {})
|
|
718
|
+
data, _status_code, _headers = projects_labels_retrieve_with_http_info(slug, opts)
|
|
719
|
+
data
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
# Translation projects API.
|
|
723
|
+
# @param slug [String]
|
|
724
|
+
# @param [Hash] opts the optional parameters
|
|
725
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
726
|
+
def projects_labels_retrieve_with_http_info(slug, opts = {})
|
|
727
|
+
if @api_client.config.debugging
|
|
728
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_labels_retrieve ...'
|
|
729
|
+
end
|
|
730
|
+
# verify the required parameter 'slug' is set
|
|
731
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
732
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_labels_retrieve"
|
|
733
|
+
end
|
|
734
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
735
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
736
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_labels_retrieve, must conform to the pattern #{pattern}."
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# resource path
|
|
740
|
+
local_var_path = '/projects/{slug}/labels/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
741
|
+
|
|
742
|
+
# query parameters
|
|
743
|
+
query_params = opts[:query_params] || {}
|
|
744
|
+
|
|
745
|
+
# header parameters
|
|
746
|
+
header_params = opts[:header_params] || {}
|
|
747
|
+
# HTTP header 'Accept' (if needed)
|
|
748
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
749
|
+
|
|
750
|
+
# form parameters
|
|
751
|
+
form_params = opts[:form_params] || {}
|
|
752
|
+
|
|
753
|
+
# http body (model)
|
|
754
|
+
post_body = opts[:debug_body]
|
|
755
|
+
|
|
756
|
+
# return_type
|
|
757
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
758
|
+
|
|
759
|
+
# auth_names
|
|
760
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
761
|
+
|
|
762
|
+
new_options = opts.merge(
|
|
763
|
+
:operation => :"ProjectsApi.projects_labels_retrieve",
|
|
764
|
+
:header_params => header_params,
|
|
765
|
+
:query_params => query_params,
|
|
766
|
+
:form_params => form_params,
|
|
767
|
+
:body => post_body,
|
|
768
|
+
:auth_names => auth_names,
|
|
769
|
+
:return_type => return_type
|
|
770
|
+
)
|
|
771
|
+
|
|
772
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
773
|
+
if @api_client.config.debugging
|
|
774
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_labels_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
775
|
+
end
|
|
776
|
+
return data, status_code, headers
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
# Translation projects API.
|
|
780
|
+
# @param slug [String]
|
|
781
|
+
# @param [Hash] opts the optional parameters
|
|
782
|
+
# @return [Project]
|
|
783
|
+
def projects_languages_retrieve(slug, opts = {})
|
|
784
|
+
data, _status_code, _headers = projects_languages_retrieve_with_http_info(slug, opts)
|
|
785
|
+
data
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
# Translation projects API.
|
|
789
|
+
# @param slug [String]
|
|
790
|
+
# @param [Hash] opts the optional parameters
|
|
791
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
792
|
+
def projects_languages_retrieve_with_http_info(slug, opts = {})
|
|
793
|
+
if @api_client.config.debugging
|
|
794
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_languages_retrieve ...'
|
|
795
|
+
end
|
|
796
|
+
# verify the required parameter 'slug' is set
|
|
797
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
798
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_languages_retrieve"
|
|
799
|
+
end
|
|
800
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
801
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
802
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_languages_retrieve, must conform to the pattern #{pattern}."
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
# resource path
|
|
806
|
+
local_var_path = '/projects/{slug}/languages/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
807
|
+
|
|
808
|
+
# query parameters
|
|
809
|
+
query_params = opts[:query_params] || {}
|
|
810
|
+
|
|
811
|
+
# header parameters
|
|
812
|
+
header_params = opts[:header_params] || {}
|
|
813
|
+
# HTTP header 'Accept' (if needed)
|
|
814
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
815
|
+
|
|
816
|
+
# form parameters
|
|
817
|
+
form_params = opts[:form_params] || {}
|
|
818
|
+
|
|
819
|
+
# http body (model)
|
|
820
|
+
post_body = opts[:debug_body]
|
|
821
|
+
|
|
822
|
+
# return_type
|
|
823
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
824
|
+
|
|
825
|
+
# auth_names
|
|
826
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
827
|
+
|
|
828
|
+
new_options = opts.merge(
|
|
829
|
+
:operation => :"ProjectsApi.projects_languages_retrieve",
|
|
830
|
+
:header_params => header_params,
|
|
831
|
+
:query_params => query_params,
|
|
832
|
+
:form_params => form_params,
|
|
833
|
+
:body => post_body,
|
|
834
|
+
:auth_names => auth_names,
|
|
835
|
+
:return_type => return_type
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
839
|
+
if @api_client.config.debugging
|
|
840
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_languages_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
841
|
+
end
|
|
842
|
+
return data, status_code, headers
|
|
843
|
+
end
|
|
844
|
+
|
|
845
|
+
# Translation projects API.
|
|
846
|
+
# @param [Hash] opts the optional parameters
|
|
847
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
848
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
849
|
+
# @return [PaginatedProjectList]
|
|
850
|
+
def projects_list(opts = {})
|
|
851
|
+
data, _status_code, _headers = projects_list_with_http_info(opts)
|
|
852
|
+
data
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
# Translation projects API.
|
|
856
|
+
# @param [Hash] opts the optional parameters
|
|
857
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
858
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
859
|
+
# @return [Array<(PaginatedProjectList, Integer, Hash)>] PaginatedProjectList data, response status code and response headers
|
|
860
|
+
def projects_list_with_http_info(opts = {})
|
|
861
|
+
if @api_client.config.debugging
|
|
862
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_list ...'
|
|
863
|
+
end
|
|
864
|
+
# resource path
|
|
865
|
+
local_var_path = '/projects/'
|
|
866
|
+
|
|
867
|
+
# query parameters
|
|
868
|
+
query_params = opts[:query_params] || {}
|
|
869
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
870
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
871
|
+
|
|
872
|
+
# header parameters
|
|
873
|
+
header_params = opts[:header_params] || {}
|
|
874
|
+
# HTTP header 'Accept' (if needed)
|
|
875
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
876
|
+
|
|
877
|
+
# form parameters
|
|
878
|
+
form_params = opts[:form_params] || {}
|
|
879
|
+
|
|
880
|
+
# http body (model)
|
|
881
|
+
post_body = opts[:debug_body]
|
|
882
|
+
|
|
883
|
+
# return_type
|
|
884
|
+
return_type = opts[:debug_return_type] || 'PaginatedProjectList'
|
|
885
|
+
|
|
886
|
+
# auth_names
|
|
887
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
888
|
+
|
|
889
|
+
new_options = opts.merge(
|
|
890
|
+
:operation => :"ProjectsApi.projects_list",
|
|
891
|
+
:header_params => header_params,
|
|
892
|
+
:query_params => query_params,
|
|
893
|
+
:form_params => form_params,
|
|
894
|
+
:body => post_body,
|
|
895
|
+
:auth_names => auth_names,
|
|
896
|
+
:return_type => return_type
|
|
897
|
+
)
|
|
898
|
+
|
|
899
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
900
|
+
if @api_client.config.debugging
|
|
901
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
902
|
+
end
|
|
903
|
+
return data, status_code, headers
|
|
904
|
+
end
|
|
905
|
+
|
|
906
|
+
# Translation projects API.
|
|
907
|
+
# @param slug [String]
|
|
908
|
+
# @param [Hash] opts the optional parameters
|
|
909
|
+
# @option opts [PatchedProject] :patched_project
|
|
910
|
+
# @return [Project]
|
|
911
|
+
def projects_partial_update(slug, opts = {})
|
|
912
|
+
data, _status_code, _headers = projects_partial_update_with_http_info(slug, opts)
|
|
913
|
+
data
|
|
914
|
+
end
|
|
915
|
+
|
|
916
|
+
# Translation projects API.
|
|
917
|
+
# @param slug [String]
|
|
918
|
+
# @param [Hash] opts the optional parameters
|
|
919
|
+
# @option opts [PatchedProject] :patched_project
|
|
920
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
921
|
+
def projects_partial_update_with_http_info(slug, opts = {})
|
|
922
|
+
if @api_client.config.debugging
|
|
923
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_partial_update ...'
|
|
924
|
+
end
|
|
925
|
+
# verify the required parameter 'slug' is set
|
|
926
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
927
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_partial_update"
|
|
928
|
+
end
|
|
929
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
930
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
931
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_partial_update, must conform to the pattern #{pattern}."
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
# resource path
|
|
935
|
+
local_var_path = '/projects/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
936
|
+
|
|
937
|
+
# query parameters
|
|
938
|
+
query_params = opts[:query_params] || {}
|
|
939
|
+
|
|
940
|
+
# header parameters
|
|
941
|
+
header_params = opts[:header_params] || {}
|
|
942
|
+
# HTTP header 'Accept' (if needed)
|
|
943
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
944
|
+
# HTTP header 'Content-Type'
|
|
945
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
946
|
+
if !content_type.nil?
|
|
947
|
+
header_params['Content-Type'] = content_type
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
# form parameters
|
|
951
|
+
form_params = opts[:form_params] || {}
|
|
952
|
+
|
|
953
|
+
# http body (model)
|
|
954
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_project'])
|
|
955
|
+
|
|
956
|
+
# return_type
|
|
957
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
958
|
+
|
|
959
|
+
# auth_names
|
|
960
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
961
|
+
|
|
962
|
+
new_options = opts.merge(
|
|
963
|
+
:operation => :"ProjectsApi.projects_partial_update",
|
|
964
|
+
:header_params => header_params,
|
|
965
|
+
:query_params => query_params,
|
|
966
|
+
:form_params => form_params,
|
|
967
|
+
:body => post_body,
|
|
968
|
+
:auth_names => auth_names,
|
|
969
|
+
:return_type => return_type
|
|
970
|
+
)
|
|
971
|
+
|
|
972
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
973
|
+
if @api_client.config.debugging
|
|
974
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
975
|
+
end
|
|
976
|
+
return data, status_code, headers
|
|
977
|
+
end
|
|
978
|
+
|
|
979
|
+
# Translation projects API.
|
|
980
|
+
# @param slug [String]
|
|
981
|
+
# @param repo_request [RepoRequest]
|
|
982
|
+
# @param [Hash] opts the optional parameters
|
|
983
|
+
# @return [RepoRequest]
|
|
984
|
+
def projects_repository_create(slug, repo_request, opts = {})
|
|
985
|
+
data, _status_code, _headers = projects_repository_create_with_http_info(slug, repo_request, opts)
|
|
986
|
+
data
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
# Translation projects API.
|
|
990
|
+
# @param slug [String]
|
|
991
|
+
# @param repo_request [RepoRequest]
|
|
992
|
+
# @param [Hash] opts the optional parameters
|
|
993
|
+
# @return [Array<(RepoRequest, Integer, Hash)>] RepoRequest data, response status code and response headers
|
|
994
|
+
def projects_repository_create_with_http_info(slug, repo_request, opts = {})
|
|
995
|
+
if @api_client.config.debugging
|
|
996
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_repository_create ...'
|
|
997
|
+
end
|
|
998
|
+
# verify the required parameter 'slug' is set
|
|
999
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
1000
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_repository_create"
|
|
1001
|
+
end
|
|
1002
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
1003
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
1004
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_repository_create, must conform to the pattern #{pattern}."
|
|
1005
|
+
end
|
|
1006
|
+
|
|
1007
|
+
# verify the required parameter 'repo_request' is set
|
|
1008
|
+
if @api_client.config.client_side_validation && repo_request.nil?
|
|
1009
|
+
fail ArgumentError, "Missing the required parameter 'repo_request' when calling ProjectsApi.projects_repository_create"
|
|
1010
|
+
end
|
|
1011
|
+
# resource path
|
|
1012
|
+
local_var_path = '/projects/{slug}/repository/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
1013
|
+
|
|
1014
|
+
# query parameters
|
|
1015
|
+
query_params = opts[:query_params] || {}
|
|
1016
|
+
|
|
1017
|
+
# header parameters
|
|
1018
|
+
header_params = opts[:header_params] || {}
|
|
1019
|
+
# HTTP header 'Accept' (if needed)
|
|
1020
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1021
|
+
# HTTP header 'Content-Type'
|
|
1022
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
1023
|
+
if !content_type.nil?
|
|
1024
|
+
header_params['Content-Type'] = content_type
|
|
1025
|
+
end
|
|
1026
|
+
|
|
1027
|
+
# form parameters
|
|
1028
|
+
form_params = opts[:form_params] || {}
|
|
1029
|
+
|
|
1030
|
+
# http body (model)
|
|
1031
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(repo_request)
|
|
1032
|
+
|
|
1033
|
+
# return_type
|
|
1034
|
+
return_type = opts[:debug_return_type] || 'RepoRequest'
|
|
1035
|
+
|
|
1036
|
+
# auth_names
|
|
1037
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
1038
|
+
|
|
1039
|
+
new_options = opts.merge(
|
|
1040
|
+
:operation => :"ProjectsApi.projects_repository_create",
|
|
1041
|
+
:header_params => header_params,
|
|
1042
|
+
:query_params => query_params,
|
|
1043
|
+
:form_params => form_params,
|
|
1044
|
+
:body => post_body,
|
|
1045
|
+
:auth_names => auth_names,
|
|
1046
|
+
:return_type => return_type
|
|
1047
|
+
)
|
|
1048
|
+
|
|
1049
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1050
|
+
if @api_client.config.debugging
|
|
1051
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_repository_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1052
|
+
end
|
|
1053
|
+
return data, status_code, headers
|
|
1054
|
+
end
|
|
1055
|
+
|
|
1056
|
+
# Translation projects API.
|
|
1057
|
+
# @param slug [String]
|
|
1058
|
+
# @param [Hash] opts the optional parameters
|
|
1059
|
+
# @return [RepoRequest]
|
|
1060
|
+
def projects_repository_retrieve(slug, opts = {})
|
|
1061
|
+
data, _status_code, _headers = projects_repository_retrieve_with_http_info(slug, opts)
|
|
1062
|
+
data
|
|
1063
|
+
end
|
|
1064
|
+
|
|
1065
|
+
# Translation projects API.
|
|
1066
|
+
# @param slug [String]
|
|
1067
|
+
# @param [Hash] opts the optional parameters
|
|
1068
|
+
# @return [Array<(RepoRequest, Integer, Hash)>] RepoRequest data, response status code and response headers
|
|
1069
|
+
def projects_repository_retrieve_with_http_info(slug, opts = {})
|
|
1070
|
+
if @api_client.config.debugging
|
|
1071
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_repository_retrieve ...'
|
|
1072
|
+
end
|
|
1073
|
+
# verify the required parameter 'slug' is set
|
|
1074
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
1075
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_repository_retrieve"
|
|
1076
|
+
end
|
|
1077
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
1078
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
1079
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_repository_retrieve, must conform to the pattern #{pattern}."
|
|
1080
|
+
end
|
|
1081
|
+
|
|
1082
|
+
# resource path
|
|
1083
|
+
local_var_path = '/projects/{slug}/repository/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
1084
|
+
|
|
1085
|
+
# query parameters
|
|
1086
|
+
query_params = opts[:query_params] || {}
|
|
1087
|
+
|
|
1088
|
+
# header parameters
|
|
1089
|
+
header_params = opts[:header_params] || {}
|
|
1090
|
+
# HTTP header 'Accept' (if needed)
|
|
1091
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1092
|
+
|
|
1093
|
+
# form parameters
|
|
1094
|
+
form_params = opts[:form_params] || {}
|
|
1095
|
+
|
|
1096
|
+
# http body (model)
|
|
1097
|
+
post_body = opts[:debug_body]
|
|
1098
|
+
|
|
1099
|
+
# return_type
|
|
1100
|
+
return_type = opts[:debug_return_type] || 'RepoRequest'
|
|
1101
|
+
|
|
1102
|
+
# auth_names
|
|
1103
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
1104
|
+
|
|
1105
|
+
new_options = opts.merge(
|
|
1106
|
+
:operation => :"ProjectsApi.projects_repository_retrieve",
|
|
1107
|
+
:header_params => header_params,
|
|
1108
|
+
:query_params => query_params,
|
|
1109
|
+
:form_params => form_params,
|
|
1110
|
+
:body => post_body,
|
|
1111
|
+
:auth_names => auth_names,
|
|
1112
|
+
:return_type => return_type
|
|
1113
|
+
)
|
|
1114
|
+
|
|
1115
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1116
|
+
if @api_client.config.debugging
|
|
1117
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_repository_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1118
|
+
end
|
|
1119
|
+
return data, status_code, headers
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
# Translation projects API.
|
|
1123
|
+
# @param slug [String]
|
|
1124
|
+
# @param [Hash] opts the optional parameters
|
|
1125
|
+
# @return [Project]
|
|
1126
|
+
def projects_retrieve(slug, opts = {})
|
|
1127
|
+
data, _status_code, _headers = projects_retrieve_with_http_info(slug, opts)
|
|
1128
|
+
data
|
|
1129
|
+
end
|
|
1130
|
+
|
|
1131
|
+
# Translation projects API.
|
|
1132
|
+
# @param slug [String]
|
|
1133
|
+
# @param [Hash] opts the optional parameters
|
|
1134
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
1135
|
+
def projects_retrieve_with_http_info(slug, opts = {})
|
|
1136
|
+
if @api_client.config.debugging
|
|
1137
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_retrieve ...'
|
|
1138
|
+
end
|
|
1139
|
+
# verify the required parameter 'slug' is set
|
|
1140
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
1141
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_retrieve"
|
|
1142
|
+
end
|
|
1143
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
1144
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
1145
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_retrieve, must conform to the pattern #{pattern}."
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
# resource path
|
|
1149
|
+
local_var_path = '/projects/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
1150
|
+
|
|
1151
|
+
# query parameters
|
|
1152
|
+
query_params = opts[:query_params] || {}
|
|
1153
|
+
|
|
1154
|
+
# header parameters
|
|
1155
|
+
header_params = opts[:header_params] || {}
|
|
1156
|
+
# HTTP header 'Accept' (if needed)
|
|
1157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1158
|
+
|
|
1159
|
+
# form parameters
|
|
1160
|
+
form_params = opts[:form_params] || {}
|
|
1161
|
+
|
|
1162
|
+
# http body (model)
|
|
1163
|
+
post_body = opts[:debug_body]
|
|
1164
|
+
|
|
1165
|
+
# return_type
|
|
1166
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
1167
|
+
|
|
1168
|
+
# auth_names
|
|
1169
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
1170
|
+
|
|
1171
|
+
new_options = opts.merge(
|
|
1172
|
+
:operation => :"ProjectsApi.projects_retrieve",
|
|
1173
|
+
:header_params => header_params,
|
|
1174
|
+
:query_params => query_params,
|
|
1175
|
+
:form_params => form_params,
|
|
1176
|
+
:body => post_body,
|
|
1177
|
+
:auth_names => auth_names,
|
|
1178
|
+
:return_type => return_type
|
|
1179
|
+
)
|
|
1180
|
+
|
|
1181
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1182
|
+
if @api_client.config.debugging
|
|
1183
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1184
|
+
end
|
|
1185
|
+
return data, status_code, headers
|
|
1186
|
+
end
|
|
1187
|
+
|
|
1188
|
+
# Translation projects API.
|
|
1189
|
+
# @param slug [String]
|
|
1190
|
+
# @param [Hash] opts the optional parameters
|
|
1191
|
+
# @return [Project]
|
|
1192
|
+
def projects_statistics_retrieve(slug, opts = {})
|
|
1193
|
+
data, _status_code, _headers = projects_statistics_retrieve_with_http_info(slug, opts)
|
|
1194
|
+
data
|
|
1195
|
+
end
|
|
1196
|
+
|
|
1197
|
+
# Translation projects API.
|
|
1198
|
+
# @param slug [String]
|
|
1199
|
+
# @param [Hash] opts the optional parameters
|
|
1200
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
1201
|
+
def projects_statistics_retrieve_with_http_info(slug, opts = {})
|
|
1202
|
+
if @api_client.config.debugging
|
|
1203
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_statistics_retrieve ...'
|
|
1204
|
+
end
|
|
1205
|
+
# verify the required parameter 'slug' is set
|
|
1206
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
1207
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_statistics_retrieve"
|
|
1208
|
+
end
|
|
1209
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
1210
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
1211
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_statistics_retrieve, must conform to the pattern #{pattern}."
|
|
1212
|
+
end
|
|
1213
|
+
|
|
1214
|
+
# resource path
|
|
1215
|
+
local_var_path = '/projects/{slug}/statistics/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
1216
|
+
|
|
1217
|
+
# query parameters
|
|
1218
|
+
query_params = opts[:query_params] || {}
|
|
1219
|
+
|
|
1220
|
+
# header parameters
|
|
1221
|
+
header_params = opts[:header_params] || {}
|
|
1222
|
+
# HTTP header 'Accept' (if needed)
|
|
1223
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1224
|
+
|
|
1225
|
+
# form parameters
|
|
1226
|
+
form_params = opts[:form_params] || {}
|
|
1227
|
+
|
|
1228
|
+
# http body (model)
|
|
1229
|
+
post_body = opts[:debug_body]
|
|
1230
|
+
|
|
1231
|
+
# return_type
|
|
1232
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
1233
|
+
|
|
1234
|
+
# auth_names
|
|
1235
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
1236
|
+
|
|
1237
|
+
new_options = opts.merge(
|
|
1238
|
+
:operation => :"ProjectsApi.projects_statistics_retrieve",
|
|
1239
|
+
:header_params => header_params,
|
|
1240
|
+
:query_params => query_params,
|
|
1241
|
+
:form_params => form_params,
|
|
1242
|
+
:body => post_body,
|
|
1243
|
+
:auth_names => auth_names,
|
|
1244
|
+
:return_type => return_type
|
|
1245
|
+
)
|
|
1246
|
+
|
|
1247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1248
|
+
if @api_client.config.debugging
|
|
1249
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_statistics_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1250
|
+
end
|
|
1251
|
+
return data, status_code, headers
|
|
1252
|
+
end
|
|
1253
|
+
|
|
1254
|
+
# Translation projects API.
|
|
1255
|
+
# @param slug [String]
|
|
1256
|
+
# @param project [Project]
|
|
1257
|
+
# @param [Hash] opts the optional parameters
|
|
1258
|
+
# @return [Project]
|
|
1259
|
+
def projects_update(slug, project, opts = {})
|
|
1260
|
+
data, _status_code, _headers = projects_update_with_http_info(slug, project, opts)
|
|
1261
|
+
data
|
|
1262
|
+
end
|
|
1263
|
+
|
|
1264
|
+
# Translation projects API.
|
|
1265
|
+
# @param slug [String]
|
|
1266
|
+
# @param project [Project]
|
|
1267
|
+
# @param [Hash] opts the optional parameters
|
|
1268
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
1269
|
+
def projects_update_with_http_info(slug, project, opts = {})
|
|
1270
|
+
if @api_client.config.debugging
|
|
1271
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_update ...'
|
|
1272
|
+
end
|
|
1273
|
+
# verify the required parameter 'slug' is set
|
|
1274
|
+
if @api_client.config.client_side_validation && slug.nil?
|
|
1275
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling ProjectsApi.projects_update"
|
|
1276
|
+
end
|
|
1277
|
+
pattern = Regexp.new(/^[^\/]+$/)
|
|
1278
|
+
if @api_client.config.client_side_validation && slug !~ pattern
|
|
1279
|
+
fail ArgumentError, "invalid value for 'slug' when calling ProjectsApi.projects_update, must conform to the pattern #{pattern}."
|
|
1280
|
+
end
|
|
1281
|
+
|
|
1282
|
+
# verify the required parameter 'project' is set
|
|
1283
|
+
if @api_client.config.client_side_validation && project.nil?
|
|
1284
|
+
fail ArgumentError, "Missing the required parameter 'project' when calling ProjectsApi.projects_update"
|
|
1285
|
+
end
|
|
1286
|
+
# resource path
|
|
1287
|
+
local_var_path = '/projects/{slug}/'.sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
|
1288
|
+
|
|
1289
|
+
# query parameters
|
|
1290
|
+
query_params = opts[:query_params] || {}
|
|
1291
|
+
|
|
1292
|
+
# header parameters
|
|
1293
|
+
header_params = opts[:header_params] || {}
|
|
1294
|
+
# HTTP header 'Accept' (if needed)
|
|
1295
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1296
|
+
# HTTP header 'Content-Type'
|
|
1297
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
1298
|
+
if !content_type.nil?
|
|
1299
|
+
header_params['Content-Type'] = content_type
|
|
1300
|
+
end
|
|
1301
|
+
|
|
1302
|
+
# form parameters
|
|
1303
|
+
form_params = opts[:form_params] || {}
|
|
1304
|
+
|
|
1305
|
+
# http body (model)
|
|
1306
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(project)
|
|
1307
|
+
|
|
1308
|
+
# return_type
|
|
1309
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
1310
|
+
|
|
1311
|
+
# auth_names
|
|
1312
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
1313
|
+
|
|
1314
|
+
new_options = opts.merge(
|
|
1315
|
+
:operation => :"ProjectsApi.projects_update",
|
|
1316
|
+
:header_params => header_params,
|
|
1317
|
+
:query_params => query_params,
|
|
1318
|
+
:form_params => form_params,
|
|
1319
|
+
:body => post_body,
|
|
1320
|
+
:auth_names => auth_names,
|
|
1321
|
+
:return_type => return_type
|
|
1322
|
+
)
|
|
1323
|
+
|
|
1324
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1325
|
+
if @api_client.config.debugging
|
|
1326
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1327
|
+
end
|
|
1328
|
+
return data, status_code, headers
|
|
1329
|
+
end
|
|
1330
|
+
end
|
|
1331
|
+
end
|