docs/SettingsApi
Forgejo::SettingsApi
All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
get_general_api_settings | GET /settings/api | Get instance’s global settings for api |
get_general_attachment_settings | GET /settings/attachment | Get instance’s global settings for Attachment |
get_general_repository_settings | GET /settings/repository | Get instance’s global settings for repositories |
get_general_ui_settings | GET /settings/ui | Get instance’s global settings for ui |
get_general_api_settings
> get_general_api_settings
Get instance’s global settings for api
Examples
require 'time' require 'forgejo' # setup authorization Forgejo.configure do |config| # Configure API key authorization: AuthorizationHeaderToken config.api_key['Authorization'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['Authorization'] = 'Bearer' end api_instance = Forgejo::SettingsApi.new begin # Get instance's global settings for api result = api_instance.get_general_api_settings p result rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_api_settings: #{e}" end
Using the get_general_api_settings_with_http_info variant
This returns an Array which contains the response data, status code and headers.
> , Integer, Hash)> get_general_api_settings_with_http_info
begin # Get instance's global settings for api data, status_code, headers = api_instance.get_general_api_settings_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_api_settings_with_http_info: #{e}" end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
get_general_attachment_settings
> get_general_attachment_settings
Get instance’s global settings for Attachment
Examples
require 'time' require 'forgejo' # setup authorization Forgejo.configure do |config| # Configure API key authorization: AuthorizationHeaderToken config.api_key['Authorization'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['Authorization'] = 'Bearer' end api_instance = Forgejo::SettingsApi.new begin # Get instance's global settings for Attachment result = api_instance.get_general_attachment_settings p result rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_attachment_settings: #{e}" end
Using the get_general_attachment_settings_with_http_info variant
This returns an Array which contains the response data, status code and headers.
> , Integer, Hash)> get_general_attachment_settings_with_http_info
begin # Get instance's global settings for Attachment data, status_code, headers = api_instance.get_general_attachment_settings_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_attachment_settings_with_http_info: #{e}" end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
get_general_repository_settings
> get_general_repository_settings
Get instance’s global settings for repositories
Examples
require 'time' require 'forgejo' # setup authorization Forgejo.configure do |config| # Configure API key authorization: AuthorizationHeaderToken config.api_key['Authorization'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['Authorization'] = 'Bearer' end api_instance = Forgejo::SettingsApi.new begin # Get instance's global settings for repositories result = api_instance.get_general_repository_settings p result rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_repository_settings: #{e}" end
Using the get_general_repository_settings_with_http_info variant
This returns an Array which contains the response data, status code and headers.
> , Integer, Hash)> get_general_repository_settings_with_http_info
begin # Get instance's global settings for repositories data, status_code, headers = api_instance.get_general_repository_settings_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_repository_settings_with_http_info: #{e}" end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
get_general_ui_settings
> get_general_ui_settings
Get instance’s global settings for ui
Examples
require 'time' require 'forgejo' # setup authorization Forgejo.configure do |config| # Configure API key authorization: AuthorizationHeaderToken config.api_key['Authorization'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['Authorization'] = 'Bearer' end api_instance = Forgejo::SettingsApi.new begin # Get instance's global settings for ui result = api_instance.get_general_ui_settings p result rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_ui_settings: #{e}" end
Using the get_general_ui_settings_with_http_info variant
This returns an Array which contains the response data, status code and headers.
> , Integer, Hash)> get_general_ui_settings_with_http_info
begin # Get instance's global settings for ui data, status_code, headers = api_instance.get_general_ui_settings_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue Forgejo::ApiError => e puts "Error when calling SettingsApi->get_general_ui_settings_with_http_info: #{e}" end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json