docs/ActivitypubApi

Forgejo::ActivitypubApi

All URIs are relative to /api/v1

Method HTTP request Description
activitypub_instance_actor GET /activitypub/actor Returns the instance’s Actor
activitypub_instance_actor_inbox POST /activitypub/actor/inbox Send to the inbox
activitypub_person GET /activitypub/user-id/{user-id} Returns the Person actor for a user
activitypub_person_inbox POST /activitypub/user-id/{user-id}/inbox Send to the inbox
activitypub_repository GET /activitypub/repository-id/{repository-id} Returns the Repository actor for a repo
activitypub_repository_inbox POST /activitypub/repository-id/{repository-id}/inbox Send to the inbox

activitypub_instance_actor

> activitypub_instance_actor

Returns the instance’s Actor

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

begin
  # Returns the instance's Actor
  result = api_instance.activitypub_instance_actor
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_instance_actor: #{e}"
end

Using the activitypub_instance_actor_with_http_info variant

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

> , Integer, Hash)> activitypub_instance_actor_with_http_info

begin
  # Returns the instance's Actor
  data, status_code, headers = api_instance.activitypub_instance_actor_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_instance_actor_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

ActivityPub

Authorization

AuthorizationHeaderToken

HTTP request headers

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

activitypub_instance_actor_inbox

> activitypub_instance_actor_inbox

Send to the inbox

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

begin
  # Send to the inbox
  api_instance.activitypub_instance_actor_inbox
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_instance_actor_inbox: #{e}"
end

Using the activitypub_instance_actor_inbox_with_http_info variant

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

> activitypub_instance_actor_inbox_with_http_info

begin
  # Send to the inbox
  data, status_code, headers = api_instance.activitypub_instance_actor_inbox_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_instance_actor_inbox_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: Not defined

activitypub_person

> activitypub_person(user_id)

Returns the Person actor for 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::ActivitypubApi.new
user_id = 56 # Integer | user ID of the user

begin
  # Returns the Person actor for a user
  result = api_instance.activitypub_person(user_id)
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_person: #{e}"
end

Using the activitypub_person_with_http_info variant

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

> , Integer, Hash)> activitypub_person_with_http_info(user_id)

begin
  # Returns the Person actor for a user
  data, status_code, headers = api_instance.activitypub_person_with_http_info(user_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_person_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer user ID of the user

Return type

ActivityPub

Authorization

AuthorizationHeaderToken

HTTP request headers

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

activitypub_person_inbox

> activitypub_person_inbox(user_id)

Send to the inbox

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::ActivitypubApi.new
user_id = 56 # Integer | user ID of the user

begin
  # Send to the inbox
  api_instance.activitypub_person_inbox(user_id)
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_person_inbox: #{e}"
end

Using the activitypub_person_inbox_with_http_info variant

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

> activitypub_person_inbox_with_http_info(user_id)

begin
  # Send to the inbox
  data, status_code, headers = api_instance.activitypub_person_inbox_with_http_info(user_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_person_inbox_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer user ID of the user

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

activitypub_repository

> activitypub_repository(repository_id)

Returns the Repository actor for a 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::ActivitypubApi.new
repository_id = 56 # Integer | repository ID of the repo

begin
  # Returns the Repository actor for a repo
  result = api_instance.activitypub_repository(repository_id)
  p result
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_repository: #{e}"
end

Using the activitypub_repository_with_http_info variant

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

> , Integer, Hash)> activitypub_repository_with_http_info(repository_id)

begin
  # Returns the Repository actor for a repo
  data, status_code, headers = api_instance.activitypub_repository_with_http_info(repository_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_repository_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
repository_id Integer repository ID of the repo

Return type

ActivityPub

Authorization

AuthorizationHeaderToken

HTTP request headers

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

activitypub_repository_inbox

> activitypub_repository_inbox(repository_id, opts)

Send to the inbox

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::ActivitypubApi.new
repository_id = 56 # Integer | repository ID of the repo
opts = {
  body: { ... } # Object | 
}

begin
  # Send to the inbox
  api_instance.activitypub_repository_inbox(repository_id, opts)
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_repository_inbox: #{e}"
end

Using the activitypub_repository_inbox_with_http_info variant

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

> activitypub_repository_inbox_with_http_info(repository_id, opts)

begin
  # Send to the inbox
  data, status_code, headers = api_instance.activitypub_repository_inbox_with_http_info(repository_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Forgejo::ApiError => e
  puts "Error when calling ActivitypubApi->activitypub_repository_inbox_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
repository_id Integer repository ID of the repo
body Object [optional]

Return type

nil (empty response body)

Authorization

AuthorizationHeaderToken

HTTP request headers

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