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. [nodtext]https://pawoo.net/web/accounts/$ID_NUMBER[/nodtext], 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:
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
[table]
[tbody]
[tr]
[td]URL[/td]
[td][nodtext]https://pawoo.net/api/v1/accounts/$ID[/nodtext][/td]
[/tr]
[tr]
[td]Method[/td]
[td][nodtext]GET[/nodtext][/td]
[/tr]
[/tbody]
[/table]
Note:$ID is the account ID.
Account toots
[table]
[tbody]
[tr]
[td]URL[/td]
[td][nodtext]https://pawoo.net/api/v1/accounts/$ID/statuses[/nodtext][/td]
[/tr]
[tr]
[td]Method[/td]
[td][nodtext]GET[/nodtext][/td]
[/tr]
[/tbody]
[/table]
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
[table]
[tbody]
[tr]
[td]URL[/td]
[td][nodtext]https://pawoo.net/api/v1/statuses/$ID[/nodtext][/td]
[/tr]
[tr]
[td]Method[/td]
[td][nodtext]GET[/nodtext][/td]
[/tr]
[/tbody]
[/table]
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": "(自称)イラストレーター
絵→ #eight08
Twitter→ https://twitter.com/eight_tohyama
",
"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": "
お題箱できたやつ
#eight08 #illustration #illust #eroe #イラスト #艦隊これくしょん #艦これ #グラーフ #加賀 https://pawoo.net/media/ODiNKJw47CDK15bzo5M https://pawoo.net/media/e7eBZSHxCfEj4GLBhwA
",
"url": "https://pawoo.net/@eight_tohyama/18578619",
"reblogs_count": 46,
"favourites_count": 110,
"pixiv_cards": [
],
"pinned": false,
"reblog": null
}