172 lines
6.6 KiB
Markdown
172 lines
6.6 KiB
Markdown
# gitea.ActivitypubApi
|
|
|
|
All URIs are relative to *https://localhost/api/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**activitypub_person**](ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user
|
|
[**activitypub_person_inbox**](ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox
|
|
|
|
|
|
# **activitypub_person**
|
|
> ActivityPub activitypub_person(user_id)
|
|
|
|
Returns the Person actor for a user
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import gitea
|
|
from gitea.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Configure API key authorization: AccessToken
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['access_token'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['access_token'] = 'Bearer'
|
|
# Configure API key authorization: AuthorizationHeaderToken
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['Authorization'] = 'Bearer'
|
|
# Configure HTTP basic authorization: BasicAuth
|
|
configuration = gitea.Configuration()
|
|
configuration.username = 'YOUR_USERNAME'
|
|
configuration.password = 'YOUR_PASSWORD'
|
|
# Configure API key authorization: SudoHeader
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['Sudo'] = 'Bearer'
|
|
# Configure API key authorization: SudoParam
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['sudo'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['sudo'] = 'Bearer'
|
|
# Configure API key authorization: TOTPHeader
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer'
|
|
# Configure API key authorization: Token
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['token'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['token'] = 'Bearer'
|
|
|
|
# create an instance of the API class
|
|
api_instance = gitea.ActivitypubApi(gitea.ApiClient(configuration))
|
|
user_id = 56 # int | user ID of the user
|
|
|
|
try:
|
|
# Returns the Person actor for a user
|
|
api_response = api_instance.activitypub_person(user_id)
|
|
pprint(api_response)
|
|
except ApiException as e:
|
|
print("Exception when calling ActivitypubApi->activitypub_person: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**user_id** | **int**| user ID of the user |
|
|
|
|
### Return type
|
|
|
|
[**ActivityPub**](ActivityPub.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **activitypub_person_inbox**
|
|
> activitypub_person_inbox(user_id)
|
|
|
|
Send to the inbox
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import gitea
|
|
from gitea.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Configure API key authorization: AccessToken
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['access_token'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['access_token'] = 'Bearer'
|
|
# Configure API key authorization: AuthorizationHeaderToken
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['Authorization'] = 'Bearer'
|
|
# Configure HTTP basic authorization: BasicAuth
|
|
configuration = gitea.Configuration()
|
|
configuration.username = 'YOUR_USERNAME'
|
|
configuration.password = 'YOUR_PASSWORD'
|
|
# Configure API key authorization: SudoHeader
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['Sudo'] = 'Bearer'
|
|
# Configure API key authorization: SudoParam
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['sudo'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['sudo'] = 'Bearer'
|
|
# Configure API key authorization: TOTPHeader
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer'
|
|
# Configure API key authorization: Token
|
|
configuration = gitea.Configuration()
|
|
configuration.api_key['token'] = 'YOUR_API_KEY'
|
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
# configuration.api_key_prefix['token'] = 'Bearer'
|
|
|
|
# create an instance of the API class
|
|
api_instance = gitea.ActivitypubApi(gitea.ApiClient(configuration))
|
|
user_id = 56 # int | user ID of the user
|
|
|
|
try:
|
|
# Send to the inbox
|
|
api_instance.activitypub_person_inbox(user_id)
|
|
except ApiException as e:
|
|
print("Exception when calling ActivitypubApi->activitypub_person_inbox: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**user_id** | **int**| user ID of the user |
|
|
|
|
### Return type
|
|
|
|
void (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|