2019-04-24 01:07:20 +09:00
|
|
|
import {
|
2019-04-24 03:40:04 +09:00
|
|
|
ipcMain
|
2019-04-24 01:07:20 +09:00
|
|
|
} from 'electron'
|
|
|
|
import Mastodon, { Status, Response } from 'megalodon'
|
2019-04-24 03:40:04 +09:00
|
|
|
|
2019-04-24 03:58:06 +09:00
|
|
|
import Client from './Client'
|
|
|
|
|
2019-04-24 01:07:20 +09:00
|
|
|
export default class Timeline {
|
2019-04-24 03:40:04 +09:00
|
|
|
public static ready() {
|
|
|
|
ipcMain.on('no-auth-streaming', (event: Event, instance: string) => {
|
2019-04-24 03:58:06 +09:00
|
|
|
const client = Client.getNoAuthClient(instance)
|
2019-04-24 03:40:04 +09:00
|
|
|
|
|
|
|
client.get<[Status]>('/timelines/public?local=true')
|
|
|
|
.then((resp: Response<[Status]>) => {
|
|
|
|
console.log(resp.data)
|
|
|
|
})
|
|
|
|
})
|
2019-04-24 01:07:20 +09:00
|
|
|
}
|
|
|
|
}
|