Skip to content

Commit 50aac0d

Browse files
committed
ソースコードを非公開に
0 parents  commit 50aac0d

File tree

5 files changed

+370
-0
lines changed

5 files changed

+370
-0
lines changed

.github/SECURITY.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Thanks for helping make yaylib safe for everyone.
2+
3+
## Supported Versions
4+
5+
Any issues reported should be applicable to the latest development version on the default branch of this repository.
6+
7+
## Reporting Security Issues
8+
9+
If you believe you have found a security vulnerability, please privately report it to us through GitHub.
10+
11+
**Please do not report security vulnerabilities through public yaylib issues, discussions, or pull requests.**
12+
13+
Instead, please send an email to [email protected] .
14+
15+
Please include as much of the information listed below as you can to help us better understand and resolve the issue:
16+
17+
* The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
18+
* Full paths of source file(s) related to the manifestation of the issue
19+
* The location of the affected source code (tag/branch/commit or direct URL)
20+
* Any special configuration required to reproduce the issue
21+
* Step-by-step instructions to reproduce the issue
22+
* Proof-of-concept or exploit code (if possible)
23+
* Impact of the issue, including how an attacker might exploit the issue
24+
25+
This information will help us triage your report more quickly.

.github/workflows/jekyll-gh-pages.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["master"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v3
33+
- name: Build with Jekyll
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: ./
37+
destination: ./_site
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v1
40+
41+
# Deployment job
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v2

.vscode/settings.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"[python]": {
3+
"editor.tabSize": 4,
4+
"editor.defaultFormatter": "ms-python.black-formatter",
5+
"editor.codeActionsOnSave": {
6+
"source.organizeImports": "explicit"
7+
}
8+
},
9+
"python.formatting.provider": "black",
10+
"python.formatting.blackArgs": ["--line-length=88"],
11+
"python.linting.enabled": true,
12+
"editor.formatOnSave": true
13+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 ekkx
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+260
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
<div><a id="readme-top"></a></div>
2+
<div align="center">
3+
<img src="https://img.shields.io/github/stars/ekkx/yaylib?style=for-the-badge&logo=appveyor&color=blue" />
4+
<img src="https://img.shields.io/github/forks/ekkx/yaylib?style=for-the-badge&logo=appveyor&color=blue" />
5+
<img src="https://img.shields.io/github/issues/ekkx/yaylib?style=for-the-badge&logo=appveyor&color=informational" />
6+
<img src="https://img.shields.io/github/issues-pr/ekkx/yaylib?style=for-the-badge&logo=appveyor&color=informational" />
7+
</div>
8+
<br />
9+
<p align="center">
10+
<a href="https://github.com/othneildrew/Best-README-Template">
11+
<img src="https://github.com/ekkx/yaylib/assets/77382767/45c45b21-d812-4cad-8f27-315ffef53201" alt="Logo" height="300px">
12+
</a>
13+
<h3 align="center">yaylib</h3>
14+
<p align="center">
15+
同世代とつながる通話コミュニティ - Yay!(イェイ)の API ライブラリ<br />
16+
あらゆる操作の自動化や、ボットの開発が可能です。
17+
<br />
18+
<br />
19+
<a href="https://github.com/ekkx/yay.js">
20+
<strong>Node.js 版はこちらから »</strong>
21+
</a>
22+
<br />
23+
<br />
24+
<a href="https://github.com/ekkx/yaylib/issues">Report Bug</a>
25+
·
26+
<a href="https://github.com/ekkx/yaylib/issues">Request Feature</a>
27+
·
28+
<a href="https://discord.gg/MEuBfNtqRN">Join the discord</a>
29+
</p>
30+
</p>
31+
32+
> **利用者の皆様へ**<br /> > **2024 年 5 月 1 日をもちまして、「好きでつながるバーチャルワールド Yay!(イェイ)」のライブラリである [yaylib](https://github.com/ekkx/yaylib) 及び [yay.js](https://github.com/ekkx/yay.js) のソースコードは一時的に非公開となります。それに伴い、これらのライブラリのアップデートやメンテナンスも一時停止いたします。<br />利用者の皆様にはご迷惑をおかけしますがご理解のほどよろしくお願いいたします。**<br />連絡先: [[email protected]](mailto:[email protected])
33+
34+
<!-- TABLE OF CONTENTS -->
35+
36+
<details>
37+
<summary>Table of Contents</summary>
38+
<ol>
39+
<li><a href="#buy-me-a-coffee">Buy me a coffee</a></li>
40+
<li><a href="#-installation">インストール</a></li>
41+
<li><a href="#-quick-example">使用例</a></li>
42+
<li><a href="#crown-yaylib-で誕生したロボットたち">yaylib で誕生したロボットたち</a></li>
43+
<li><a href="#handshake-共同開発について">共同開発について</a></li>
44+
<li><a href="#免責事項">免責事項</a></li>
45+
<li><a href="#利用許諾">利用許諾</a></li>
46+
</ol>
47+
</details>
48+
49+
<!-- Buy me a coffee -->
50+
51+
## Buy me a coffee
52+
53+
このライブラリが気に入っていただけたら、<a href="https://github.com/ekkx/yaylib/">**リポジトリにスターをお願いします</a>(⭐)**
54+
また、Buy Me a Coffee からご支援いただけますと幸いです。
55+
56+
<a href="https://www.buymeacoffee.com/qvco" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
57+
58+
<!-- 使用例 -->
59+
60+
## [<img src="https://github.com/ekkx/yaylib/assets/77382767/dc7dcea0-c581-4039-8fc2-3994884d2ba3" width="30" height="30" />](https://github.com/ekkx) Quick Example
61+
62+
#### ✨ 投稿を作成する
63+
64+
```python
65+
import yaylib
66+
67+
client = yaylib.Client()
68+
client.login(email="your_email", password="your_password")
69+
70+
client.create_post("Hello with yaylib!")
71+
```
72+
73+
#### ✨ 埋め込みリンクの投稿を作成する
74+
75+
```python
76+
import yaylib
77+
78+
client = yaylib.Client()
79+
client.login(email="your_email", password="your_password")
80+
81+
client.create_post("Hello with yaylib!", shared_url="https://github.com/ekkx/yaylib")
82+
```
83+
84+
#### ✨ 画像と一緒に投稿を作成する
85+
86+
```python
87+
import yaylib
88+
89+
client = yaylib.Client()
90+
client.login(email="your_email", password="your_password")
91+
92+
# 画像のパスを指定
93+
image_paths = [
94+
"./test1.jpg",
95+
"./test2.jpg",
96+
"./test3.jpg",
97+
]
98+
99+
# 画像の使い道を指定
100+
image_type = yaylib.ImageType.post
101+
102+
# サーバー上にアップロード
103+
attachments = client.upload_image(image_paths, image_type)
104+
105+
# サーバー上のファイル名を指定する
106+
# attachmentsが一つ飛ばしなのはオリジナル品質の画像のみを指定するため
107+
client.create_post(
108+
"Hello with yaylib!",
109+
attachment_filename=attachments[0].filename,
110+
attachment_2_filename=attachments[2].filename,
111+
attachment_3_filename=attachments[4].filename,
112+
)
113+
```
114+
115+
#### ✨ タイムラインを 100 件取得する
116+
117+
```python
118+
import yaylib
119+
120+
client = yaylib.Client()
121+
122+
timeline = client.get_timeline(number=100)
123+
124+
for post in timeline.posts:
125+
print(post.user.nickname) # 投稿者名
126+
print(post.text) # 本文
127+
print(post.likes_count) # いいね数
128+
print(post.reposts_count) # (´∀`∩)↑age↑の数
129+
print(post.in_reply_to_post_count) # 返信の数
130+
```
131+
132+
#### ✨ タイムラインをキーワードで検索して「いいね」する
133+
134+
```python
135+
import yaylib
136+
137+
client = yaylib.Client()
138+
client.login(email="your_email", password="your_password")
139+
140+
timeline = client.get_timeline_by_keyword(
141+
keyword="プログラミング",
142+
number=15
143+
)
144+
145+
for post in timeline.posts:
146+
client.like(post.id)
147+
```
148+
149+
#### ✨ 新規ユーザーをフォローする
150+
151+
```python
152+
import yaylib
153+
154+
client = yaylib.Client()
155+
client.login(email="your_email", password="your_password")
156+
157+
new_users = client.search_users(recently_created=True)
158+
159+
for new_user in new_users.users:
160+
client.follow_user(new_user.id)
161+
```
162+
163+
#### ✨ リアルタイムでチャットを取得する
164+
165+
```python
166+
import yaylib
167+
from yaylib import Message
168+
169+
class MyBot(yaylib.Client):
170+
def on_ready(self):
171+
print("ボットがオンラインになりました!")
172+
173+
def on_chat_request(self, total_count):
174+
# チャットリクエストはすべて承認する
175+
chat_requests = self.get_chat_requests()
176+
for chat_room in chat_requests.chat_rooms:
177+
self.accept_chat_requests([chat_room.id])
178+
179+
# 最新のメッセージをon_message_create関数に送信
180+
message = self.get_messages(chat_requests.chat_rooms[0].id)
181+
self.on_message_create(message[0])
182+
183+
def on_message_create(self, message: Message):
184+
# 「ping」というメッセージに対して「pong」と返信する
185+
if message.text == "ping":
186+
self.send_message(message.room_id, text="pong")
187+
188+
def on_chat_room_delete(self, room_id):
189+
print(f"チャットルームが削除されました。ルームID: {room_id}")
190+
191+
intents = yaylib.Intents.none()
192+
intents.chat_message = True
193+
194+
bot = MyBot(intents=intents)
195+
bot.run("your_email", "your_password")
196+
```
197+
198+
より詳しい使用例については、[こちら](https://github.com/ekkx/yaylib/blob/master/examples) を参照してください。
199+
200+
<p align="right">(<a href="#readme-top">トップに戻る</a>)</p>
201+
202+
<!-- yaylib で誕生したボットの一覧 -->
203+
204+
## :crown: yaylib で誕生したロボットたち
205+
206+
「yaylib」を用いて開発したロボットがある場合は、ぜひ教えてください!
207+
208+
<table align="center">
209+
<thead>
210+
<tr>
211+
<th><a href="https://yay.space/user/5855987">MindReader AI</a></th>
212+
<th><a href="https://yay.space/user/7874560">☀️気象くん☁️</a></th>
213+
<th><a href="https://yay.space/user/7406336">GIGAZINE</a></th>
214+
</tr>
215+
</thead>
216+
<tbody>
217+
<tr>
218+
<td align="center">
219+
<img src="https://github.com/ekkx/yaylib/assets/77382767/cc41ce3c-0e11-4ec5-be99-ff7090a95667" width="200px">
220+
<br />
221+
<p>開発者: <a href="https://yay.space/user/35152">毛の可能性</a></p>
222+
</td>
223+
<td align="center">
224+
<img src="https://github.com/ekkx/yaylib/assets/77382767/4fd728a0-9b3a-427f-ac1f-70e6d6538564" width="200px">
225+
<br />
226+
<p>開発者: <a href="https://yay.space/user/7520368">tori</a></p>
227+
</td>
228+
<td align="center">
229+
<img src="https://github.com/ekkx/yaylib/assets/77382767/65fcb885-4fbe-4170-9378-6f8d9af61ff8" width="200px">
230+
<br />
231+
<p>開発者: <a href="https://yay.space/user/1298298">ぺゅー</a></p>
232+
</td>
233+
</tr>
234+
</tbody>
235+
</table>
236+
237+
<!-- 免責事項 -->
238+
239+
## 免責事項
240+
241+
yaylib は、API の公式なサポートやメンテナンスを提供するものではありません。このクライアントを使用する場合、**利用者はリスクや責任を自己負担できるもの**とします。このクライアントによって提供される情報やデータの正確性、信頼性、完全性、適時性について、いかなる保証も行いません。また、このクライアントの使用によって生じた損害や不利益について、一切の責任を負いかねます。利用者は自己の責任において、このクライアントを使用し、API にアクセスするものとします。なお、この免責事項は予告なく変更される場合があります。
242+
243+
<!-- ライセンス -->
244+
245+
## ライセンス
246+
247+
<p align="center">
248+
<a href="https://github.com/ekkx">
249+
<img src="https://github.com/ekkx/yaylib/assets/77382767/5d6aef18-5d98-4c9b-9f54-791308b393af" width="256" height="256">
250+
</a>
251+
</p>
252+
253+
<p align="center">
254+
<strong>MIT © <a href="https://github.com/ekkx">ekkx</a></strong>
255+
</p>
256+
257+
フルライセンスは [こちら](https://github.com/ekkx/yaylib/blob/master/LICENSE) からご確認いただけます。
258+
このプロジェクトは、 **【MIT ライセンス】** の条件の下でライセンスされています。
259+
260+
<p align="right">(<a href="#readme-top">トップに戻る</a>)</p>

0 commit comments

Comments
 (0)