Class: Forgejo::AdminApi
- Inherits:
-
Object
- Object
- Forgejo::AdminApi
- Defined in:
- lib/forgejo/api/admin_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#admin_add_rule_to_quota_group(quotagroup, quotarule, opts = {}) ⇒ nil
Adds a rule to a quota group.
-
#admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Adds a rule to a quota group.
-
#admin_add_user_to_quota_group(quotagroup, username, opts = {}) ⇒ nil
Add a user to a quota group.
-
#admin_add_user_to_quota_group_with_http_info(quotagroup, username, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add a user to a quota group.
-
#admin_adopt_repository(owner, repo, opts = {}) ⇒ nil
Adopt unadopted files as a repository.
-
#admin_adopt_repository_with_http_info(owner, repo, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Adopt unadopted files as a repository.
-
#admin_create_hook(body, opts = {}) ⇒ Hook
Create a hook.
-
#admin_create_hook_with_http_info(body, opts = {}) ⇒ Array<(Hook, Integer, Hash)>
Create a hook.
-
#admin_create_org(username, organization, opts = {}) ⇒ Organization
Create an organization.
-
#admin_create_org_with_http_info(username, organization, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Create an organization.
-
#admin_create_public_key(username, opts = {}) ⇒ PublicKey
Add a public key on behalf of a user.
-
#admin_create_public_key_with_http_info(username, opts = {}) ⇒ Array<(PublicKey, Integer, Hash)>
Add a public key on behalf of a user.
-
#admin_create_quota_group(group, opts = {}) ⇒ QuotaGroup
Create a new quota group.
-
#admin_create_quota_group_with_http_info(group, opts = {}) ⇒ Array<(QuotaGroup, Integer, Hash)>
Create a new quota group.
-
#admin_create_quota_rule(rule, opts = {}) ⇒ QuotaRuleInfo
Create a new quota rule.
-
#admin_create_quota_rule_with_http_info(rule, opts = {}) ⇒ Array<(QuotaRuleInfo, Integer, Hash)>
Create a new quota rule.
-
#admin_create_repo(username, repository, opts = {}) ⇒ Repository
Create a repository on behalf of a user.
-
#admin_create_repo_with_http_info(username, repository, opts = {}) ⇒ Array<(Repository, Integer, Hash)>
Create a repository on behalf of a user.
-
#admin_create_user(opts = {}) ⇒ User
Create a user.
-
#admin_create_user_with_http_info(opts = {}) ⇒ Array<(User, Integer, Hash)>
Create a user.
-
#admin_cron_list(opts = {}) ⇒ Array<Cron>
List cron tasks.
-
#admin_cron_list_with_http_info(opts = {}) ⇒ Array<(Array<Cron>, Integer, Hash)>
List cron tasks.
-
#admin_cron_run(task, opts = {}) ⇒ nil
Run cron task.
-
#admin_cron_run_with_http_info(task, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Run cron task.
-
#admin_d_elete_quota_rule(quotarule, opts = {}) ⇒ nil
Deletes a quota rule.
-
#admin_d_elete_quota_rule_with_http_info(quotarule, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a quota rule.
-
#admin_delete_hook(id, opts = {}) ⇒ nil
Delete a hook.
-
#admin_delete_hook_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a hook.
-
#admin_delete_quota_group(quotagroup, opts = {}) ⇒ nil
Delete a quota group.
-
#admin_delete_quota_group_with_http_info(quotagroup, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a quota group.
-
#admin_delete_unadopted_repository(owner, repo, opts = {}) ⇒ nil
Delete unadopted files.
-
#admin_delete_unadopted_repository_with_http_info(owner, repo, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete unadopted files.
-
#admin_delete_user(username, opts = {}) ⇒ nil
Delete a user.
-
#admin_delete_user_public_key(username, id, opts = {}) ⇒ nil
Delete a user’s public key.
-
#admin_delete_user_public_key_with_http_info(username, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a user's public key.
-
#admin_delete_user_with_http_info(username, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a user.
-
#admin_edit_hook(id, opts = {}) ⇒ Hook
Update a hook.
-
#admin_edit_hook_with_http_info(id, opts = {}) ⇒ Array<(Hook, Integer, Hash)>
Update a hook.
-
#admin_edit_quota_rule(quotarule, rule, opts = {}) ⇒ QuotaRuleInfo
Change an existing quota rule.
-
#admin_edit_quota_rule_with_http_info(quotarule, rule, opts = {}) ⇒ Array<(QuotaRuleInfo, Integer, Hash)>
Change an existing quota rule.
-
#admin_edit_user(username, opts = {}) ⇒ User
Edit an existing user.
-
#admin_edit_user_with_http_info(username, opts = {}) ⇒ Array<(User, Integer, Hash)>
Edit an existing user.
-
#admin_get_all_emails(opts = {}) ⇒ Array<Email>
List all emails.
-
#admin_get_all_emails_with_http_info(opts = {}) ⇒ Array<(Array<Email>, Integer, Hash)>
List all emails.
-
#admin_get_all_orgs(opts = {}) ⇒ Array<Organization>
List all organizations.
-
#admin_get_all_orgs_with_http_info(opts = {}) ⇒ Array<(Array<Organization>, Integer, Hash)>
List all organizations.
-
#admin_get_hook(id, opts = {}) ⇒ Hook
Get a hook.
-
#admin_get_hook_with_http_info(id, opts = {}) ⇒ Array<(Hook, Integer, Hash)>
Get a hook.
-
#admin_get_quota_group(quotagroup, opts = {}) ⇒ QuotaGroup
Get information about the quota group.
-
#admin_get_quota_group_with_http_info(quotagroup, opts = {}) ⇒ Array<(QuotaGroup, Integer, Hash)>
Get information about the quota group.
-
#admin_get_quota_rule(quotarule, opts = {}) ⇒ QuotaRuleInfo
Get information about a quota rule.
-
#admin_get_quota_rule_with_http_info(quotarule, opts = {}) ⇒ Array<(QuotaRuleInfo, Integer, Hash)>
Get information about a quota rule.
-
#admin_get_runner_registration_token(opts = {}) ⇒ nil
Get an global actions runner registration token.
-
#admin_get_runner_registration_token_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get an global actions runner registration token.
-
#admin_get_user_quota(username, opts = {}) ⇒ QuotaInfo
Get the user’s quota info.
-
#admin_get_user_quota_with_http_info(username, opts = {}) ⇒ Array<(QuotaInfo, Integer, Hash)>
Get the user's quota info.
-
#admin_list_hooks(opts = {}) ⇒ Array<Hook>
List system’s webhooks.
-
#admin_list_hooks_with_http_info(opts = {}) ⇒ Array<(Array<Hook>, Integer, Hash)>
List system's webhooks.
-
#admin_list_quota_groups(opts = {}) ⇒ Array<QuotaGroup>
List the available quota groups.
-
#admin_list_quota_groups_with_http_info(opts = {}) ⇒ Array<(Array<QuotaGroup>, Integer, Hash)>
List the available quota groups.
-
#admin_list_quota_rules(opts = {}) ⇒ Array<QuotaRuleInfo>
List the available quota rules.
-
#admin_list_quota_rules_with_http_info(opts = {}) ⇒ Array<(Array<QuotaRuleInfo>, Integer, Hash)>
List the available quota rules.
-
#admin_list_users_in_quota_group(quotagroup, opts = {}) ⇒ Array<User>
List users in a quota group.
-
#admin_list_users_in_quota_group_with_http_info(quotagroup, opts = {}) ⇒ Array<(Array<User>, Integer, Hash)>
List users in a quota group.
-
#admin_remove_rule_from_quota_group(quotagroup, quotarule, opts = {}) ⇒ nil
Removes a rule from a quota group.
-
#admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Removes a rule from a quota group.
-
#admin_remove_user_from_quota_group(quotagroup, username, opts = {}) ⇒ nil
Remove a user from a quota group.
-
#admin_remove_user_from_quota_group_with_http_info(quotagroup, username, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a user from a quota group.
-
#admin_rename_user(username, body, opts = {}) ⇒ nil
Rename a user.
-
#admin_rename_user_with_http_info(username, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Rename a user.
-
#admin_search_emails(opts = {}) ⇒ Array<Email>
Search all emails.
-
#admin_search_emails_with_http_info(opts = {}) ⇒ Array<(Array<Email>, Integer, Hash)>
Search all emails.
-
#admin_search_users(opts = {}) ⇒ Array<User>
Search users according filter conditions.
-
#admin_search_users_with_http_info(opts = {}) ⇒ Array<(Array<User>, Integer, Hash)>
Search users according filter conditions.
-
#admin_set_user_quota_groups(username, groups, opts = {}) ⇒ nil
Set the user’s quota groups to a given list.
-
#admin_set_user_quota_groups_with_http_info(username, groups, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set the user's quota groups to a given list.
-
#admin_unadopted_list(opts = {}) ⇒ Array<String>
List unadopted repositories.
-
#admin_unadopted_list_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List unadopted repositories.
-
#initialize(api_client = ApiClient.default) ⇒ AdminApi
constructor
A new instance of AdminApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/forgejo/api/admin_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#admin_add_rule_to_quota_group(quotagroup, quotarule, opts = {}) ⇒ nil
Adds a rule to a quota group
27 28 29 30 |
# File 'lib/forgejo/api/admin_api.rb', line 27 def admin_add_rule_to_quota_group(quotagroup, quotarule, opts = {}) admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule, opts) nil end |
#admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Adds a rule to a quota group
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/forgejo/api/admin_api.rb', line 37 def admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_add_rule_to_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_add_rule_to_quota_group" end # verify the required parameter 'quotarule' is set if @api_client.config.client_side_validation && quotarule.nil? fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_add_rule_to_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}/rules/{quotarule}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_add_rule_to_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_add_rule_to_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_add_user_to_quota_group(quotagroup, username, opts = {}) ⇒ nil
Add a user to a quota group
94 95 96 97 |
# File 'lib/forgejo/api/admin_api.rb', line 94 def admin_add_user_to_quota_group(quotagroup, username, opts = {}) admin_add_user_to_quota_group_with_http_info(quotagroup, username, opts) nil end |
#admin_add_user_to_quota_group_with_http_info(quotagroup, username, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add a user to a quota group
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/forgejo/api/admin_api.rb', line 104 def admin_add_user_to_quota_group_with_http_info(quotagroup, username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_add_user_to_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_add_user_to_quota_group" end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_add_user_to_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}/users/{username}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_add_user_to_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_add_user_to_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_adopt_repository(owner, repo, opts = {}) ⇒ nil
Adopt unadopted files as a repository
161 162 163 164 |
# File 'lib/forgejo/api/admin_api.rb', line 161 def admin_adopt_repository(owner, repo, opts = {}) admin_adopt_repository_with_http_info(owner, repo, opts) nil end |
#admin_adopt_repository_with_http_info(owner, repo, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Adopt unadopted files as a repository
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/forgejo/api/admin_api.rb', line 171 def admin_adopt_repository_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_adopt_repository ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling AdminApi.admin_adopt_repository" end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling AdminApi.admin_adopt_repository" end # resource path local_var_path = '/admin/unadopted/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_adopt_repository", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_adopt_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_hook(body, opts = {}) ⇒ Hook
Create a hook
227 228 229 230 |
# File 'lib/forgejo/api/admin_api.rb', line 227 def admin_create_hook(body, opts = {}) data, _status_code, _headers = admin_create_hook_with_http_info(body, opts) data end |
#admin_create_hook_with_http_info(body, opts = {}) ⇒ Array<(Hook, Integer, Hash)>
Create a hook
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/forgejo/api/admin_api.rb', line 236 def admin_create_hook_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_hook ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.admin_create_hook" end # resource path local_var_path = '/admin/hooks' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'Hook' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_hook", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_org(username, organization, opts = {}) ⇒ Organization
Create an organization
294 295 296 297 |
# File 'lib/forgejo/api/admin_api.rb', line 294 def admin_create_org(username, organization, opts = {}) data, _status_code, _headers = admin_create_org_with_http_info(username, organization, opts) data end |
#admin_create_org_with_http_info(username, organization, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Create an organization
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/forgejo/api/admin_api.rb', line 304 def admin_create_org_with_http_info(username, organization, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_org ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_create_org" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling AdminApi.admin_create_org" end # resource path local_var_path = '/admin/users/{username}/orgs'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(organization) # return_type return_type = opts[:debug_return_type] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_org", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_public_key(username, opts = {}) ⇒ PublicKey
Add a public key on behalf of a user
366 367 368 369 |
# File 'lib/forgejo/api/admin_api.rb', line 366 def admin_create_public_key(username, opts = {}) data, _status_code, _headers = admin_create_public_key_with_http_info(username, opts) data end |
#admin_create_public_key_with_http_info(username, opts = {}) ⇒ Array<(PublicKey, Integer, Hash)>
Add a public key on behalf of a user
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/forgejo/api/admin_api.rb', line 376 def admin_create_public_key_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_public_key ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_create_public_key" end # resource path local_var_path = '/admin/users/{username}/keys'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'key']) # return_type return_type = opts[:debug_return_type] || 'PublicKey' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_public_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_quota_group(group, opts = {}) ⇒ QuotaGroup
Create a new quota group
433 434 435 436 |
# File 'lib/forgejo/api/admin_api.rb', line 433 def admin_create_quota_group(group, opts = {}) data, _status_code, _headers = admin_create_quota_group_with_http_info(group, opts) data end |
#admin_create_quota_group_with_http_info(group, opts = {}) ⇒ Array<(QuotaGroup, Integer, Hash)>
Create a new quota group
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/forgejo/api/admin_api.rb', line 442 def admin_create_quota_group_with_http_info(group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_quota_group ...' end # verify the required parameter 'group' is set if @api_client.config.client_side_validation && group.nil? fail ArgumentError, "Missing the required parameter 'group' when calling AdminApi.admin_create_quota_group" end # resource path local_var_path = '/admin/quota/groups' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/plain']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(group) # return_type return_type = opts[:debug_return_type] || 'QuotaGroup' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_quota_rule(rule, opts = {}) ⇒ QuotaRuleInfo
Create a new quota rule
499 500 501 502 |
# File 'lib/forgejo/api/admin_api.rb', line 499 def admin_create_quota_rule(rule, opts = {}) data, _status_code, _headers = admin_create_quota_rule_with_http_info(rule, opts) data end |
#admin_create_quota_rule_with_http_info(rule, opts = {}) ⇒ Array<(QuotaRuleInfo, Integer, Hash)>
Create a new quota rule
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/forgejo/api/admin_api.rb', line 508 def admin_create_quota_rule_with_http_info(rule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_quota_rule ...' end # verify the required parameter 'rule' is set if @api_client.config.client_side_validation && rule.nil? fail ArgumentError, "Missing the required parameter 'rule' when calling AdminApi.admin_create_quota_rule" end # resource path local_var_path = '/admin/quota/rules' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/plain']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(rule) # return_type return_type = opts[:debug_return_type] || 'QuotaRuleInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_quota_rule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_repo(username, repository, opts = {}) ⇒ Repository
Create a repository on behalf of a user
566 567 568 569 |
# File 'lib/forgejo/api/admin_api.rb', line 566 def admin_create_repo(username, repository, opts = {}) data, _status_code, _headers = admin_create_repo_with_http_info(username, repository, opts) data end |
#admin_create_repo_with_http_info(username, repository, opts = {}) ⇒ Array<(Repository, Integer, Hash)>
Create a repository on behalf of a user
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/forgejo/api/admin_api.rb', line 576 def admin_create_repo_with_http_info(username, repository, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_repo ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_create_repo" end # verify the required parameter 'repository' is set if @api_client.config.client_side_validation && repository.nil? fail ArgumentError, "Missing the required parameter 'repository' when calling AdminApi.admin_create_repo" end # resource path local_var_path = '/admin/users/{username}/repos'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(repository) # return_type return_type = opts[:debug_return_type] || 'Repository' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_repo", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_repo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_create_user(opts = {}) ⇒ User
Create a user
637 638 639 640 |
# File 'lib/forgejo/api/admin_api.rb', line 637 def admin_create_user(opts = {}) data, _status_code, _headers = admin_create_user_with_http_info(opts) data end |
#admin_create_user_with_http_info(opts = {}) ⇒ Array<(User, Integer, Hash)>
Create a user
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/forgejo/api/admin_api.rb', line 646 def admin_create_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_user ...' end # resource path local_var_path = '/admin/users' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_create_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_cron_list(opts = {}) ⇒ Array<Cron>
List cron tasks
700 701 702 703 |
# File 'lib/forgejo/api/admin_api.rb', line 700 def admin_cron_list(opts = {}) data, _status_code, _headers = admin_cron_list_with_http_info(opts) data end |
#admin_cron_list_with_http_info(opts = {}) ⇒ Array<(Array<Cron>, Integer, Hash)>
List cron tasks
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/forgejo/api/admin_api.rb', line 710 def admin_cron_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_cron_list ...' end # resource path local_var_path = '/admin/cron' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Cron>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_cron_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_cron_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_cron_run(task, opts = {}) ⇒ nil
Run cron task
760 761 762 763 |
# File 'lib/forgejo/api/admin_api.rb', line 760 def admin_cron_run(task, opts = {}) admin_cron_run_with_http_info(task, opts) nil end |
#admin_cron_run_with_http_info(task, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Run cron task
769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 |
# File 'lib/forgejo/api/admin_api.rb', line 769 def admin_cron_run_with_http_info(task, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_cron_run ...' end # verify the required parameter 'task' is set if @api_client.config.client_side_validation && task.nil? fail ArgumentError, "Missing the required parameter 'task' when calling AdminApi.admin_cron_run" end # resource path local_var_path = '/admin/cron/{task}'.sub('{' + 'task' + '}', CGI.escape(task.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_cron_run", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_cron_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_d_elete_quota_rule(quotarule, opts = {}) ⇒ nil
Deletes a quota rule
821 822 823 824 |
# File 'lib/forgejo/api/admin_api.rb', line 821 def admin_d_elete_quota_rule(quotarule, opts = {}) admin_d_elete_quota_rule_with_http_info(quotarule, opts) nil end |
#admin_d_elete_quota_rule_with_http_info(quotarule, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a quota rule
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/forgejo/api/admin_api.rb', line 830 def admin_d_elete_quota_rule_with_http_info(quotarule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_d_elete_quota_rule ...' end # verify the required parameter 'quotarule' is set if @api_client.config.client_side_validation && quotarule.nil? fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_d_elete_quota_rule" end # resource path local_var_path = '/admin/quota/rules/{quotarule}'.sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_d_elete_quota_rule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_d_elete_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_delete_hook(id, opts = {}) ⇒ nil
Delete a hook
882 883 884 885 |
# File 'lib/forgejo/api/admin_api.rb', line 882 def admin_delete_hook(id, opts = {}) admin_delete_hook_with_http_info(id, opts) nil end |
#admin_delete_hook_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a hook
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
# File 'lib/forgejo/api/admin_api.rb', line 891 def admin_delete_hook_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_hook ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_delete_hook" end # resource path local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_delete_hook", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_delete_quota_group(quotagroup, opts = {}) ⇒ nil
Delete a quota group
941 942 943 944 |
# File 'lib/forgejo/api/admin_api.rb', line 941 def admin_delete_quota_group(quotagroup, opts = {}) admin_delete_quota_group_with_http_info(quotagroup, opts) nil end |
#admin_delete_quota_group_with_http_info(quotagroup, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a quota group
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
# File 'lib/forgejo/api/admin_api.rb', line 950 def admin_delete_quota_group_with_http_info(quotagroup, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_delete_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_delete_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_delete_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_delete_unadopted_repository(owner, repo, opts = {}) ⇒ nil
Delete unadopted files
1003 1004 1005 1006 |
# File 'lib/forgejo/api/admin_api.rb', line 1003 def admin_delete_unadopted_repository(owner, repo, opts = {}) admin_delete_unadopted_repository_with_http_info(owner, repo, opts) nil end |
#admin_delete_unadopted_repository_with_http_info(owner, repo, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete unadopted files
1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/forgejo/api/admin_api.rb', line 1013 def admin_delete_unadopted_repository_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_unadopted_repository ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling AdminApi.admin_delete_unadopted_repository" end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling AdminApi.admin_delete_unadopted_repository" end # resource path local_var_path = '/admin/unadopted/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_delete_unadopted_repository", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_delete_unadopted_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_delete_user(username, opts = {}) ⇒ nil
Delete a user
1070 1071 1072 1073 |
# File 'lib/forgejo/api/admin_api.rb', line 1070 def admin_delete_user(username, opts = {}) admin_delete_user_with_http_info(username, opts) nil end |
#admin_delete_user_public_key(username, id, opts = {}) ⇒ nil
Delete a user’s public key
1134 1135 1136 1137 |
# File 'lib/forgejo/api/admin_api.rb', line 1134 def admin_delete_user_public_key(username, id, opts = {}) admin_delete_user_public_key_with_http_info(username, id, opts) nil end |
#admin_delete_user_public_key_with_http_info(username, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a user's public key
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 |
# File 'lib/forgejo/api/admin_api.rb', line 1144 def admin_delete_user_public_key_with_http_info(username, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_user_public_key ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_delete_user_public_key" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_delete_user_public_key" end # resource path local_var_path = '/admin/users/{username}/keys/{id}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_delete_user_public_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_delete_user_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_delete_user_with_http_info(username, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a user
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 |
# File 'lib/forgejo/api/admin_api.rb', line 1080 def admin_delete_user_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_user ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_delete_user" end # resource path local_var_path = '/admin/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'purge'] = opts[:'purge'] if !opts[:'purge'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_delete_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_edit_hook(id, opts = {}) ⇒ Hook
Update a hook
1201 1202 1203 1204 |
# File 'lib/forgejo/api/admin_api.rb', line 1201 def admin_edit_hook(id, opts = {}) data, _status_code, _headers = admin_edit_hook_with_http_info(id, opts) data end |
#admin_edit_hook_with_http_info(id, opts = {}) ⇒ Array<(Hook, Integer, Hash)>
Update a hook
1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 |
# File 'lib/forgejo/api/admin_api.rb', line 1211 def admin_edit_hook_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_edit_hook ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_edit_hook" end # resource path local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'Hook' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_edit_hook", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_edit_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_edit_quota_rule(quotarule, rule, opts = {}) ⇒ QuotaRuleInfo
Change an existing quota rule
1269 1270 1271 1272 |
# File 'lib/forgejo/api/admin_api.rb', line 1269 def admin_edit_quota_rule(quotarule, rule, opts = {}) data, _status_code, _headers = admin_edit_quota_rule_with_http_info(quotarule, rule, opts) data end |
#admin_edit_quota_rule_with_http_info(quotarule, rule, opts = {}) ⇒ Array<(QuotaRuleInfo, Integer, Hash)>
Change an existing quota rule
1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 |
# File 'lib/forgejo/api/admin_api.rb', line 1279 def admin_edit_quota_rule_with_http_info(quotarule, rule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_edit_quota_rule ...' end # verify the required parameter 'quotarule' is set if @api_client.config.client_side_validation && quotarule.nil? fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_edit_quota_rule" end # verify the required parameter 'rule' is set if @api_client.config.client_side_validation && rule.nil? fail ArgumentError, "Missing the required parameter 'rule' when calling AdminApi.admin_edit_quota_rule" end # resource path local_var_path = '/admin/quota/rules/{quotarule}'.sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/plain']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(rule) # return_type return_type = opts[:debug_return_type] || 'QuotaRuleInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_edit_quota_rule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_edit_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_edit_user(username, opts = {}) ⇒ User
Edit an existing user
1341 1342 1343 1344 |
# File 'lib/forgejo/api/admin_api.rb', line 1341 def admin_edit_user(username, opts = {}) data, _status_code, _headers = admin_edit_user_with_http_info(username, opts) data end |
#admin_edit_user_with_http_info(username, opts = {}) ⇒ Array<(User, Integer, Hash)>
Edit an existing user
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 |
# File 'lib/forgejo/api/admin_api.rb', line 1351 def admin_edit_user_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_edit_user ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_edit_user" end # resource path local_var_path = '/admin/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_edit_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_edit_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_all_emails(opts = {}) ⇒ Array<Email>
List all emails
1409 1410 1411 1412 |
# File 'lib/forgejo/api/admin_api.rb', line 1409 def admin_get_all_emails(opts = {}) data, _status_code, _headers = admin_get_all_emails_with_http_info(opts) data end |
#admin_get_all_emails_with_http_info(opts = {}) ⇒ Array<(Array<Email>, Integer, Hash)>
List all emails
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 |
# File 'lib/forgejo/api/admin_api.rb', line 1419 def admin_get_all_emails_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_all_emails ...' end # resource path local_var_path = '/admin/emails' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Email>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_all_emails", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_all_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_all_orgs(opts = {}) ⇒ Array<Organization>
List all organizations
1470 1471 1472 1473 |
# File 'lib/forgejo/api/admin_api.rb', line 1470 def admin_get_all_orgs(opts = {}) data, _status_code, _headers = admin_get_all_orgs_with_http_info(opts) data end |
#admin_get_all_orgs_with_http_info(opts = {}) ⇒ Array<(Array<Organization>, Integer, Hash)>
List all organizations
1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 |
# File 'lib/forgejo/api/admin_api.rb', line 1480 def admin_get_all_orgs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_all_orgs ...' end # resource path local_var_path = '/admin/orgs' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Organization>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_all_orgs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_all_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_hook(id, opts = {}) ⇒ Hook
Get a hook
1530 1531 1532 1533 |
# File 'lib/forgejo/api/admin_api.rb', line 1530 def admin_get_hook(id, opts = {}) data, _status_code, _headers = admin_get_hook_with_http_info(id, opts) data end |
#admin_get_hook_with_http_info(id, opts = {}) ⇒ Array<(Hook, Integer, Hash)>
Get a hook
1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 |
# File 'lib/forgejo/api/admin_api.rb', line 1539 def admin_get_hook_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_hook ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_get_hook" end # resource path local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hook' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_hook", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_quota_group(quotagroup, opts = {}) ⇒ QuotaGroup
Get information about the quota group
1591 1592 1593 1594 |
# File 'lib/forgejo/api/admin_api.rb', line 1591 def admin_get_quota_group(quotagroup, opts = {}) data, _status_code, _headers = admin_get_quota_group_with_http_info(quotagroup, opts) data end |
#admin_get_quota_group_with_http_info(quotagroup, opts = {}) ⇒ Array<(QuotaGroup, Integer, Hash)>
Get information about the quota group
1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 |
# File 'lib/forgejo/api/admin_api.rb', line 1600 def admin_get_quota_group_with_http_info(quotagroup, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_get_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'QuotaGroup' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_quota_rule(quotarule, opts = {}) ⇒ QuotaRuleInfo
Get information about a quota rule
1652 1653 1654 1655 |
# File 'lib/forgejo/api/admin_api.rb', line 1652 def admin_get_quota_rule(quotarule, opts = {}) data, _status_code, _headers = admin_get_quota_rule_with_http_info(quotarule, opts) data end |
#admin_get_quota_rule_with_http_info(quotarule, opts = {}) ⇒ Array<(QuotaRuleInfo, Integer, Hash)>
Get information about a quota rule
1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 |
# File 'lib/forgejo/api/admin_api.rb', line 1661 def admin_get_quota_rule_with_http_info(quotarule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_quota_rule ...' end # verify the required parameter 'quotarule' is set if @api_client.config.client_side_validation && quotarule.nil? fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_get_quota_rule" end # resource path local_var_path = '/admin/quota/rules/{quotarule}'.sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'QuotaRuleInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_quota_rule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_runner_registration_token(opts = {}) ⇒ nil
Get an global actions runner registration token
1712 1713 1714 1715 |
# File 'lib/forgejo/api/admin_api.rb', line 1712 def admin_get_runner_registration_token(opts = {}) admin_get_runner_registration_token_with_http_info(opts) nil end |
#admin_get_runner_registration_token_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get an global actions runner registration token
1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 |
# File 'lib/forgejo/api/admin_api.rb', line 1720 def admin_get_runner_registration_token_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_runner_registration_token ...' end # resource path local_var_path = '/admin/runners/registration-token' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_runner_registration_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_runner_registration_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_get_user_quota(username, opts = {}) ⇒ QuotaInfo
Get the user’s quota info
1766 1767 1768 1769 |
# File 'lib/forgejo/api/admin_api.rb', line 1766 def admin_get_user_quota(username, opts = {}) data, _status_code, _headers = admin_get_user_quota_with_http_info(username, opts) data end |
#admin_get_user_quota_with_http_info(username, opts = {}) ⇒ Array<(QuotaInfo, Integer, Hash)>
Get the user's quota info
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 |
# File 'lib/forgejo/api/admin_api.rb', line 1775 def admin_get_user_quota_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_user_quota ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_get_user_quota" end # resource path local_var_path = '/admin/users/{username}/quota'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'QuotaInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_get_user_quota", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_get_user_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_list_hooks(opts = {}) ⇒ Array<Hook>
List system’s webhooks
1828 1829 1830 1831 |
# File 'lib/forgejo/api/admin_api.rb', line 1828 def admin_list_hooks(opts = {}) data, _status_code, _headers = admin_list_hooks_with_http_info(opts) data end |
#admin_list_hooks_with_http_info(opts = {}) ⇒ Array<(Array<Hook>, Integer, Hash)>
List system's webhooks
1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 |
# File 'lib/forgejo/api/admin_api.rb', line 1838 def admin_list_hooks_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_hooks ...' end # resource path local_var_path = '/admin/hooks' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Hook>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_list_hooks", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_list_quota_groups(opts = {}) ⇒ Array<QuotaGroup>
List the available quota groups
1887 1888 1889 1890 |
# File 'lib/forgejo/api/admin_api.rb', line 1887 def admin_list_quota_groups(opts = {}) data, _status_code, _headers = admin_list_quota_groups_with_http_info(opts) data end |
#admin_list_quota_groups_with_http_info(opts = {}) ⇒ Array<(Array<QuotaGroup>, Integer, Hash)>
List the available quota groups
1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 |
# File 'lib/forgejo/api/admin_api.rb', line 1895 def admin_list_quota_groups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_quota_groups ...' end # resource path local_var_path = '/admin/quota/groups' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<QuotaGroup>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_list_quota_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_list_quota_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_list_quota_rules(opts = {}) ⇒ Array<QuotaRuleInfo>
List the available quota rules
1942 1943 1944 1945 |
# File 'lib/forgejo/api/admin_api.rb', line 1942 def admin_list_quota_rules(opts = {}) data, _status_code, _headers = admin_list_quota_rules_with_http_info(opts) data end |
#admin_list_quota_rules_with_http_info(opts = {}) ⇒ Array<(Array<QuotaRuleInfo>, Integer, Hash)>
List the available quota rules
1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 |
# File 'lib/forgejo/api/admin_api.rb', line 1950 def admin_list_quota_rules_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_quota_rules ...' end # resource path local_var_path = '/admin/quota/rules' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<QuotaRuleInfo>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_list_quota_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_list_quota_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_list_users_in_quota_group(quotagroup, opts = {}) ⇒ Array<User>
List users in a quota group
1998 1999 2000 2001 |
# File 'lib/forgejo/api/admin_api.rb', line 1998 def admin_list_users_in_quota_group(quotagroup, opts = {}) data, _status_code, _headers = admin_list_users_in_quota_group_with_http_info(quotagroup, opts) data end |
#admin_list_users_in_quota_group_with_http_info(quotagroup, opts = {}) ⇒ Array<(Array<User>, Integer, Hash)>
List users in a quota group
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 |
# File 'lib/forgejo/api/admin_api.rb', line 2007 def admin_list_users_in_quota_group_with_http_info(quotagroup, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_users_in_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_list_users_in_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}/users'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<User>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_list_users_in_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_list_users_in_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_remove_rule_from_quota_group(quotagroup, quotarule, opts = {}) ⇒ nil
Removes a rule from a quota group
2060 2061 2062 2063 |
# File 'lib/forgejo/api/admin_api.rb', line 2060 def admin_remove_rule_from_quota_group(quotagroup, quotarule, opts = {}) admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule, opts) nil end |
#admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Removes a rule from a quota group
2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 |
# File 'lib/forgejo/api/admin_api.rb', line 2070 def admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_remove_rule_from_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_remove_rule_from_quota_group" end # verify the required parameter 'quotarule' is set if @api_client.config.client_side_validation && quotarule.nil? fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_remove_rule_from_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}/rules/{quotarule}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_remove_rule_from_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_remove_rule_from_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_remove_user_from_quota_group(quotagroup, username, opts = {}) ⇒ nil
Remove a user from a quota group
2127 2128 2129 2130 |
# File 'lib/forgejo/api/admin_api.rb', line 2127 def admin_remove_user_from_quota_group(quotagroup, username, opts = {}) admin_remove_user_from_quota_group_with_http_info(quotagroup, username, opts) nil end |
#admin_remove_user_from_quota_group_with_http_info(quotagroup, username, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a user from a quota group
2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 |
# File 'lib/forgejo/api/admin_api.rb', line 2137 def admin_remove_user_from_quota_group_with_http_info(quotagroup, username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_remove_user_from_quota_group ...' end # verify the required parameter 'quotagroup' is set if @api_client.config.client_side_validation && quotagroup.nil? fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_remove_user_from_quota_group" end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_remove_user_from_quota_group" end # resource path local_var_path = '/admin/quota/groups/{quotagroup}/users/{username}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_remove_user_from_quota_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_remove_user_from_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_rename_user(username, body, opts = {}) ⇒ nil
Rename a user
2194 2195 2196 2197 |
# File 'lib/forgejo/api/admin_api.rb', line 2194 def admin_rename_user(username, body, opts = {}) admin_rename_user_with_http_info(username, body, opts) nil end |
#admin_rename_user_with_http_info(username, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Rename a user
2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 |
# File 'lib/forgejo/api/admin_api.rb', line 2204 def admin_rename_user_with_http_info(username, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_rename_user ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_rename_user" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.admin_rename_user" end # resource path local_var_path = '/admin/users/{username}/rename'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/plain']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_rename_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_rename_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_search_emails(opts = {}) ⇒ Array<Email>
Search all emails
2267 2268 2269 2270 |
# File 'lib/forgejo/api/admin_api.rb', line 2267 def admin_search_emails(opts = {}) data, _status_code, _headers = admin_search_emails_with_http_info(opts) data end |
#admin_search_emails_with_http_info(opts = {}) ⇒ Array<(Array<Email>, Integer, Hash)>
Search all emails
2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 |
# File 'lib/forgejo/api/admin_api.rb', line 2278 def admin_search_emails_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_search_emails ...' end # resource path local_var_path = '/admin/emails/search' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Email>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_search_emails", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_search_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_search_users(opts = {}) ⇒ Array<User>
Search users according filter conditions
2333 2334 2335 2336 |
# File 'lib/forgejo/api/admin_api.rb', line 2333 def admin_search_users(opts = {}) data, _status_code, _headers = admin_search_users_with_http_info(opts) data end |
#admin_search_users_with_http_info(opts = {}) ⇒ Array<(Array<User>, Integer, Hash)>
Search users according filter conditions
2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 |
# File 'lib/forgejo/api/admin_api.rb', line 2346 def admin_search_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_search_users ...' end allowable_values = ["oldest", "newest", "alphabetically", "reversealphabetically", "recentupdate", "leastupdate"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/admin/users' # query parameters query_params = opts[:query_params] || {} query_params[:'source_id'] = opts[:'source_id'] if !opts[:'source_id'].nil? query_params[:'login_name'] = opts[:'login_name'] if !opts[:'login_name'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<User>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_search_users", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_search_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_set_user_quota_groups(username, groups, opts = {}) ⇒ nil
Set the user’s quota groups to a given list.
2404 2405 2406 2407 |
# File 'lib/forgejo/api/admin_api.rb', line 2404 def admin_set_user_quota_groups(username, groups, opts = {}) admin_set_user_quota_groups_with_http_info(username, groups, opts) nil end |
#admin_set_user_quota_groups_with_http_info(username, groups, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set the user's quota groups to a given list.
2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 |
# File 'lib/forgejo/api/admin_api.rb', line 2414 def admin_set_user_quota_groups_with_http_info(username, groups, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_set_user_quota_groups ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_set_user_quota_groups" end # verify the required parameter 'groups' is set if @api_client.config.client_side_validation && groups.nil? fail ArgumentError, "Missing the required parameter 'groups' when calling AdminApi.admin_set_user_quota_groups" end # resource path local_var_path = '/admin/users/{username}/quota/groups'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/plain']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(groups) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_set_user_quota_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_set_user_quota_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#admin_unadopted_list(opts = {}) ⇒ Array<String>
List unadopted repositories
2477 2478 2479 2480 |
# File 'lib/forgejo/api/admin_api.rb', line 2477 def admin_unadopted_list(opts = {}) data, _status_code, _headers = admin_unadopted_list_with_http_info(opts) data end |
#admin_unadopted_list_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List unadopted repositories
2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 |
# File 'lib/forgejo/api/admin_api.rb', line 2488 def admin_unadopted_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AdminApi.admin_unadopted_list ...' end # resource path local_var_path = '/admin/unadopted' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'pattern'] = opts[:'pattern'] if !opts[:'pattern'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"AdminApi.admin_unadopted_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AdminApi#admin_unadopted_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |