api/commits/:projectname/:pageid
https://scrapbox.io/api/commits/:projectname/:pageid
直近のcommitしか取得できない
最終更新日からしばらく経つと消える
parameters
head
ここに指定したcommit IDより後ろのcommitのみを返す
応答の型
code:ts
type CommitsResponse = { // loginしていなかったとき
name: 'NotLoggedInError';
message: 'You are not logged in yet.';
statusCode: 401;
details: {
};
} | { // loginしていたとき
commits: {
id: string; // commit id
kind: 'page'; // 詳細不明
changes: ( // 変更内容
{
_update: string; // 更新した行のid
lines: {
origText: string; // 変更前の文字列
text: string; // 変更後の文字列
};
} |
{
_insert: string; // このidの示す行の上に挿入する。ページ末尾に挿入するときは _end が入る
lines: {
id: string; // 新しく挿入した行のid
text: string; // 挿入した文字列
};
} |
{
_delete: string; // 削除された行のid
lines: {
origText: string; // 削除された文字列
};
} |
// 更新されたタイトル情報
{
title: string;
titleLc: string;
} |
{descriptions: string[];} | // 更新されたページのサムネイル用説明文
// 更新されたリンク情報
{
links: string[];
linksLc: string[];
}
)[];
parentId: string; // 直前のcommit id
pageId: string; // 変更するpageのid
userId: string; // 変更したuserのid
created: number; // 変更日時
}[];
};