docs/UserApi

Forgejo::UserApi

All URIs are relative to /api/v1

Method HTTP request Description
create_current_user_repo POST /user/repos Create a repository
create_user_variable POST /user/actions/variables/{variablename} Create a user-level variable
delete_user_secret DELETE /user/actions/secrets/{secretname} Delete a secret in a user scope
delete_user_variable DELETE /user/actions/variables/{variablename} Delete a user-level variable which is created by current doer
get_user_settings GET /user/settings Get user settings
get_user_variable GET /user/actions/variables/{variablename} Get a user-level variable which is created by current doer
get_user_variables_list GET /user/actions/variables Get the user-level list of variables which is created by current doer
get_verification_token GET /user/gpg_key_token Get a Token to verify
update_user_secret PUT /user/actions/secrets/{secretname} Create or Update a secret value in a user scope
update_user_settings PATCH /user/settings Update user settings
update_user_variable PUT /user/actions/variables/{variablename} Update a user-level variable which is created by current doer
user_add_email POST /user/emails Add email addresses
user_block_user PUT /user/block/{username} Blocks a user from the doer.
user_check_following GET /users/{username}/following/{target} Check if one user is following another user
user_check_quota GET /user/quota/check Check if the authenticated user is over quota for a given subject
user_create_hook POST /user/hooks Create a hook
user_create_o_auth2_application POST /user/applications/oauth2 creates a new OAuth2 application
user_create_token POST /users/{username}/tokens Create an access token
user_current_check_following GET /user/following/{username} Check whether a user is followed by the authenticated user
user_current_check_starring GET /user/starred/{owner}/{repo} Whether the authenticated is starring the repo
user_current_delete_follow DELETE /user/following/{username} Unfollow a user
user_current_delete_gpg_key DELETE /user/gpg_keys/{id} Remove a GPG key
user_current_delete_key DELETE /user/keys/{id} Delete a public key
user_current_delete_star DELETE /user/starred/{owner}/{repo} Unstar the given repo
user_current_get_gpg_key GET /user/gpg_keys/{id} Get a GPG key
user_current_get_key GET /user/keys/{id} Get a public key
user_current_list_followers GET /user/followers List the authenticated user’s followers
user_current_list_following GET /user/following List the users that the authenticated user is following
user_current_list_gpg_keys GET /user/gpg_keys List the authenticated user’s GPG keys
user_current_list_keys GET /user/keys List the authenticated user’s public keys
user_current_list_repos GET /user/repos List the repos that the authenticated user owns
user_current_list_starred GET /user/starred The repos that the authenticated user has starred
user_current_list_subscriptions GET /user/subscriptions List repositories watched by the authenticated user
user_current_post_gpg_key POST /user/gpg_keys Create a GPG key
user_current_post_key POST /user/keys Create a public key
user_current_put_follow PUT /user/following/{username} Follow a user
user_current_put_star PUT /user/starred/{owner}/{repo} Star the given repo
user_current_tracked_times GET /user/times List the current user’s tracked times
user_delete_access_token DELETE /users/{username}/tokens/{token} delete an access token
user_delete_avatar DELETE /user/avatar Delete Avatar
user_delete_email DELETE /user/emails Delete email addresses
user_delete_hook DELETE /user/hooks/{id} Delete a hook
user_delete_o_auth2_application DELETE /user/applications/oauth2/{id} delete an OAuth2 Application
user_edit_hook PATCH /user/hooks/{id} Update a hook
user_get GET /users/{username} Get a user
user_get_current GET /user Get the authenticated user
user_get_heatmap_data GET /users/{username}/heatmap Get a user’s heatmap
user_get_hook GET /user/hooks/{id} Get a hook
user_get_o_auth2_application GET /user/applications/oauth2/{id} get an OAuth2 Application
user_get_o_auth2_applications GET /user/applications/oauth2 List the authenticated user’s oauth2 applications
user_get_quota GET /user/quota Get quota information for the authenticated user
user_get_runner_registration_token GET /user/actions/runners/registration-token Get an user’s actions runner registration token
user_get_stop_watches GET /user/stopwatches Get list of all existing stopwatches
user_get_tokens GET /users/{username}/tokens List the authenticated user’s access tokens
user_list_activity_feeds GET /users/{username}/activities/feeds List a user’s activity feeds
user_list_blocked_users GET /user/list_blocked List the authenticated user’s blocked users
user_list_emails GET /user/emails List the authenticated user’s email addresses
user_list_followers GET /users/{username}/followers List the given user’s followers
user_list_following GET /users/{username}/following List the users that the given user is following
user_list_gpg_keys GET /users/{username}/gpg_keys List the given user’s GPG keys
user_list_hooks GET /user/hooks List the authenticated user’s webhooks
user_list_keys GET /users/{username}/keys List the given user’s public keys
user_list_quota_artifacts GET /user/quota/artifacts List the artifacts affecting the authenticated user’s quota
user_list_quota_attachments GET /user/quota/attachments List the attachments affecting the authenticated user’s quota
user_list_quota_packages GET /user/quota/packages List the packages affecting the authenticated user’s quota
user_list_repos GET /users/{username}/repos List the repos owned by the given user
user_list_starred GET /users/{username}/starred The repos that the given user has starred
user_list_subscriptions GET /users/{username}/subscriptions List the repositories watched by a user
user_list_teams GET /user/teams List all the teams a user belongs to
user_search GET /users/search Search for users
user_unblock_user PUT /user/unblock/{username} Unblocks a user from the doer.
user_update_avatar POST /user/avatar Update Avatar
user_update_o_auth2_application PATCH /user/applications/oauth2/{id} update an OAuth2 Application, this includes regenerating the client secret
user_verify_gpg_key POST /user/gpg_key_verify Verify a GPG key

create_current_user_repo

> create_current_user_repo(opts)

Create a repository

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::UserApi.new
opts = {
  body: Forgejo::CreateRepoOption.new({name: 'name_example'}) # CreateRepoOption | 
}

begin
  # Create a repository
  result = api_instance.create_current_user_repo(opts)
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->create_current_user_repo: #{e}"
end

Using the create_current_user_repo_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> create_current_user_repo_with_http_info(opts)

begin
  # Create a repository
  data, status_code, headers = api_instance.create_current_user_repo_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->create_current_user_repo_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body CreateRepoOption [optional]

Return type

Repository

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

create_user_variable

> create_user_variable(variablename, opts)

Create a user-level variable

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::UserApi.new
variablename = 'variablename_example' # String | name of the variable
opts = {
  body: Forgejo::CreateVariableOption.new({value: 'value_example'}) # CreateVariableOption | 
}

begin
  # Create a user-level variable
  api_instance.create_user_variable(variablename, opts)
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->create_user_variable: #{e}"
end

Using the create_user_variable_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> create_user_variable_with_http_info(variablename, opts)

begin
  # Create a user-level variable
  data, status_code, headers = api_instance.create_user_variable_with_http_info(variablename, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->create_user_variable_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
variablename String name of the variable
body CreateVariableOption [optional]

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

delete_user_secret

> delete_user_secret(secretname)

Delete a secret in a user scope

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::UserApi.new
secretname = 'secretname_example' # String | name of the secret

begin
  # Delete a secret in a user scope
  api_instance.delete_user_secret(secretname)
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->delete_user_secret: #{e}"
end

Using the delete_user_secret_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> delete_user_secret_with_http_info(secretname)

begin
  # Delete a secret in a user scope
  data, status_code, headers = api_instance.delete_user_secret_with_http_info(secretname)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->delete_user_secret_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
secretname String name of the secret

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

delete_user_variable

> delete_user_variable(variablename)

Delete a user-level variable which is created by current doer

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::UserApi.new
variablename = 'variablename_example' # String | name of the variable

begin
  # Delete a user-level variable which is created by current doer
  api_instance.delete_user_variable(variablename)
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->delete_user_variable: #{e}"
end

Using the delete_user_variable_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> delete_user_variable_with_http_info(variablename)

begin
  # Delete a user-level variable which is created by current doer
  data, status_code, headers = api_instance.delete_user_variable_with_http_info(variablename)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->delete_user_variable_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
variablename String name of the variable

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_user_settings

> get_user_settings

Get user settings

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::UserApi.new

begin
  # Get user settings
  result = api_instance.get_user_settings
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->get_user_settings: #{e}"
end

Using the get_user_settings_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> get_user_settings_with_http_info

begin
  # Get user settings
  data, status_code, headers = api_instance.get_user_settings_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->get_user_settings_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

UserSettings

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_user_variable

> get_user_variable(variablename)

Get a user-level variable which is created by current doer

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::UserApi.new
variablename = 'variablename_example' # String | name of the variable

begin
  # Get a user-level variable which is created by current doer
  result = api_instance.get_user_variable(variablename)
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->get_user_variable: #{e}"
end

Using the get_user_variable_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> get_user_variable_with_http_info(variablename)

begin
  # Get a user-level variable which is created by current doer
  data, status_code, headers = api_instance.get_user_variable_with_http_info(variablename)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->get_user_variable_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
variablename String name of the variable

Return type

ActionVariable

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_user_variables_list

> > get_user_variables_list(opts)

Get the user-level list of variables which is created by current doer

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # Get the user-level list of variables which is created by current doer
  result = api_instance.get_user_variables_list(opts)
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->get_user_variables_list: #{e}"
end

Using the get_user_variables_list_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> get_user_variables_list_with_http_info(opts)

begin
  # Get the user-level list of variables which is created by current doer
  data, status_code, headers = api_instance.get_user_variables_list_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => >
rescue Forgejo::ApiError => e
  puts "Error when calling UserApi->get_user_variables_list_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<ActionVariable>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_verification_token

> String get_verification_token

Get a Token to verify

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::UserApi.new

begin
  # Get a Token to verify
  result = api_instance.get_verification_token
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;get_verification_token: #{e}"
end

Using the get_verification_token_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> get_verification_token_with_http_info

begin
  # Get a Token to verify
  data, status_code, headers = api_instance.get_verification_token_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; String
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;get_verification_token_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

update_user_secret

> update_user_secret(secretname, opts)

Create or Update a secret value in a user scope

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::UserApi.new
secretname = 'secretname_example' # String | name of the secret
opts = {
  body: Forgejo::CreateOrUpdateSecretOption.new({data: 'data_example'}) # CreateOrUpdateSecretOption | 
}

begin
  # Create or Update a secret value in a user scope
  api_instance.update_user_secret(secretname, opts)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;update_user_secret: #{e}"
end

Using the update_user_secret_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> update_user_secret_with_http_info(secretname, opts)

begin
  # Create or Update a secret value in a user scope
  data, status_code, headers = api_instance.update_user_secret_with_http_info(secretname, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;update_user_secret_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
secretname String name of the secret
body CreateOrUpdateSecretOption [optional]

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

update_user_settings

> update_user_settings(opts)

Update user settings

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::UserApi.new
opts = {
  body: Forgejo::UserSettingsOptions.new # UserSettingsOptions | 
}

begin
  # Update user settings
  result = api_instance.update_user_settings(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;update_user_settings: #{e}"
end

Using the update_user_settings_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> update_user_settings_with_http_info(opts)

begin
  # Update user settings
  data, status_code, headers = api_instance.update_user_settings_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;update_user_settings_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body UserSettingsOptions [optional]

Return type

UserSettings

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

update_user_variable

> update_user_variable(variablename, opts)

Update a user-level variable which is created by current doer

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::UserApi.new
variablename = 'variablename_example' # String | name of the variable
opts = {
  body: Forgejo::UpdateVariableOption.new({value: 'value_example'}) # UpdateVariableOption | 
}

begin
  # Update a user-level variable which is created by current doer
  api_instance.update_user_variable(variablename, opts)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;update_user_variable: #{e}"
end

Using the update_user_variable_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> update_user_variable_with_http_info(variablename, opts)

begin
  # Update a user-level variable which is created by current doer
  data, status_code, headers = api_instance.update_user_variable_with_http_info(variablename, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;update_user_variable_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
variablename String name of the variable
body UpdateVariableOption [optional]

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user_add_email

> > user_add_email(opts)

Add email addresses

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::UserApi.new
opts = {
  body: Forgejo::CreateEmailOption.new # CreateEmailOption | 
}

begin
  # Add email addresses
  result = api_instance.user_add_email(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_add_email: #{e}"
end

Using the user_add_email_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_add_email_with_http_info(opts)

begin
  # Add email addresses
  data, status_code, headers = api_instance.user_add_email_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_add_email_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body CreateEmailOption [optional]

Return type

Array<Email>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

user_block_user

> user_block_user(username)

Blocks a user from the doer.

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::UserApi.new
username = 'username_example' # String | username of the user

begin
  # Blocks a user from the doer.
  api_instance.user_block_user(username)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_block_user: #{e}"
end

Using the user_block_user_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_block_user_with_http_info(username)

begin
  # Blocks a user from the doer.
  data, status_code, headers = api_instance.user_block_user_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_block_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of the user

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_check_following

> user_check_following(username, target)

Check if one user is following another user

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::UserApi.new
username = 'username_example' # String | username of following user
target = 'target_example' # String | username of followed user

begin
  # Check if one user is following another user
  api_instance.user_check_following(username, target)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_check_following: #{e}"
end

Using the user_check_following_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_check_following_with_http_info(username, target)

begin
  # Check if one user is following another user
  data, status_code, headers = api_instance.user_check_following_with_http_info(username, target)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_check_following_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of following user
target String username of followed user

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_check_quota

> user_check_quota

Check if the authenticated user is over quota for a given subject

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::UserApi.new

begin
  # Check if the authenticated user is over quota for a given subject
  api_instance.user_check_quota
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_check_quota: #{e}"
end

Using the user_check_quota_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_check_quota_with_http_info

begin
  # Check if the authenticated user is over quota for a given subject
  data, status_code, headers = api_instance.user_check_quota_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_check_quota_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_create_hook

> user_create_hook(body)

Create a hook

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::UserApi.new
body = Forgejo::CreateHookOption.new({config: { key: 'inner_example'}, type: 'forgejo'}) # CreateHookOption | 

begin
  # Create a hook
  result = api_instance.user_create_hook(body)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_create_hook: #{e}"
end

Using the user_create_hook_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_create_hook_with_http_info(body)

begin
  # Create a hook
  data, status_code, headers = api_instance.user_create_hook_with_http_info(body)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_create_hook_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body CreateHookOption

Return type

Hook

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user_create_o_auth2_application

> user_create_o_auth2_application(body)

creates a new OAuth2 application

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::UserApi.new
body = Forgejo::CreateOAuth2ApplicationOptions.new # CreateOAuth2ApplicationOptions | 

begin
  # creates a new OAuth2 application
  result = api_instance.user_create_o_auth2_application(body)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_create_o_auth2_application: #{e}"
end

Using the user_create_o_auth2_application_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_create_o_auth2_application_with_http_info(body)

begin
  # creates a new OAuth2 application
  data, status_code, headers = api_instance.user_create_o_auth2_application_with_http_info(body)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_create_o_auth2_application_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body CreateOAuth2ApplicationOptions

Return type

OAuth2Application

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

user_create_token

> user_create_token(username, opts)

Create an access token

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  body: Forgejo::CreateAccessTokenOption.new({name: 'name_example'}) # CreateAccessTokenOption | 
}

begin
  # Create an access token
  result = api_instance.user_create_token(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_create_token: #{e}"
end

Using the user_create_token_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_create_token_with_http_info(username, opts)

begin
  # Create an access token
  data, status_code, headers = api_instance.user_create_token_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_create_token_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
body CreateAccessTokenOption [optional]

Return type

AccessToken

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user_current_check_following

> user_current_check_following(username)

Check whether a user is followed by the authenticated user

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::UserApi.new
username = 'username_example' # String | username of followed user

begin
  # Check whether a user is followed by the authenticated user
  api_instance.user_current_check_following(username)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_check_following: #{e}"
end

Using the user_current_check_following_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_check_following_with_http_info(username)

begin
  # Check whether a user is followed by the authenticated user
  data, status_code, headers = api_instance.user_current_check_following_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_check_following_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of followed user

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_current_check_starring

> user_current_check_starring(owner, repo)

Whether the authenticated is starring the repo

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::UserApi.new
owner = 'owner_example' # String | owner of the repo
repo = 'repo_example' # String | name of the repo

begin
  # Whether the authenticated is starring the repo
  api_instance.user_current_check_starring(owner, repo)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_check_starring: #{e}"
end

Using the user_current_check_starring_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_check_starring_with_http_info(owner, repo)

begin
  # Whether the authenticated is starring the repo
  data, status_code, headers = api_instance.user_current_check_starring_with_http_info(owner, repo)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_check_starring_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
owner String owner of the repo
repo String name of the repo

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_current_delete_follow

> user_current_delete_follow(username)

Unfollow a user

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::UserApi.new
username = 'username_example' # String | username of user to unfollow

begin
  # Unfollow a user
  api_instance.user_current_delete_follow(username)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_follow: #{e}"
end

Using the user_current_delete_follow_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_delete_follow_with_http_info(username)

begin
  # Unfollow a user
  data, status_code, headers = api_instance.user_current_delete_follow_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_follow_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user to unfollow

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_current_delete_gpg_key

> user_current_delete_gpg_key(id)

Remove a GPG key

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::UserApi.new
id = 789 # Integer | id of key to delete

begin
  # Remove a GPG key
  api_instance.user_current_delete_gpg_key(id)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_gpg_key: #{e}"
end

Using the user_current_delete_gpg_key_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_delete_gpg_key_with_http_info(id)

begin
  # Remove a GPG key
  data, status_code, headers = api_instance.user_current_delete_gpg_key_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_gpg_key_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of key to delete

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_delete_key

> user_current_delete_key(id)

Delete a public key

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::UserApi.new
id = 789 # Integer | id of key to delete

begin
  # Delete a public key
  api_instance.user_current_delete_key(id)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_key: #{e}"
end

Using the user_current_delete_key_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_delete_key_with_http_info(id)

begin
  # Delete a public key
  data, status_code, headers = api_instance.user_current_delete_key_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_key_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of key to delete

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_delete_star

> user_current_delete_star(owner, repo)

Unstar the given repo

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::UserApi.new
owner = 'owner_example' # String | owner of the repo to unstar
repo = 'repo_example' # String | name of the repo to unstar

begin
  # Unstar the given repo
  api_instance.user_current_delete_star(owner, repo)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_star: #{e}"
end

Using the user_current_delete_star_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_delete_star_with_http_info(owner, repo)

begin
  # Unstar the given repo
  data, status_code, headers = api_instance.user_current_delete_star_with_http_info(owner, repo)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_delete_star_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
owner String owner of the repo to unstar
repo String name of the repo to unstar

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_current_get_gpg_key

> user_current_get_gpg_key(id)

Get a GPG key

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::UserApi.new
id = 789 # Integer | id of key to get

begin
  # Get a GPG key
  result = api_instance.user_current_get_gpg_key(id)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_get_gpg_key: #{e}"
end

Using the user_current_get_gpg_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_current_get_gpg_key_with_http_info(id)

begin
  # Get a GPG key
  data, status_code, headers = api_instance.user_current_get_gpg_key_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_get_gpg_key_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of key to get

Return type

GPGKey

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_get_key

> user_current_get_key(id)

Get a public key

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::UserApi.new
id = 789 # Integer | id of key to get

begin
  # Get a public key
  result = api_instance.user_current_get_key(id)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_get_key: #{e}"
end

Using the user_current_get_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_current_get_key_with_http_info(id)

begin
  # Get a public key
  data, status_code, headers = api_instance.user_current_get_key_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_get_key_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of key to get

Return type

PublicKey

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_followers

> > user_current_list_followers(opts)

List the authenticated user’s followers

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's followers
  result = api_instance.user_current_list_followers(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_followers: #{e}"
end

Using the user_current_list_followers_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_followers_with_http_info(opts)

begin
  # List the authenticated user's followers
  data, status_code, headers = api_instance.user_current_list_followers_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_followers_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<User>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_following

> > user_current_list_following(opts)

List the users that the authenticated user is following

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the users that the authenticated user is following
  result = api_instance.user_current_list_following(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_following: #{e}"
end

Using the user_current_list_following_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_following_with_http_info(opts)

begin
  # List the users that the authenticated user is following
  data, status_code, headers = api_instance.user_current_list_following_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_following_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<User>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_gpg_keys

> > user_current_list_gpg_keys(opts)

List the authenticated user’s GPG keys

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's GPG keys
  result = api_instance.user_current_list_gpg_keys(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_gpg_keys: #{e}"
end

Using the user_current_list_gpg_keys_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_gpg_keys_with_http_info(opts)

begin
  # List the authenticated user's GPG keys
  data, status_code, headers = api_instance.user_current_list_gpg_keys_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_gpg_keys_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<GPGKey>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_keys

> > user_current_list_keys(opts)

List the authenticated user’s public keys

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::UserApi.new
opts = {
  fingerprint: 'fingerprint_example', # String | fingerprint of the key
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's public keys
  result = api_instance.user_current_list_keys(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_keys: #{e}"
end

Using the user_current_list_keys_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_keys_with_http_info(opts)

begin
  # List the authenticated user's public keys
  data, status_code, headers = api_instance.user_current_list_keys_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_keys_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
fingerprint String fingerprint of the key [optional]
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<PublicKey>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_repos

> > user_current_list_repos(opts)

List the repos that the authenticated user owns

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56, # Integer | page size of results
  order_by: 'order_by_example' # String | order the repositories by name (default), id, or size
}

begin
  # List the repos that the authenticated user owns
  result = api_instance.user_current_list_repos(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_repos: #{e}"
end

Using the user_current_list_repos_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_repos_with_http_info(opts)

begin
  # List the repos that the authenticated user owns
  data, status_code, headers = api_instance.user_current_list_repos_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_repos_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]
order_by String order the repositories by name (default), id, or size [optional]

Return type

Array<Repository>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_starred

> > user_current_list_starred(opts)

The repos that the authenticated user has starred

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # The repos that the authenticated user has starred
  result = api_instance.user_current_list_starred(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_starred: #{e}"
end

Using the user_current_list_starred_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_starred_with_http_info(opts)

begin
  # The repos that the authenticated user has starred
  data, status_code, headers = api_instance.user_current_list_starred_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_starred_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Repository>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_list_subscriptions

> > user_current_list_subscriptions(opts)

List repositories watched by the authenticated user

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List repositories watched by the authenticated user
  result = api_instance.user_current_list_subscriptions(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_subscriptions: #{e}"
end

Using the user_current_list_subscriptions_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_list_subscriptions_with_http_info(opts)

begin
  # List repositories watched by the authenticated user
  data, status_code, headers = api_instance.user_current_list_subscriptions_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_list_subscriptions_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Repository>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_current_post_gpg_key

> user_current_post_gpg_key(opts)

Create a GPG key

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::UserApi.new
opts = {
  form: Forgejo::CreateGPGKeyOption.new({armored_public_key: 'armored_public_key_example'}) # CreateGPGKeyOption | 
}

begin
  # Create a GPG key
  result = api_instance.user_current_post_gpg_key(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_post_gpg_key: #{e}"
end

Using the user_current_post_gpg_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_current_post_gpg_key_with_http_info(opts)

begin
  # Create a GPG key
  data, status_code, headers = api_instance.user_current_post_gpg_key_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_post_gpg_key_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
form CreateGPGKeyOption [optional]

Return type

GPGKey

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user_current_post_key

> user_current_post_key(opts)

Create a public key

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::UserApi.new
opts = {
  body: Forgejo::CreateKeyOption.new({key: 'key_example', title: 'title_example'}) # CreateKeyOption | 
}

begin
  # Create a public key
  result = api_instance.user_current_post_key(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_post_key: #{e}"
end

Using the user_current_post_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_current_post_key_with_http_info(opts)

begin
  # Create a public key
  data, status_code, headers = api_instance.user_current_post_key_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_post_key_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body CreateKeyOption [optional]

Return type

PublicKey

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user_current_put_follow

> user_current_put_follow(username)

Follow a user

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::UserApi.new
username = 'username_example' # String | username of user to follow

begin
  # Follow a user
  api_instance.user_current_put_follow(username)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_put_follow: #{e}"
end

Using the user_current_put_follow_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_put_follow_with_http_info(username)

begin
  # Follow a user
  data, status_code, headers = api_instance.user_current_put_follow_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_put_follow_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user to follow

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_current_put_star

> user_current_put_star(owner, repo)

Star the given repo

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::UserApi.new
owner = 'owner_example' # String | owner of the repo to star
repo = 'repo_example' # String | name of the repo to star

begin
  # Star the given repo
  api_instance.user_current_put_star(owner, repo)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_put_star: #{e}"
end

Using the user_current_put_star_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_current_put_star_with_http_info(owner, repo)

begin
  # Star the given repo
  data, status_code, headers = api_instance.user_current_put_star_with_http_info(owner, repo)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_put_star_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
owner String owner of the repo to star
repo String name of the repo to star

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

user_current_tracked_times

> > user_current_tracked_times(opts)

List the current user’s tracked times

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56, # Integer | page size of results
  since: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Only show times updated after the given time. This is a timestamp in RFC 3339 format
  before: Time.parse('2013-10-20T19:20:30+01:00') # Time | Only show times updated before the given time. This is a timestamp in RFC 3339 format
}

begin
  # List the current user's tracked times
  result = api_instance.user_current_tracked_times(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_tracked_times: #{e}"
end

Using the user_current_tracked_times_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_current_tracked_times_with_http_info(opts)

begin
  # List the current user's tracked times
  data, status_code, headers = api_instance.user_current_tracked_times_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_current_tracked_times_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]
since Time Only show times updated after the given time. This is a timestamp in RFC 3339 format [optional]
before Time Only show times updated before the given time. This is a timestamp in RFC 3339 format [optional]

Return type

Array<TrackedTime>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_delete_access_token

> user_delete_access_token(username, token)

delete an access token

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::UserApi.new
username = 'username_example' # String | username of user
token = 'token_example' # String | token to be deleted, identified by ID and if not available by name

begin
  # delete an access token
  api_instance.user_delete_access_token(username, token)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_access_token: #{e}"
end

Using the user_delete_access_token_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_delete_access_token_with_http_info(username, token)

begin
  # delete an access token
  data, status_code, headers = api_instance.user_delete_access_token_with_http_info(username, token)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_access_token_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
token String token to be deleted, identified by ID and if not available by name

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_delete_avatar

> user_delete_avatar

Delete Avatar

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::UserApi.new

begin
  # Delete Avatar
  api_instance.user_delete_avatar
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_avatar: #{e}"
end

Using the user_delete_avatar_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_delete_avatar_with_http_info

begin
  # Delete Avatar
  data, status_code, headers = api_instance.user_delete_avatar_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_avatar_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_delete_email

> user_delete_email(opts)

Delete email addresses

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::UserApi.new
opts = {
  body: Forgejo::DeleteEmailOption.new # DeleteEmailOption | 
}

begin
  # Delete email addresses
  api_instance.user_delete_email(opts)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_email: #{e}"
end

Using the user_delete_email_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_delete_email_with_http_info(opts)

begin
  # Delete email addresses
  data, status_code, headers = api_instance.user_delete_email_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_email_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body DeleteEmailOption [optional]

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

user_delete_hook

> user_delete_hook(id)

Delete a hook

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::UserApi.new
id = 789 # Integer | id of the hook to delete

begin
  # Delete a hook
  api_instance.user_delete_hook(id)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_hook: #{e}"
end

Using the user_delete_hook_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_delete_hook_with_http_info(id)

begin
  # Delete a hook
  data, status_code, headers = api_instance.user_delete_hook_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_hook_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of the hook to delete

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_delete_o_auth2_application

> user_delete_o_auth2_application(id)

delete an OAuth2 Application

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::UserApi.new
id = 789 # Integer | token to be deleted

begin
  # delete an OAuth2 Application
  api_instance.user_delete_o_auth2_application(id)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_o_auth2_application: #{e}"
end

Using the user_delete_o_auth2_application_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_delete_o_auth2_application_with_http_info(id)

begin
  # delete an OAuth2 Application
  data, status_code, headers = api_instance.user_delete_o_auth2_application_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_delete_o_auth2_application_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer token to be deleted

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_edit_hook

> user_edit_hook(id, opts)

Update a hook

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::UserApi.new
id = 789 # Integer | id of the hook to update
opts = {
  body: Forgejo::EditHookOption.new # EditHookOption | 
}

begin
  # Update a hook
  result = api_instance.user_edit_hook(id, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_edit_hook: #{e}"
end

Using the user_edit_hook_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_edit_hook_with_http_info(id, opts)

begin
  # Update a hook
  data, status_code, headers = api_instance.user_edit_hook_with_http_info(id, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_edit_hook_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of the hook to update
body EditHookOption [optional]

Return type

Hook

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user_get

> user_get(username)

Get a user

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::UserApi.new
username = 'username_example' # String | username of user to get

begin
  # Get a user
  result = api_instance.user_get(username)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get: #{e}"
end

Using the user_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_get_with_http_info(username)

begin
  # Get a user
  data, status_code, headers = api_instance.user_get_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user to get

Return type

User

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_current

> user_get_current

Get the authenticated user

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::UserApi.new

begin
  # Get the authenticated user
  result = api_instance.user_get_current
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_current: #{e}"
end

Using the user_get_current_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_get_current_with_http_info

begin
  # Get the authenticated user
  data, status_code, headers = api_instance.user_get_current_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_current_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

User

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_heatmap_data

> > user_get_heatmap_data(username)

Get a user’s heatmap

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::UserApi.new
username = 'username_example' # String | username of user to get

begin
  # Get a user's heatmap
  result = api_instance.user_get_heatmap_data(username)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_heatmap_data: #{e}"
end

Using the user_get_heatmap_data_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_get_heatmap_data_with_http_info(username)

begin
  # Get a user's heatmap
  data, status_code, headers = api_instance.user_get_heatmap_data_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_heatmap_data_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user to get

Return type

Array<UserHeatmapData>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_hook

> user_get_hook(id)

Get a hook

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::UserApi.new
id = 789 # Integer | id of the hook to get

begin
  # Get a hook
  result = api_instance.user_get_hook(id)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_hook: #{e}"
end

Using the user_get_hook_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_get_hook_with_http_info(id)

begin
  # Get a hook
  data, status_code, headers = api_instance.user_get_hook_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_hook_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer id of the hook to get

Return type

Hook

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_o_auth2_application

> user_get_o_auth2_application(id)

get an OAuth2 Application

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::UserApi.new
id = 789 # Integer | Application ID to be found

begin
  # get an OAuth2 Application
  result = api_instance.user_get_o_auth2_application(id)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_o_auth2_application: #{e}"
end

Using the user_get_o_auth2_application_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_get_o_auth2_application_with_http_info(id)

begin
  # get an OAuth2 Application
  data, status_code, headers = api_instance.user_get_o_auth2_application_with_http_info(id)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_o_auth2_application_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer Application ID to be found

Return type

OAuth2Application

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_o_auth2_applications

> > user_get_o_auth2_applications(opts)

List the authenticated user’s oauth2 applications

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's oauth2 applications
  result = api_instance.user_get_o_auth2_applications(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_o_auth2_applications: #{e}"
end

Using the user_get_o_auth2_applications_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_get_o_auth2_applications_with_http_info(opts)

begin
  # List the authenticated user's oauth2 applications
  data, status_code, headers = api_instance.user_get_o_auth2_applications_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_o_auth2_applications_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<OAuth2Application>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_quota

> user_get_quota

Get quota information for the authenticated user

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::UserApi.new

begin
  # Get quota information for the authenticated user
  result = api_instance.user_get_quota
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_quota: #{e}"
end

Using the user_get_quota_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_get_quota_with_http_info

begin
  # Get quota information for the authenticated user
  data, status_code, headers = api_instance.user_get_quota_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_quota_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

QuotaInfo

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_runner_registration_token

> user_get_runner_registration_token

Get an user’s actions runner registration token

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::UserApi.new

begin
  # Get an user's actions runner registration token
  api_instance.user_get_runner_registration_token
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_runner_registration_token: #{e}"
end

Using the user_get_runner_registration_token_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_get_runner_registration_token_with_http_info

begin
  # Get an user's actions runner registration token
  data, status_code, headers = api_instance.user_get_runner_registration_token_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_runner_registration_token_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_stop_watches

> > user_get_stop_watches(opts)

Get list of all existing stopwatches

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # Get list of all existing stopwatches
  result = api_instance.user_get_stop_watches(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_stop_watches: #{e}"
end

Using the user_get_stop_watches_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_get_stop_watches_with_http_info(opts)

begin
  # Get list of all existing stopwatches
  data, status_code, headers = api_instance.user_get_stop_watches_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_stop_watches_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<StopWatch>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_get_tokens

> > user_get_tokens(username, opts)

List the authenticated user’s access tokens

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's access tokens
  result = api_instance.user_get_tokens(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_tokens: #{e}"
end

Using the user_get_tokens_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_get_tokens_with_http_info(username, opts)

begin
  # List the authenticated user's access tokens
  data, status_code, headers = api_instance.user_get_tokens_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_get_tokens_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<AccessToken>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_activity_feeds

> > user_list_activity_feeds(username, opts)

List a user’s activity feeds

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  only_performed_by: true, # Boolean | if true, only show actions performed by the requested user
  date: Date.parse('2013-10-20'), # Date | the date of the activities to be found
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List a user's activity feeds
  result = api_instance.user_list_activity_feeds(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_activity_feeds: #{e}"
end

Using the user_list_activity_feeds_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_activity_feeds_with_http_info(username, opts)

begin
  # List a user's activity feeds
  data, status_code, headers = api_instance.user_list_activity_feeds_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_activity_feeds_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
only_performed_by Boolean if true, only show actions performed by the requested user [optional]
date Date the date of the activities to be found [optional]
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Activity>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_blocked_users

> > user_list_blocked_users(opts)

List the authenticated user’s blocked users

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's blocked users
  result = api_instance.user_list_blocked_users(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_blocked_users: #{e}"
end

Using the user_list_blocked_users_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_blocked_users_with_http_info(opts)

begin
  # List the authenticated user's blocked users
  data, status_code, headers = api_instance.user_list_blocked_users_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_blocked_users_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<BlockedUser>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_emails

> > user_list_emails

List the authenticated user’s email addresses

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::UserApi.new

begin
  # List the authenticated user's email addresses
  result = api_instance.user_list_emails
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_emails: #{e}"
end

Using the user_list_emails_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_emails_with_http_info

begin
  # List the authenticated user's email addresses
  data, status_code, headers = api_instance.user_list_emails_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_emails_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Array<Email>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_followers

> > user_list_followers(username, opts)

List the given user’s followers

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the given user's followers
  result = api_instance.user_list_followers(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_followers: #{e}"
end

Using the user_list_followers_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_followers_with_http_info(username, opts)

begin
  # List the given user's followers
  data, status_code, headers = api_instance.user_list_followers_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_followers_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<User>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_following

> > user_list_following(username, opts)

List the users that the given user is following

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the users that the given user is following
  result = api_instance.user_list_following(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_following: #{e}"
end

Using the user_list_following_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_following_with_http_info(username, opts)

begin
  # List the users that the given user is following
  data, status_code, headers = api_instance.user_list_following_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_following_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<User>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_gpg_keys

> > user_list_gpg_keys(username, opts)

List the given user’s GPG keys

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the given user's GPG keys
  result = api_instance.user_list_gpg_keys(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_gpg_keys: #{e}"
end

Using the user_list_gpg_keys_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_gpg_keys_with_http_info(username, opts)

begin
  # List the given user's GPG keys
  data, status_code, headers = api_instance.user_list_gpg_keys_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_gpg_keys_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<GPGKey>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_hooks

> > user_list_hooks(opts)

List the authenticated user’s webhooks

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the authenticated user's webhooks
  result = api_instance.user_list_hooks(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_hooks: #{e}"
end

Using the user_list_hooks_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_hooks_with_http_info(opts)

begin
  # List the authenticated user's webhooks
  data, status_code, headers = api_instance.user_list_hooks_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_hooks_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Hook>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_keys

> > user_list_keys(username, opts)

List the given user’s public keys

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  fingerprint: 'fingerprint_example', # String | fingerprint of the key
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the given user's public keys
  result = api_instance.user_list_keys(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_keys: #{e}"
end

Using the user_list_keys_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_keys_with_http_info(username, opts)

begin
  # List the given user's public keys
  data, status_code, headers = api_instance.user_list_keys_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_keys_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
fingerprint String fingerprint of the key [optional]
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<PublicKey>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_quota_artifacts

> > user_list_quota_artifacts(opts)

List the artifacts affecting the authenticated user’s quota

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the artifacts affecting the authenticated user's quota
  result = api_instance.user_list_quota_artifacts(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_quota_artifacts: #{e}"
end

Using the user_list_quota_artifacts_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_quota_artifacts_with_http_info(opts)

begin
  # List the artifacts affecting the authenticated user's quota
  data, status_code, headers = api_instance.user_list_quota_artifacts_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_quota_artifacts_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<QuotaUsedArtifact>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_quota_attachments

> > user_list_quota_attachments(opts)

List the attachments affecting the authenticated user’s quota

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the attachments affecting the authenticated user's quota
  result = api_instance.user_list_quota_attachments(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_quota_attachments: #{e}"
end

Using the user_list_quota_attachments_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_quota_attachments_with_http_info(opts)

begin
  # List the attachments affecting the authenticated user's quota
  data, status_code, headers = api_instance.user_list_quota_attachments_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_quota_attachments_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<QuotaUsedAttachment>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_quota_packages

> > user_list_quota_packages(opts)

List the packages affecting the authenticated user’s quota

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the packages affecting the authenticated user's quota
  result = api_instance.user_list_quota_packages(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_quota_packages: #{e}"
end

Using the user_list_quota_packages_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_quota_packages_with_http_info(opts)

begin
  # List the packages affecting the authenticated user's quota
  data, status_code, headers = api_instance.user_list_quota_packages_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_quota_packages_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<QuotaUsedPackage>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_repos

> > user_list_repos(username, opts)

List the repos owned by the given user

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the repos owned by the given user
  result = api_instance.user_list_repos(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_repos: #{e}"
end

Using the user_list_repos_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_repos_with_http_info(username, opts)

begin
  # List the repos owned by the given user
  data, status_code, headers = api_instance.user_list_repos_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_repos_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Repository>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_starred

> > user_list_starred(username, opts)

The repos that the given user has starred

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::UserApi.new
username = 'username_example' # String | username of user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # The repos that the given user has starred
  result = api_instance.user_list_starred(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_starred: #{e}"
end

Using the user_list_starred_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_starred_with_http_info(username, opts)

begin
  # The repos that the given user has starred
  data, status_code, headers = api_instance.user_list_starred_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_starred_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Repository>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_subscriptions

> > user_list_subscriptions(username, opts)

List the repositories watched by a user

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::UserApi.new
username = 'username_example' # String | username of the user
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List the repositories watched by a user
  result = api_instance.user_list_subscriptions(username, opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_subscriptions: #{e}"
end

Using the user_list_subscriptions_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_subscriptions_with_http_info(username, opts)

begin
  # List the repositories watched by a user
  data, status_code, headers = api_instance.user_list_subscriptions_with_http_info(username, opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_subscriptions_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of the user
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Repository>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_list_teams

> > user_list_teams(opts)

List all the teams a user belongs to

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::UserApi.new
opts = {
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # List all the teams a user belongs to
  result = api_instance.user_list_teams(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_teams: #{e}"
end

Using the user_list_teams_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> >, Integer, Hash)> user_list_teams_with_http_info(opts)

begin
  # List all the teams a user belongs to
  data, status_code, headers = api_instance.user_list_teams_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; &gt;
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_list_teams_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

Array<Team>

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_search

> user_search(opts)

Search for users

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::UserApi.new
opts = {
  q: 'q_example', # String | keyword
  uid: 789, # Integer | ID of the user to search for
  page: 56, # Integer | page number of results to return (1-based)
  limit: 56 # Integer | page size of results
}

begin
  # Search for users
  result = api_instance.user_search(opts)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_search: #{e}"
end

Using the user_search_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_search_with_http_info(opts)

begin
  # Search for users
  data, status_code, headers = api_instance.user_search_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_search_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
q String keyword [optional]
uid Integer ID of the user to search for [optional]
page Integer page number of results to return (1-based) [optional]
limit Integer page size of results [optional]

Return type

UserSearch200Response

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_unblock_user

> user_unblock_user(username)

Unblocks a user from the doer.

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::UserApi.new
username = 'username_example' # String | username of the user

begin
  # Unblocks a user from the doer.
  api_instance.user_unblock_user(username)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_unblock_user: #{e}"
end

Using the user_unblock_user_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_unblock_user_with_http_info(username)

begin
  # Unblocks a user from the doer.
  data, status_code, headers = api_instance.user_unblock_user_with_http_info(username)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_unblock_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String username of the user

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

user_update_avatar

> user_update_avatar(opts)

Update Avatar

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::UserApi.new
opts = {
  body: Forgejo::UpdateUserAvatarOption.new # UpdateUserAvatarOption | 
}

begin
  # Update Avatar
  api_instance.user_update_avatar(opts)
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_update_avatar: #{e}"
end

Using the user_update_avatar_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

> user_update_avatar_with_http_info(opts)

begin
  # Update Avatar
  data, status_code, headers = api_instance.user_update_avatar_with_http_info(opts)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; nil
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_update_avatar_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
body UpdateUserAvatarOption [optional]

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

user_update_o_auth2_application

> user_update_o_auth2_application(id, body)

update an OAuth2 Application, this includes regenerating the client secret

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::UserApi.new
id = 789 # Integer | application to be updated
body = Forgejo::CreateOAuth2ApplicationOptions.new # CreateOAuth2ApplicationOptions | 

begin
  # update an OAuth2 Application, this includes regenerating the client secret
  result = api_instance.user_update_o_auth2_application(id, body)
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_update_o_auth2_application: #{e}"
end

Using the user_update_o_auth2_application_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_update_o_auth2_application_with_http_info(id, body)

begin
  # update an OAuth2 Application, this includes regenerating the client secret
  data, status_code, headers = api_instance.user_update_o_auth2_application_with_http_info(id, body)
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_update_o_auth2_application_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer application to be updated
body CreateOAuth2ApplicationOptions

Return type

OAuth2Application

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

user_verify_gpg_key

> user_verify_gpg_key

Verify a GPG key

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::UserApi.new

begin
  # Verify a GPG key
  result = api_instance.user_verify_gpg_key
  p result
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_verify_gpg_key: #{e}"
end

Using the user_verify_gpg_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> user_verify_gpg_key_with_http_info

begin
  # Verify a GPG key
  data, status_code, headers = api_instance.user_verify_gpg_key_with_http_info
  p status_code # =&gt; 2xx
  p headers # =&gt; { ... }
  p data # =&gt; 
rescue Forgejo::ApiError =&gt; e
  puts "Error when calling UserApi-&gt;user_verify_gpg_key_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

GPGKey

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json