memos-script/README.md
2024-04-30 10:31:09 +08:00

20 KiB

memos-python

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This Python package is automatically generated by the Swagger Codegen project:

  • API version: version not set
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/looching/memos-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/looching/memos-python.git)

Then import the package:

import memos 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import memos

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import memos
from memos.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = memos.ActivityServiceApi(memos.ApiClient(configuration))
id = 56 # int | The system-generated unique identifier for the activity.

try:
    # GetActivity returns the activity with the given id.
    api_response = api_instance.activity_service_get_activity(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivityServiceApi->activity_service_get_activity: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
ActivityServiceApi activity_service_get_activity GET /api/v1/activities/{id} GetActivity returns the activity with the given id.
AuthServiceApi auth_service_get_auth_status POST /api/v1/auth/status GetAuthStatus returns the current auth status of the user.
AuthServiceApi auth_service_sign_in POST /api/v1/auth/signin SignIn signs in the user with the given username and password.
AuthServiceApi auth_service_sign_in_with_sso POST /api/v1/auth/signin/sso SignInWithSSO signs in the user with the given SSO code.
AuthServiceApi auth_service_sign_out POST /api/v1/auth/signout SignOut signs out the user.
AuthServiceApi auth_service_sign_up POST /api/v1/auth/signup SignUp signs up the user with the given username and password.
IdentityProviderServiceApi identity_provider_service_create_identity_provider POST /api/v1/identityProviders CreateIdentityProvider creates an identity provider.
IdentityProviderServiceApi identity_provider_service_delete_identity_provider DELETE /api/v1/{name_1} DeleteIdentityProvider deletes an identity provider.
IdentityProviderServiceApi identity_provider_service_get_identity_provider GET /api/v1/{name_1} GetIdentityProvider gets an identity provider.
IdentityProviderServiceApi identity_provider_service_list_identity_providers GET /api/v1/identityProviders ListIdentityProviders lists identity providers.
IdentityProviderServiceApi identity_provider_service_update_identity_provider PATCH /api/v1/{identityProvider.name} UpdateIdentityProvider updates an identity provider.
InboxServiceApi inbox_service_delete_inbox DELETE /api/v1/{name_2} DeleteInbox deletes an inbox.
InboxServiceApi inbox_service_list_inboxes GET /api/v1/inboxes ListInboxes lists inboxes for a user.
InboxServiceApi inbox_service_update_inbox PATCH /api/v1/{inbox.name} UpdateInbox updates an inbox.
MarkdownServiceApi markdown_service_get_link_metadata GET /api/v1/markdown/link:metadata GetLinkMetadata returns metadata for a given link.
MarkdownServiceApi markdown_service_parse_markdown POST /api/v1/markdown/parse Parses the given markdown content and returns a list of nodes.
MarkdownServiceApi markdown_service_restore_markdown POST /api/v1/markdown:restore Restores the given nodes to markdown content.
MemoServiceApi memo_service_create_memo POST /api/v1/memos CreateMemo creates a memo.
MemoServiceApi memo_service_create_memo_comment POST /api/v1/{name}/comments CreateMemoComment creates a comment for a memo.
MemoServiceApi memo_service_delete_memo DELETE /api/v1/{name_4} DeleteMemo deletes a memo.
MemoServiceApi memo_service_delete_memo_reaction DELETE /api/v1/reactions/{reactionId} DeleteMemoReaction deletes a reaction for a memo.
MemoServiceApi memo_service_export_memos POST /api/v1/memos:export ExportMemos exports memos.
MemoServiceApi memo_service_get_memo GET /api/v1/{name_3} GetMemo gets a memo.
MemoServiceApi memo_service_get_user_memos_stats GET /api/v1/memos/stats GetUserMemosStats gets stats of memos for a user.
MemoServiceApi memo_service_list_memo_comments GET /api/v1/{name}/comments ListMemoComments lists comments for a memo.
MemoServiceApi memo_service_list_memo_reactions GET /api/v1/{name}/reactions ListMemoReactions lists reactions for a memo.
MemoServiceApi memo_service_list_memo_relations GET /api/v1/{name}/relations ListMemoRelations lists relations for a memo.
MemoServiceApi memo_service_list_memo_resources GET /api/v1/{name}/resources ListMemoResources lists resources for a memo.
MemoServiceApi memo_service_list_memos GET /api/v1/memos ListMemos lists memos with pagination and filter.
MemoServiceApi memo_service_search_memos GET /api/v1/memos:search SearchMemos searches memos.
MemoServiceApi memo_service_set_memo_relations PATCH /api/v1/{name}/relations SetMemoRelations sets relations for a memo.
MemoServiceApi memo_service_set_memo_resources PATCH /api/v1/{name}/resources SetMemoResources sets resources for a memo.
MemoServiceApi memo_service_update_memo PATCH /api/v1/{memo.name} UpdateMemo updates a memo.
MemoServiceApi memo_service_upsert_memo_reaction POST /api/v1/{name}/reactions UpsertMemoReaction upserts a reaction for a memo.
ResourceServiceApi resource_service_create_resource POST /api/v1/resources CreateResource creates a new resource.
ResourceServiceApi resource_service_delete_resource DELETE /api/v1/{name_3} DeleteResource deletes a resource by name.
ResourceServiceApi resource_service_get_resource GET /api/v1/{name_2} GetResource returns a resource by name.
ResourceServiceApi resource_service_list_resources GET /api/v1/resources ListResources lists all resources.
ResourceServiceApi resource_service_search_resources GET /api/v1/resources:search SearchResources searches memos.
ResourceServiceApi resource_service_update_resource PATCH /api/v1/{resource.name} UpdateResource updates a resource.
TagServiceApi tag_service_batch_upsert_tag POST /api/v1/tags:batchUpsert BatchUpsertTag upserts multiple tags.
TagServiceApi tag_service_delete_tag DELETE /api/v1/tags DeleteTag deletes a tag.
TagServiceApi tag_service_get_tag_suggestions GET /api/v1/tags/suggestion GetTagSuggestions gets tag suggestions from the user's memos.
TagServiceApi tag_service_list_tags GET /api/v1/tags ListTags lists tags.
TagServiceApi tag_service_rename_tag PATCH /api/v1/tags:rename RenameTag renames a tag. All related memos will be updated.
TagServiceApi tag_service_upsert_tag POST /api/v1/tags UpsertTag upserts a tag.
UserServiceApi user_service_create_user POST /api/v1/users CreateUser creates a new user.
UserServiceApi user_service_create_user_access_token POST /api/v1/{name}/access_tokens CreateUserAccessToken creates a new access token for a user.
UserServiceApi user_service_delete_user DELETE /api/v1/{name} DeleteUser deletes a user.
UserServiceApi user_service_delete_user_access_token DELETE /api/v1/{name}/access_tokens/{accessToken} DeleteUserAccessToken deletes an access token for a user.
UserServiceApi user_service_get_user GET /api/v1/{name} GetUser gets a user by name.
UserServiceApi user_service_get_user_setting GET /api/v1/{name}/setting GetUserSetting gets the setting of a user.
UserServiceApi user_service_list_user_access_tokens GET /api/v1/{name}/access_tokens ListUserAccessTokens returns a list of access tokens for a user.
UserServiceApi user_service_list_users GET /api/v1/users ListUsers returns a list of users.
UserServiceApi user_service_search_users GET /api/v1/users:search SearchUsers searches users by filter.
UserServiceApi user_service_update_user PATCH /api/v1/{user.name} UpdateUser updates a user.
UserServiceApi user_service_update_user_setting PATCH /api/v1/{setting.name} UpdateUserSetting updates the setting of a user.
WebhookServiceApi webhook_service_create_webhook POST /api/v1/webhooks CreateWebhook creates a new webhook.
WebhookServiceApi webhook_service_delete_webhook DELETE /api/v1/webhooks/{id} DeleteWebhook deletes a webhook by id.
WebhookServiceApi webhook_service_get_webhook GET /api/v1/webhooks/{id} GetWebhook returns a webhook by id.
WebhookServiceApi webhook_service_list_webhooks GET /api/v1/webhooks ListWebhooks returns a list of webhooks.
WebhookServiceApi webhook_service_update_webhook PATCH /api/v1/webhooks/{webhook.id} UpdateWebhook updates a webhook.
WorkspaceServiceApi workspace_service_get_workspace_profile GET /api/v1/workspace/profile GetWorkspaceProfile returns the workspace profile.
WorkspaceSettingServiceApi workspace_setting_service_get_workspace_setting GET /api/v1/workspace/{name} GetWorkspaceSetting returns the setting by name.
WorkspaceSettingServiceApi workspace_setting_service_list_workspace_settings GET /api/v1/workspace/settings ListWorkspaceSetting returns the list of settings.
WorkspaceSettingServiceApi workspace_setting_service_set_workspace_setting PATCH /api/v1/workspace/{setting.name} SetWorkspaceSetting updates the setting.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author