|
|
27行目: |
27行目: |
| * [https://github.com/bluesky-social/social-app bluesky-social/social-app: The Bluesky Social application for Web, iOS, and Android] | | * [https://github.com/bluesky-social/social-app bluesky-social/social-app: The Bluesky Social application for Web, iOS, and Android] |
| * [https://bsky.app/profile/martin.kleppmann.com Martin Kleppmann (@martin.kleppmann.com) — Bluesky]: Blueskyの技術顧問 (https://bsky.app/profile/bsky.app/post/3kkqwoy7jfc2u<nowiki/>)。 | | * [https://bsky.app/profile/martin.kleppmann.com Martin Kleppmann (@martin.kleppmann.com) — Bluesky]: Blueskyの技術顧問 (https://bsky.app/profile/bsky.app/post/3kkqwoy7jfc2u<nowiki/>)。 |
| | |
| | === API === |
| | |
| | ==== Post ==== |
| | |
| | <html> |
| | <blockquote xmlns="http://www.w3.org/1999/xhtml" style="background:rgb(99,100,255);background-image:linear-gradient(hsla(0,0%,100%,0.5),hsla(0,0%,100%,0.5))"><article><header style="display:flex;line-height:1.5"><img xmlns="http://www.w3.org/1999/xhtml" referrerpolicy="no-referrer" alt="avatar" src="//files.mastodon.social/accounts/avatars/000/499/471/original/45859ab4954ff83f.png" style="height:4.5em" /><div><div><a href="https://mastodon.social/@antungame/111911610974278904">2024-02-11T07:14:25.502Z</a></div><div>Antun|<a href="https://mastodon.social/@antungame">antungame@mastodon.social</a></div></div></header><main><p>BlueSkyで最小限の手間で自動投稿までメモ。<br />1. アカウントを作成<br />2. 自分の設定の「ハンドルを変更」→「自分のドメインを持っています」でDID(did:plc:ほにゃらら)を取得<br />3. ブラウザのコンソールとかでトークン取得(良い方法見つからなかった)<br />4. curl -X POST '<a href="https://bsky.social/xrpc/com.atproto.repo.createRecord" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">bsky.social/xrpc/com.atproto.r</span><span class="invisible">epo.createRecord</span></a>' -H 'Content-Type: application/json' -H 'Authorization: Bearer アクセストークン' -d '{ "repo": "did:plc:ほにゃらら", "collection": "app.bsky.feed.post", "record": { "text": "Hello", "createdAt": "'`date +%Y-%m-%dT%H:%M:%SZ`'" } }'</p></main></article></blockquote> |
| | <blockquote xmlns="http://www.w3.org/1999/xhtml" style="background:rgb(99,100,255);background-image:linear-gradient(hsla(0,0%,100%,0.5),hsla(0,0%,100%,0.5))"><article><header style="display:flex;line-height:1.5"><img xmlns="http://www.w3.org/1999/xhtml" referrerpolicy="no-referrer" alt="avatar" src="//files.mastodon.social/accounts/avatars/000/499/471/original/45859ab4954ff83f.png" style="height:4.5em" /><div><div><a href="https://mastodon.social/@antungame/111911633408245604">2024-02-11T07:20:07.815Z</a></div><div>Antun|<a href="https://mastodon.social/@antungame">antungame@mastodon.social</a></div><div><a href="https://mastodon.social/@antungame/111911610974278904">replying to</a> |
| | Antun|<a href="https://mastodon.social/@antungame">antungame@mastodon.social</a></div></div></header><main><p>DIDは <a href="https://bsky.social/xrpc/com.atproto.identity.resolveHandle?handle=自分のアカウント名" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">bsky.social/xrpc/com.atproto.i</span><span class="invisible">dentity.resolveHandle?handle=自分のアカウント名</span></a> で見た方が楽かも。</p><p>createdAtはミリ秒まで渡した方が良いし、トークンはいつまで使い回せるか分からないのでちゃんとAPI(<a href="https://bsky.social/xrpc/com.atproto.server.createSession" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">bsky.social/xrpc/com.atproto.s</span><span class="invisible">erver.createSession</span></a>)を叩いて取って来た方が良い。</p><p>ただこれでざっとした流れが分かるし、何で検索したら良いか分かるのでそのためのメモです。</p></main></article></blockquote> |
| | |
| | </html> |