Add stub status history endpoint
This commit is contained in:
parent
6973d24172
commit
30d6ae45f3
23
megalodon/src/entities/status_edit.ts
Normal file
23
megalodon/src/entities/status_edit.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="account.ts" />
|
||||
/// <reference path="application.ts" />
|
||||
/// <reference path="mention.ts" />
|
||||
/// <reference path="tag.ts" />
|
||||
/// <reference path="attachment.ts" />
|
||||
/// <reference path="emoji.ts" />
|
||||
/// <reference path="card.ts" />
|
||||
/// <reference path="poll.ts" />
|
||||
/// <reference path="reaction.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type StatusEdit = {
|
||||
account: Account
|
||||
content: string
|
||||
plain_content: string | null
|
||||
created_at: string
|
||||
emojis: Emoji[]
|
||||
sensitive: boolean
|
||||
spoiler_text: string
|
||||
media_attachments: Array<Attachment>
|
||||
poll: Poll | null
|
||||
}
|
||||
}
|
|
@ -695,6 +695,14 @@ export interface MegalodonInterface {
|
|||
* @return Context
|
||||
*/
|
||||
getStatusContext(id: string, options?: { limit?: number; max_id?: string; since_id?: string }): Promise<Response<Entity.Context>>
|
||||
/**
|
||||
* GET /api/v1/statuses/:id/history
|
||||
*
|
||||
* Get status edit history.
|
||||
* @param id The target status id.
|
||||
* @return StatusEdit
|
||||
*/
|
||||
getStatusHistory(id: string): Promise<Response<Array<Entity.StatusEdit>>>
|
||||
/**
|
||||
* GET /api/v1/statuses/:id/reblogged_by
|
||||
*
|
||||
|
|
|
@ -1325,6 +1325,17 @@ export default class Misskey implements MegalodonInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
public async getStatusHistory(): Promise<Response<Array<Entity.StatusEdit>>> {
|
||||
const history : Entity.StatusEdit[] = [];
|
||||
const res : Response = {
|
||||
headers: undefined,
|
||||
statusText: "",
|
||||
status: 200,
|
||||
data: history
|
||||
};
|
||||
return new Promise(resolve => resolve(res))
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* POST /api/notes/renotes
|
||||
|
|
Loading…
Reference in a new issue