0.0.27 • Published 1 year ago

yay.js v0.0.27

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

About

同世代と趣味の通話コミュニティ - Yay!(イェイ)の API を簡単に扱える Node.js モジュールです。

  • オブジェクト指向
  • 非同期処理に対応
  • クッキーに対応
  • API を 100% カバー

Python 版はこちら

Installation

Node.js 16.17.0 以上のバージョンが必要です。

npm install yay.js

Example usage

yay.js をインストール:

npm install yay.js

通常の API にアクセスする場合:

import { Client } from 'yay.js';

const main = async () => {
  const client = new Client();

  await client.login({
    email: 'yourEmail',
    password: 'yourPassword',
  });

  await client.createPost({
    text: 'Hello with yay.js!',
    sharedUrl: 'https://github.com/ekkx/yay.js',
  });
};

main();

WebSocket を使用する場合:

import { Client, GatewayIntents } from 'yay.js';
const client = new Client({ intents: [GatewayIntents.ChatMessage] });

client.on('ready', () => {
  console.log('The bot is ready!');
});

client.on('messageCreate', async (message) => {
  if (message.text === 'ping') {
    await client.sendMessage({
      text: 'pong',
      roomId: message.roomId,
    });
  }
});

client.login({
  email: 'yourEmail',
  password: 'yourPassword',
});

Links

Contributing

現在開発中です。
以下のアイコンをクリックして参加!

Help

もしドキュメントを読んでもわからないことがあったり、なかなか解決しない問題があった場合は、遠慮なく yay.js の公式 Discord サーバーに参加してください!

0.0.27

1 year ago

0.0.26

1 year ago

0.0.25

1 year ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago

0.0.3

2 years ago

0.1.2

2 years ago

0.0.2

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.1.4

2 years ago

0.0.4

2 years ago

0.1.3

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago