All URIs are relative to http://localhost:8091
| Method | HTTP request | Description |
|---|---|---|
| create_my_post | POST /apis/uc.api.content.halo.run/v1alpha1/posts | |
| get_my_post | GET /apis/uc.api.content.halo.run/v1alpha1/posts/{name} | |
| get_my_post_draft | GET /apis/uc.api.content.halo.run/v1alpha1/posts/{name}/draft | |
| list_my_posts | GET /apis/uc.api.content.halo.run/v1alpha1/posts | |
| publish_my_post | PUT /apis/uc.api.content.halo.run/v1alpha1/posts/{name}/publish | |
| recycle_my_post | DELETE /apis/uc.api.content.halo.run/v1alpha1/posts/{name}/recycle | |
| unpublish_my_post | PUT /apis/uc.api.content.halo.run/v1alpha1/posts/{name}/unpublish | |
| update_my_post | PUT /apis/uc.api.content.halo.run/v1alpha1/posts/{name} | |
| update_my_post_draft | PUT /apis/uc.api.content.halo.run/v1alpha1/posts/{name}/draft |
Post create_my_post(post=post)
Create my post. If you want to create a post with content, please set annotation: "content.halo.run/content-json" into annotations and refer to Content for corresponding data type.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.post import Post
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
post = halo_client.Post() # Post | (optional)
try:
api_response = api_instance.create_my_post(post=post)
print("The response of PostV1alpha1UcApi->create_my_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->create_my_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| post | Post | [optional] |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Post get_my_post(name)
Get post that belongs to the current user.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.post import Post
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
try:
api_response = api_instance.get_my_post(name)
print("The response of PostV1alpha1UcApi->get_my_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->get_my_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Snapshot get_my_post_draft(name, patched=patched)
Get my post draft.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.snapshot import Snapshot
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
patched = True # bool | Should include patched content and raw or not. (optional)
try:
api_response = api_instance.get_my_post_draft(name, patched=patched)
print("The response of PostV1alpha1UcApi->get_my_post_draft:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->get_my_post_draft: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name | |
| patched | bool | Should include patched content and raw or not. | [optional] |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListedPostList list_my_posts(page=page, size=size, label_selector=label_selector, field_selector=field_selector, sort=sort, publish_phase=publish_phase, keyword=keyword, category_with_children=category_with_children)
List posts owned by the current user.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.listed_post_list import ListedPostList
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
page = 56 # int | Page number. Default is 0. (optional)
size = 56 # int | Size number. Default is 0. (optional)
label_selector = ['label_selector_example'] # List[str] | Label selector. e.g.: hidden!=true (optional)
field_selector = ['field_selector_example'] # List[str] | Field selector. e.g.: metadata.name==halo (optional)
sort = ['sort_example'] # List[str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)
publish_phase = 'publish_phase_example' # str | Posts filtered by publish phase. (optional)
keyword = 'keyword_example' # str | Posts filtered by keyword. (optional)
category_with_children = 'category_with_children_example' # str | Posts filtered by category including sub-categories. (optional)
try:
api_response = api_instance.list_my_posts(page=page, size=size, label_selector=label_selector, field_selector=field_selector, sort=sort, publish_phase=publish_phase, keyword=keyword, category_with_children=category_with_children)
print("The response of PostV1alpha1UcApi->list_my_posts:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->list_my_posts: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Page number. Default is 0. | [optional] |
| size | int | Size number. Default is 0. | [optional] |
| label_selector | List[str] | Label selector. e.g.: hidden!=true | [optional] |
| field_selector | List[str] | Field selector. e.g.: metadata.name==halo | [optional] |
| sort | List[str] | Sorting criteria in the format: property,(asc | desc). Default sort order is ascending. Multiple sort criteria are supported. |
| publish_phase | str | Posts filtered by publish phase. | [optional] |
| keyword | str | Posts filtered by keyword. | [optional] |
| category_with_children | str | Posts filtered by category including sub-categories. | [optional] |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Post publish_my_post(name)
Publish my post.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.post import Post
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
try:
api_response = api_instance.publish_my_post(name)
print("The response of PostV1alpha1UcApi->publish_my_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->publish_my_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Post recycle_my_post(name)
Move my post to recycle bin.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.post import Post
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
try:
api_response = api_instance.recycle_my_post(name)
print("The response of PostV1alpha1UcApi->recycle_my_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->recycle_my_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Post unpublish_my_post(name)
Unpublish my post.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.post import Post
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
try:
api_response = api_instance.unpublish_my_post(name)
print("The response of PostV1alpha1UcApi->unpublish_my_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->unpublish_my_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Post update_my_post(name, post=post)
Update my post.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.post import Post
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
post = halo_client.Post() # Post | (optional)
try:
api_response = api_instance.update_my_post(name, post=post)
print("The response of PostV1alpha1UcApi->update_my_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->update_my_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name | |
| post | Post | [optional] |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Snapshot update_my_post_draft(name, snapshot=snapshot)
Update draft of my post. Please make sure set annotation: "content.halo.run/content-json" into annotations and refer to Content for corresponding data type.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.snapshot import Snapshot
from halo_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8091
# See configuration.py for a list of all supported configuration parameters.
configuration = halo_client.Configuration(
host = "http://localhost:8091"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = halo_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = halo_client.PostV1alpha1UcApi(api_client)
name = 'name_example' # str | Post name
snapshot = halo_client.Snapshot() # Snapshot | (optional)
try:
api_response = api_instance.update_my_post_draft(name, snapshot=snapshot)
print("The response of PostV1alpha1UcApi->update_my_post_draft:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PostV1alpha1UcApi->update_my_post_draft: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Post name | |
| snapshot | Snapshot | [optional] |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]