Skip to content

Latest commit

 

History

History
1420 lines (1023 loc) · 43.9 KB

StampApi.md

File metadata and controls

1420 lines (1023 loc) · 43.9 KB

traq.StampApi

All URIs are relative to https://q.trap.jp/api/v3

Method HTTP request Description
add_message_stamp POST /messages/{messageId}/stamps/{stampId} スタンプを押す
change_stamp_image PUT /stamps/{stampId}/image スタンプ画像を変更
create_stamp POST /stamps スタンプを作成
create_stamp_palette POST /stamp-palettes スタンプパレットを作成
delete_stamp DELETE /stamps/{stampId} スタンプを削除
delete_stamp_palette DELETE /stamp-palettes/{paletteId} スタンプパレットを削除
edit_stamp PATCH /stamps/{stampId} スタンプ情報を変更
edit_stamp_palette PATCH /stamp-palettes/{paletteId} スタンプパレットを編集
get_message_stamps GET /messages/{messageId}/stamps メッセージのスタンプリストを取得
get_my_stamp_history GET /users/me/stamp-history スタンプ履歴を取得
get_stamp GET /stamps/{stampId} スタンプ情報を取得
get_stamp_image GET /stamps/{stampId}/image スタンプ画像を取得
get_stamp_palette GET /stamp-palettes/{paletteId} スタンプパレットを取得
get_stamp_palettes GET /stamp-palettes スタンプパレットのリストを取得
get_stamp_stats GET /stamps/{stampId}/stats スタンプ統計情報を取得
get_stamps GET /stamps スタンプリストを取得
remove_message_stamp DELETE /messages/{messageId}/stamps/{stampId} スタンプを消す

add_message_stamp

add_message_stamp(message_id, stamp_id)

スタンプを押す

指定したメッセージに指定したスタンプを押します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.post_message_stamp_request import PostMessageStampRequest
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 = stamp_api.StampApi(api_client)
    message_id = "messageId_example" # str | メッセージUUID
    stamp_id = "stampId_example" # str | スタンプUUID
    post_message_stamp_request = PostMessageStampRequest(
        count=1,
    ) # PostMessageStampRequest |  (optional)

    # example passing only required values which don't have defaults set
    try:
        # スタンプを押す
        api_instance.add_message_stamp(message_id, stamp_id)
    except traq.ApiException as e:
        print("Exception when calling StampApi->add_message_stamp: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # スタンプを押す
        api_instance.add_message_stamp(message_id, stamp_id, post_message_stamp_request=post_message_stamp_request)
    except traq.ApiException as e:
        print("Exception when calling StampApi->add_message_stamp: %s\n" % e)

Parameters

Name Type Description Notes
message_id str メッセージUUID
stamp_id str スタンプUUID
post_message_stamp_request PostMessageStampRequest [optional]

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

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]

change_stamp_image

change_stamp_image(stamp_id, file)

スタンプ画像を変更

指定したスタンプの画像を変更します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_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 = stamp_api.StampApi(api_client)
    stamp_id = "stampId_example" # str | スタンプUUID
    file = open('/path/to/file', 'rb') # file_type | スタンプ画像(1MBまでのpng, jpeg, gif)

    # example passing only required values which don't have defaults set
    try:
        # スタンプ画像を変更
        api_instance.change_stamp_image(stamp_id, file)
    except traq.ApiException as e:
        print("Exception when calling StampApi->change_stamp_image: %s\n" % e)

Parameters

Name Type Description Notes
stamp_id str スタンプUUID
file file_type スタンプ画像(1MBまでのpng, jpeg, gif)

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No Content -
400 Bad Request -
404 Not Found -
413 Request Entity Too Large -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_stamp

Stamp create_stamp(name, file)

スタンプを作成

スタンプを新規作成します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp import Stamp
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 = stamp_api.StampApi(api_client)
    name = "zBAMDTMv2D2ylmgd10Z3UB6U" # str | スタンプ名
    file = open('/path/to/file', 'rb') # file_type | スタンプ画像(1MBまでのpng, jpeg, gif)

    # example passing only required values which don't have defaults set
    try:
        # スタンプを作成
        api_response = api_instance.create_stamp(name, file)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->create_stamp: %s\n" % e)

Parameters

Name Type Description Notes
name str スタンプ名
file file_type スタンプ画像(1MBまでのpng, jpeg, gif)

Return type

Stamp

Authorization

OAuth2

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -
409 Conflict -
413 Request Entity Too Large -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_stamp_palette

StampPalette create_stamp_palette()

スタンプパレットを作成

スタンプパレットを作成します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp_palette import StampPalette
from traq.model.post_stamp_palette_request import PostStampPaletteRequest
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 = stamp_api.StampApi(api_client)
    post_stamp_palette_request = PostStampPaletteRequest(
        stamps=[
            "stamps_example",
        ],
        name="name_example",
        description="description_example",
    ) # PostStampPaletteRequest |  (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # スタンプパレットを作成
        api_response = api_instance.create_stamp_palette(post_stamp_palette_request=post_stamp_palette_request)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->create_stamp_palette: %s\n" % e)

Parameters

Name Type Description Notes
post_stamp_palette_request PostStampPaletteRequest [optional]

Return type

StampPalette

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_stamp

delete_stamp(stamp_id)

スタンプを削除

指定したスタンプを削除します。 対象のスタンプの削除権限が必要です。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_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 = stamp_api.StampApi(api_client)
    stamp_id = "stampId_example" # str | スタンプUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプを削除
        api_instance.delete_stamp(stamp_id)
    except traq.ApiException as e:
        print("Exception when calling StampApi->delete_stamp: %s\n" % e)

Parameters

Name Type Description Notes
stamp_id str スタンプUUID

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

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]

delete_stamp_palette

delete_stamp_palette(palette_id)

スタンプパレットを削除

指定したスタンプパレットを削除します。 対象のスタンプパレットの管理権限が必要です。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_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 = stamp_api.StampApi(api_client)
    palette_id = "paletteId_example" # str | スタンプパレットUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプパレットを削除
        api_instance.delete_stamp_palette(palette_id)
    except traq.ApiException as e:
        print("Exception when calling StampApi->delete_stamp_palette: %s\n" % e)

Parameters

Name Type Description Notes
palette_id str スタンプパレットUUID

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

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]

edit_stamp

edit_stamp(stamp_id)

スタンプ情報を変更

指定したスタンプの情報を変更します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.patch_stamp_request import PatchStampRequest
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 = stamp_api.StampApi(api_client)
    stamp_id = "stampId_example" # str | スタンプUUID
    patch_stamp_request = PatchStampRequest(
        name="zBAMDTMv2D2ylmgd10Z3UB6U",
        creator_id="creator_id_example",
    ) # PatchStampRequest |  (optional)

    # example passing only required values which don't have defaults set
    try:
        # スタンプ情報を変更
        api_instance.edit_stamp(stamp_id)
    except traq.ApiException as e:
        print("Exception when calling StampApi->edit_stamp: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # スタンプ情報を変更
        api_instance.edit_stamp(stamp_id, patch_stamp_request=patch_stamp_request)
    except traq.ApiException as e:
        print("Exception when calling StampApi->edit_stamp: %s\n" % e)

Parameters

Name Type Description Notes
stamp_id str スタンプUUID
patch_stamp_request PatchStampRequest [optional]

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content スタンプ情報が変更されました。 -
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_stamp_palette

edit_stamp_palette(palette_id)

スタンプパレットを編集

指定したスタンプパレットを編集します。 リクエストのスタンプの配列の順番は保存されて変更されます。 対象のスタンプパレットの管理権限が必要です。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.patch_stamp_palette_request import PatchStampPaletteRequest
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 = stamp_api.StampApi(api_client)
    palette_id = "paletteId_example" # str | スタンプパレットUUID
    patch_stamp_palette_request = PatchStampPaletteRequest(
        name="name_example",
        description="description_example",
        stamps=[
            "stamps_example",
        ],
    ) # PatchStampPaletteRequest |  (optional)

    # example passing only required values which don't have defaults set
    try:
        # スタンプパレットを編集
        api_instance.edit_stamp_palette(palette_id)
    except traq.ApiException as e:
        print("Exception when calling StampApi->edit_stamp_palette: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # スタンプパレットを編集
        api_instance.edit_stamp_palette(palette_id, patch_stamp_palette_request=patch_stamp_palette_request)
    except traq.ApiException as e:
        print("Exception when calling StampApi->edit_stamp_palette: %s\n" % e)

Parameters

Name Type Description Notes
palette_id str スタンプパレットUUID
patch_stamp_palette_request PatchStampPaletteRequest [optional]

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content 変更しました。 -
400 Bad Request -
403 Forbidden 対象のスタンプパレットを編集する権限がありません。 -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_message_stamps

[MessageStamp] get_message_stamps(message_id)

メッセージのスタンプリストを取得

指定したメッセージに押されているスタンプのリストを取得します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.message_stamp import MessageStamp
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 = stamp_api.StampApi(api_client)
    message_id = "messageId_example" # str | メッセージUUID

    # example passing only required values which don't have defaults set
    try:
        # メッセージのスタンプリストを取得
        api_response = api_instance.get_message_stamps(message_id)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_message_stamps: %s\n" % e)

Parameters

Name Type Description Notes
message_id str メッセージUUID

Return type

[MessageStamp]

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_my_stamp_history

[StampHistoryEntry] get_my_stamp_history()

スタンプ履歴を取得

自分のスタンプ履歴を最大100件まで取得します。 結果は降順で返されます。 このAPIが返すスタンプ履歴は厳密な履歴ではありません。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp_history_entry import StampHistoryEntry
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 = stamp_api.StampApi(api_client)
    limit = 100 # int | 件数 (optional) if omitted the server will use the default value of 100

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # スタンプ履歴を取得
        api_response = api_instance.get_my_stamp_history(limit=limit)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_my_stamp_history: %s\n" % e)

Parameters

Name Type Description Notes
limit int 件数 [optional] if omitted the server will use the default value of 100

Return type

[StampHistoryEntry]

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_stamp

Stamp get_stamp(stamp_id)

スタンプ情報を取得

指定したスタンプの情報を取得します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp import Stamp
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 = stamp_api.StampApi(api_client)
    stamp_id = "stampId_example" # str | スタンプUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプ情報を取得
        api_response = api_instance.get_stamp(stamp_id)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_stamp: %s\n" % e)

Parameters

Name Type Description Notes
stamp_id str スタンプUUID

Return type

Stamp

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_stamp_image

file_type get_stamp_image(stamp_id)

スタンプ画像を取得

指定したIDのスタンプ画像を返します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_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 = stamp_api.StampApi(api_client)
    stamp_id = "stampId_example" # str | スタンプUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプ画像を取得
        api_response = api_instance.get_stamp_image(stamp_id)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_stamp_image: %s\n" % e)

Parameters

Name Type Description Notes
stamp_id str スタンプUUID

Return type

file_type

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: image/png, image/gif, image/jpeg

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_stamp_palette

StampPalette get_stamp_palette(palette_id)

スタンプパレットを取得

指定したスタンプパレットの情報を取得します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp_palette import StampPalette
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 = stamp_api.StampApi(api_client)
    palette_id = "paletteId_example" # str | スタンプパレットUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプパレットを取得
        api_response = api_instance.get_stamp_palette(palette_id)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_stamp_palette: %s\n" % e)

Parameters

Name Type Description Notes
palette_id str スタンプパレットUUID

Return type

StampPalette

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_stamp_palettes

[StampPalette] get_stamp_palettes()

スタンプパレットのリストを取得

自身が所有しているスタンプパレットのリストを取得します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp_palette import StampPalette
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 = stamp_api.StampApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        # スタンプパレットのリストを取得
        api_response = api_instance.get_stamp_palettes()
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_stamp_palettes: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

[StampPalette]

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_stamp_stats

StampStats get_stamp_stats(stamp_id)

スタンプ統計情報を取得

指定したスタンプの統計情報を取得します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp_stats import StampStats
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 = stamp_api.StampApi(api_client)
    stamp_id = "stampId_example" # str | スタンプUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプ統計情報を取得
        api_response = api_instance.get_stamp_stats(stamp_id)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_stamp_stats: %s\n" % e)

Parameters

Name Type Description Notes
stamp_id str スタンプUUID

Return type

StampStats

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found スタンプが見つかりません。 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_stamps

[Stamp] get_stamps()

スタンプリストを取得

スタンプのリストを取得します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_api
from traq.model.stamp import Stamp
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 = stamp_api.StampApi(api_client)
    include_unicode = True # bool | Unicode絵文字を含ませるかどうか (optional) if omitted the server will use the default value of True

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # スタンプリストを取得
        api_response = api_instance.get_stamps(include_unicode=include_unicode)
        pprint(api_response)
    except traq.ApiException as e:
        print("Exception when calling StampApi->get_stamps: %s\n" % e)

Parameters

Name Type Description Notes
include_unicode bool Unicode絵文字を含ませるかどうか [optional] if omitted the server will use the default value of True

Return type

[Stamp]

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_message_stamp

remove_message_stamp(message_id, stamp_id)

スタンプを消す

指定したメッセージから指定した自身が押したスタンプを削除します。

Example

  • OAuth Authentication (OAuth2):
import time
import traq
from traq.api import stamp_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 = stamp_api.StampApi(api_client)
    message_id = "messageId_example" # str | メッセージUUID
    stamp_id = "stampId_example" # str | スタンプUUID

    # example passing only required values which don't have defaults set
    try:
        # スタンプを消す
        api_instance.remove_message_stamp(message_id, stamp_id)
    except traq.ApiException as e:
        print("Exception when calling StampApi->remove_message_stamp: %s\n" % e)

Parameters

Name Type Description Notes
message_id str メッセージUUID
stamp_id str スタンプUUID

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content スタンプを消すことができました。 -
404 Not Found メッセージ、またはスタンプが見つかりません。 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]