help:pawoo api
For up to date details on the Pawoo API, see https://github.com/pixiv/mastodon.
Set up a Pawoo account
To access the API on Pawoo, you must have a Pawoo account. See Howto:Pawoo for details.
Get an access token
Perform a GET using your credentials to any Pawoo /web url, e.g. https://pawoo.net/web/accounts/$ID_NUMBER, where $ID_NUMBER is the account ID. This can even be your own account ID.
Scrape the HTML for the JSON. This can be done using the following regex:
<script id=\'initial-state\' type=\'application/json\'>(.+?)</script>
After importing the JSON, grab the access token using the ['meta']['access_token']
key.
Queries
Pawoo posts, which are equivalent to Twitter tweets, are called toots below.
Account
Account Information
URL | https://pawoo.net/api/v1/accounts/$ID |
Method | GET |
Note:$ID is the account ID.
Account toots
URL | https://pawoo.net/api/v1/accounts/$ID/statuses |
Method | GET |
Note:$ID is the account ID.
- Parameters:
- max_id: Largest ID allowed
- since_id: Lowest ID allowed
- only_media: 1 for true, 0 for false
- exclude_replies: 1 for true, 0 for false
Toots
Toot information
URL | https://pawoo.net/api/v1/statuses/$ID |
Method | GET |
Note:$ID is the toot ID.
Sample Response
{ "id": 18578619, "created_at": "2017-06-07T13:24:27.125Z", "in_reply_to_id": null, "in_reply_to_account_id": null, "sensitive": true, "spoiler_text": "バニーグラ子&加賀さん", "visibility": "public", "language": "ja", "application": { "name": "Web", "website": null }, "account": { "id": 54155, "username": "eight_tohyama", "acct": "eight_tohyama", "display_name": "東山エイト:hearts: :underage: ", "locked": false, "created_at": "2017-04-16T05:56:14.484Z", "followers_count": 1528, "following_count": 290, "statuses_count": 532, "oauth_authentications": [ { "uid": "9611647", "provider": "pixiv" } ], "note": "<p>(自称)イラストレーター<br />絵→ <a href=\"https://pawoo.net/tags/eight08\" class=\"mention hashtag\" rel=\"tag\">#<span>eight08</span></a><br />Twitter→ <a href=\"https://twitter.com/eight_tohyama\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"\">twitter.com/eight_tohyama</span><span class=\"invisible\"></span></a></p>", "url": "https://pawoo.net/@eight_tohyama", "avatar": "https://img.pawoo.net/accounts/avatars/000/054/155/original/8e0c4721cebc9a89.png", "avatar_static": "https://img.pawoo.net/accounts/avatars/000/054/155/original/8e0c4721cebc9a89.png", "header": "https://img.pawoo.net/accounts/headers/000/054/155/original/9b228ea494f2a89a.jpg", "header_static": "https://img.pawoo.net/accounts/headers/000/054/155/original/9b228ea494f2a89a.jpg" }, "media_attachments": [ { "id": 1244304, "remote_url": "", "type": "image", "url": "https://img.pawoo.net/media_attachments/files/001/244/304/original/677730943e203d60.jpg", "preview_url": "https://img.pawoo.net/media_attachments/files/001/244/304/small/677730943e203d60.jpg", "text_url": "https://pawoo.net/media/ODiNKJw47CDK15bzo5M", "meta": { "original": { "width": 825, "height": 1280, "size": "825x1280", "aspect": 0.64453125 }, "small": { "width": 258, "height": 400, "size": "258x400", "aspect": 0.645 } } }, { "id": 1244305, "remote_url": "", "type": "image", "url": "https://img.pawoo.net/media_attachments/files/001/244/305/original/95fb3eb2a473cdac.jpg", "preview_url": "https://img.pawoo.net/media_attachments/files/001/244/305/small/95fb3eb2a473cdac.jpg", "text_url": "https://pawoo.net/media/e7eBZSHxCfEj4GLBhwA", "meta": { "original": { "width": 825, "height": 1280, "size": "825x1280", "aspect": 0.64453125 }, "small": { "width": 258, "height": 400, "size": "258x400", "aspect": 0.645 } } } ], "mentions": [ ], "tags": [ { "name": "加賀", "url": "https://pawoo.net/tags/%E5%8A%A0%E8%B3%80" }, { "name": "グラーフ", "url": "https://pawoo.net/tags/%E3%82%B0%E3%83%A9%E3%83%BC%E3%83%95" }, { "name": "艦これ", "url": "https://pawoo.net/tags/%E8%89%A6%E3%81%93%E3%82%8C" }, { "name": "艦隊これくしょん", "url": "https://pawoo.net/tags/%E8%89%A6%E9%9A%8A%E3%81%93%E3%82%8C%E3%81%8F%E3%81%97%E3%82%87%E3%82%93" }, { "name": "イラスト", "url": "https://pawoo.net/tags/%E3%82%A4%E3%83%A9%E3%82%B9%E3%83%88" }, { "name": "eroe", "url": "https://pawoo.net/tags/eroe" }, { "name": "illust", "url": "https://pawoo.net/tags/illust" }, { "name": "illustration", "url": "https://pawoo.net/tags/illustration" }, { "name": "eight08", "url": "https://pawoo.net/tags/eight08" } ], "uri": "tag:pawoo.net,2017-06-07:objectId=18578619:objectType=Status", "content": "<p>お題箱できたやつ<br /><a href=\"https://pawoo.net/tags/eight08\" class=\"mention hashtag\" rel=\"tag\">#<span>eight08</span></a> <a href=\"https://pawoo.net/tags/illustration\" class=\"mention hashtag\" rel=\"tag\">#<span>illustration</span></a> <a href=\"https://pawoo.net/tags/illust\" class=\"mention hashtag\" rel=\"tag\">#<span>illust</span></a> <a href=\"https://pawoo.net/tags/eroe\" class=\"mention hashtag\" rel=\"tag\">#<span>eroe</span></a> <a href=\"https://pawoo.net/tags/%E3%82%A4%E3%83%A9%E3%82%B9%E3%83%88\" class=\"mention hashtag\" rel=\"tag\">#<span>イラスト</span></a> <a href=\"https://pawoo.net/tags/%E8%89%A6%E9%9A%8A%E3%81%93%E3%82%8C%E3%81%8F%E3%81%97%E3%82%87%E3%82%93\" class=\"mention hashtag\" rel=\"tag\">#<span>艦隊これくしょん</span></a> <a href=\"https://pawoo.net/tags/%E8%89%A6%E3%81%93%E3%82%8C\" class=\"mention hashtag\" rel=\"tag\">#<span>艦これ</span></a> <a href=\"https://pawoo.net/tags/%E3%82%B0%E3%83%A9%E3%83%BC%E3%83%95\" class=\"mention hashtag\" rel=\"tag\">#<span>グラーフ</span></a> <a href=\"https://pawoo.net/tags/%E5%8A%A0%E8%B3%80\" class=\"mention hashtag\" rel=\"tag\">#<span>加賀</span></a> <a href=\"https://pawoo.net/media/ODiNKJw47CDK15bzo5M\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">pawoo.net/media/ODiNKJw47CDK15</span><span class=\"invisible\">bzo5M</span></a> <a href=\"https://pawoo.net/media/e7eBZSHxCfEj4GLBhwA\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">pawoo.net/media/e7eBZSHxCfEj4G</span><span class=\"invisible\">LBhwA</span></a></p>", "url": "https://pawoo.net/@eight_tohyama/18578619", "reblogs_count": 46, "favourites_count": 110, "pixiv_cards": [ ], "pinned": false, "reblog": null }