Skip to main content

PingPongBuilder Custom Api Module

Project description

PingPongWr

파이썬으로 제작된 핑퐁 빌더 Custom Api를 좀 더 쉽고 간편하게 사용할 수 있게 해주는 모듈입니다.
별도의 출처를 밝힐필요 없습니다.


Quick Example

독자적 사용 예시

import PingPongWr # 메인 모듈
import asyncio # 비동기 실행을 위한 모듈

url = "커스텀 API 링크"  # 핑퐁빌더 Custom API URL
pingpong_token = "인증 토큰"  # 핑퐁빌더 Custom API Token

Ping = PingPongWr.Conntect(url, pingpong_token)  # 핑퐁 모듈 클래스 선언

async def Example(): # 비동기식 함수
    str_text = input("나: ")  # 대화할 말 입력받기
    return_data = await Ping.Pong(session_id ="Example", text = str_text, topic = True, image = True, dialog = True) # 핑퐁빌더 API에 Post 요청

    print(return_data) # {"text": "안녕안녕입니다", "topic": None, "Image": None}

asyncio.run(Example())  # 비동기로 함수 실행

Discord Example

디스코드에서 사용예시

import discord
import PingPongWr

from discord.ext import commands

bot = commands.Bot(command_prefix='>')

url = "커스텀 API 링크"  # 핑퐁빌더 Custom API URL
pingpong_token = "인증 토큰"  # 핑퐁빌더 Custom API Token

Ping = PingPongWr.Conntect(url, pingpong_token)  # 핑퐁 모듈 클래스 선언

@bot.event()
async def on_message(message):

    if message.author == bot.user:
            return

     if message.content.startswith("봇"):
        str_text = (message.content.split(" "))[1]
        return_data = await Ping.Pong(session_id ="Example", text = str_text, topic = True, image = True, dialog = True) # 핑퐁빌더 API에 Post 요청
        await message.channel.send(f"{message.author.mention}, {return_data["text"]}")

bot.run("token")

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PingPongWr-0.0.6.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PingPongWr-0.0.6-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file PingPongWr-0.0.6.tar.gz.

File metadata

  • Download URL: PingPongWr-0.0.6.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for PingPongWr-0.0.6.tar.gz
Algorithm Hash digest
SHA256 36f3a370993c90b6c8c118e81ace8e8b7be6b39603d01639075a0ddb8889b496
MD5 cd6c4359a70b9ed92e1995a63b4b8808
BLAKE2b-256 37f7eb9a37e123911ce0ab51982e6cb19cc043bd27ea1c33ef61a0457ea35186

See more details on using hashes here.

File details

Details for the file PingPongWr-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: PingPongWr-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for PingPongWr-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6be0767fce81b1a3f2277598f86ce76c85ec07d17b2b362c0a5d3cd4b4949a23
MD5 1d188231068a2d1b77643f2fb08566ce
BLAKE2b-256 ee5b603294b8eda5cbebd49ab751ceca5a8a8da5e0fd3725c4469939dc21d98d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page