All URIs are relative to https://q.trap.jp/api/v3
Method | HTTP request | Description |
---|---|---|
add_my_user_tag | POST /users/me/tags | 自分にタグを追加 |
add_user_tag | POST /users/{userId}/tags | ユーザーにタグを追加 |
edit_my_user_tag | PATCH /users/me/tags/{tagId} | 自分のタグを編集 |
edit_user_tag | PATCH /users/{userId}/tags/{tagId} | ユーザーのタグを編集 |
get_my_user_tags | GET /users/me/tags | 自分のタグリストを取得 |
get_tag | GET /tags/{tagId} | タグ情報を取得 |
get_user_tags | GET /users/{userId}/tags | ユーザーのタグリストを取得 |
remove_my_user_tag | DELETE /users/me/tags/{tagId} | 自分からタグを削除します |
remove_user_tag | DELETE /users/{userId}/tags/{tagId} | ユーザーからタグを削除します |
UserTag add_my_user_tag()
自分にタグを追加
自分に新しくタグを追加します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.user_tag import UserTag
from traq.model.post_user_tag_request import PostUserTagRequest
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
post_user_tag_request = PostUserTagRequest(
tag="tag_example",
) # PostUserTagRequest | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# 自分にタグを追加
api_response = api_instance.add_my_user_tag(post_user_tag_request=post_user_tag_request)
pprint(api_response)
except traq.ApiException as e:
print("Exception when calling UserTagApi->add_my_user_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
post_user_tag_request | PostUserTagRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
409 | Conflict 既に追加されています。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserTag add_user_tag(user_id)
ユーザーにタグを追加
指定したユーザーに指定したタグを追加します。 Webhookユーザーにタグを追加することは出来ません。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.user_tag import UserTag
from traq.model.post_user_tag_request import PostUserTagRequest
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
user_id = "userId_example" # str | ユーザーUUID
post_user_tag_request = PostUserTagRequest(
tag="tag_example",
) # PostUserTagRequest | (optional)
# example passing only required values which don't have defaults set
try:
# ユーザーにタグを追加
api_response = api_instance.add_user_tag(user_id)
pprint(api_response)
except traq.ApiException as e:
print("Exception when calling UserTagApi->add_user_tag: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# ユーザーにタグを追加
api_response = api_instance.add_user_tag(user_id, post_user_tag_request=post_user_tag_request)
pprint(api_response)
except traq.ApiException as e:
print("Exception when calling UserTagApi->add_user_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user_id | str | ユーザーUUID | |
post_user_tag_request | PostUserTagRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found ユーザーが見つかりません。 | - |
409 | Conflict 既に追加されています。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
edit_my_user_tag(tag_id)
自分のタグを編集
自分の指定したタグの状態を変更します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.patch_user_tag_request import PatchUserTagRequest
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
tag_id = "tagId_example" # str | タグUUID
patch_user_tag_request = PatchUserTagRequest(
is_locked=True,
) # PatchUserTagRequest | (optional)
# example passing only required values which don't have defaults set
try:
# 自分のタグを編集
api_instance.edit_my_user_tag(tag_id)
except traq.ApiException as e:
print("Exception when calling UserTagApi->edit_my_user_tag: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# 自分のタグを編集
api_instance.edit_my_user_tag(tag_id, patch_user_tag_request=patch_user_tag_request)
except traq.ApiException as e:
print("Exception when calling UserTagApi->edit_my_user_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tag_id | str | タグUUID | |
patch_user_tag_request | PatchUserTagRequest | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content 変更されました。 | - |
400 | Bad Request | - |
404 | Not Found タグが見つかりません。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
edit_user_tag(user_id, tag_id)
ユーザーのタグを編集
指定したユーザーの指定したタグの状態を変更します。 他人の状態は変更できません。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.patch_user_tag_request import PatchUserTagRequest
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
user_id = "userId_example" # str | ユーザーUUID
tag_id = "tagId_example" # str | タグUUID
patch_user_tag_request = PatchUserTagRequest(
is_locked=True,
) # PatchUserTagRequest | (optional)
# example passing only required values which don't have defaults set
try:
# ユーザーのタグを編集
api_instance.edit_user_tag(user_id, tag_id)
except traq.ApiException as e:
print("Exception when calling UserTagApi->edit_user_tag: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# ユーザーのタグを編集
api_instance.edit_user_tag(user_id, tag_id, patch_user_tag_request=patch_user_tag_request)
except traq.ApiException as e:
print("Exception when calling UserTagApi->edit_user_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user_id | str | ユーザーUUID | |
tag_id | str | タグUUID | |
patch_user_tag_request | PatchUserTagRequest | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content 変更されました。 | - |
400 | Bad Request | - |
404 | Not Found ユーザーか、タグが見つかりません。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[UserTag] get_my_user_tags()
自分のタグリストを取得
自分に付けられているタグの配列を取得します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.user_tag import UserTag
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# 自分のタグリストを取得
api_response = api_instance.get_my_user_tags()
pprint(api_response)
except traq.ApiException as e:
print("Exception when calling UserTagApi->get_my_user_tags: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tag get_tag(tag_id)
タグ情報を取得
指定したタグの情報を取得します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.tag import Tag
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
tag_id = "tagId_example" # str | タグUUID
# example passing only required values which don't have defaults set
try:
# タグ情報を取得
api_response = api_instance.get_tag(tag_id)
pprint(api_response)
except traq.ApiException as e:
print("Exception when calling UserTagApi->get_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tag_id | str | タグUUID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[UserTag] get_user_tags(user_id)
ユーザーのタグリストを取得
指定したユーザーのタグリストを取得します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from traq.model.user_tag import UserTag
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
user_id = "userId_example" # str | ユーザーUUID
# example passing only required values which don't have defaults set
try:
# ユーザーのタグリストを取得
api_response = api_instance.get_user_tags(user_id)
pprint(api_response)
except traq.ApiException as e:
print("Exception when calling UserTagApi->get_user_tags: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user_id | str | ユーザーUUID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Not Found ユーザーが見つかりません。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_my_user_tag(tag_id)
自分からタグを削除します
既に存在しないタグを削除しようとした場合は204を返します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
tag_id = "tagId_example" # str | タグUUID
# example passing only required values which don't have defaults set
try:
# 自分からタグを削除します
api_instance.remove_my_user_tag(tag_id)
except traq.ApiException as e:
print("Exception when calling UserTagApi->remove_my_user_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tag_id | str | タグUUID |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content 削除されました。 | - |
403 | Forbidden タグがロックされています。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_user_tag(user_id, tag_id)
ユーザーからタグを削除します
既に存在しないタグを削除しようとした場合は204を返します。
- OAuth Authentication (OAuth2):
import time
import traq
from traq.api import user_tag_api
from pprint import pprint
# Defining the host is optional and defaults to https://q.trap.jp/api/v3
# See configuration.py for a list of all supported configuration parameters.
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
# 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 OAuth2 access token for authorization: OAuth2
configuration = traq.Configuration(
host = "https://q.trap.jp/api/v3"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with traq.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = user_tag_api.UserTagApi(api_client)
user_id = "userId_example" # str | ユーザーUUID
tag_id = "tagId_example" # str | タグUUID
# example passing only required values which don't have defaults set
try:
# ユーザーからタグを削除します
api_instance.remove_user_tag(user_id, tag_id)
except traq.ApiException as e:
print("Exception when calling UserTagApi->remove_user_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user_id | str | ユーザーUUID | |
tag_id | str | タグUUID |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content 削除されました。 | - |
403 | Forbidden | - |
404 | Not Found ユーザーが見つかりません。 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]