2019-11-28 11:04:05 +00:00
|
|
|
export async function changeStatusScope(id, sensitive, visibility, authHost, token) {
|
|
|
|
return Promise.resolve()
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function deleteStatus(id, authHost, token) {
|
|
|
|
return Promise.resolve()
|
|
|
|
}
|
2020-05-11 18:20:52 +00:00
|
|
|
|
2020-05-24 18:14:58 +00:00
|
|
|
export async function fetchStatus(id, authHost, token) {
|
|
|
|
const data = {
|
|
|
|
account: {
|
|
|
|
id: '9n1bySks25olxWrku0',
|
|
|
|
avatar: 'http://localhost:4000/images/avi.png',
|
2020-06-06 21:37:28 +00:00
|
|
|
nickname: 'dolin',
|
2020-08-02 17:20:27 +00:00
|
|
|
tags: ['mrf_tag:media-strip', 'mrf_tag:sandbox', 'mrf_tag:disable-any-subscription', 'mrf_tag:media-force-nsfw'],
|
2020-05-24 18:14:58 +00:00
|
|
|
url: 'http://localhost:4000/users/dolin'
|
|
|
|
},
|
|
|
|
content: 'pizza makes everything better',
|
|
|
|
created_at: '2020-05-22T17:34:34.000Z',
|
|
|
|
id: '9vJOO3iFPyjNaEhJ5s',
|
|
|
|
media_attachments: [],
|
|
|
|
poll: null,
|
|
|
|
sensitive: false,
|
|
|
|
spoiler_text: '',
|
|
|
|
visibility: 'public',
|
|
|
|
url: 'http://localhost:4000/notice/9vJOO3iFPyjNaEhJ5s'
|
|
|
|
}
|
|
|
|
|
|
|
|
return Promise.resolve({ data })
|
|
|
|
}
|
|
|
|
|
2020-05-12 19:43:15 +00:00
|
|
|
export async function fetchStatusesByInstance({ instance, authHost, token, pageSize, page }) {
|
2020-05-12 22:45:34 +00:00
|
|
|
let data
|
|
|
|
if (pageSize === 1) {
|
|
|
|
data = page === 1 || page === 2
|
|
|
|
? [{
|
|
|
|
'account': {
|
|
|
|
'avatar': 'http://localhost:4000/images/avi.png',
|
2020-06-06 19:33:08 +00:00
|
|
|
'nickname': 'sky',
|
2020-05-12 22:45:34 +00:00
|
|
|
'url': 'http://localhost:4000/users/sky'
|
|
|
|
},
|
|
|
|
'content': 'A nice young couple contacted us from Brazil to decorate their newly acquired apartment.',
|
|
|
|
'created_at': '2020-01-31T18:20:01.000Z',
|
|
|
|
'id': '9rZIr0Jzao5Gjgfmro',
|
|
|
|
'sensitive': false,
|
|
|
|
'url': 'http://localhost:4000/objects/7af9abbd-fb6c-4318-aeb7-6636c138ac98',
|
|
|
|
'visibility': 'unlisted'
|
|
|
|
}]
|
|
|
|
: []
|
|
|
|
} else {
|
|
|
|
data = [
|
|
|
|
{
|
|
|
|
'account': {
|
|
|
|
'avatar': 'http://localhost:4000/images/avi.png',
|
2020-06-06 19:33:08 +00:00
|
|
|
'nickname': 'sky',
|
2020-05-12 22:45:34 +00:00
|
|
|
'url': 'http://localhost:4000/users/sky'
|
|
|
|
},
|
2020-08-23 21:31:38 +00:00
|
|
|
'content': 'i love parks&rec',
|
|
|
|
'created_at': '2020-04-12T18:20:01.000Z',
|
|
|
|
'id': 'o5Gjgfmro9rZIr0Jza',
|
2020-05-12 22:45:34 +00:00
|
|
|
'sensitive': false,
|
2020-08-23 21:31:38 +00:00
|
|
|
'url': 'http://localhost:4000/objects/7af9abbd-aeb7-6636c138ac98-fb6c-4318',
|
2020-05-12 22:45:34 +00:00
|
|
|
'visibility': 'unlisted'
|
2020-05-12 19:43:15 +00:00
|
|
|
},
|
2020-05-12 22:45:34 +00:00
|
|
|
{
|
|
|
|
'account': {
|
|
|
|
'avatar': 'http://localhost:4000/images/avi.png',
|
2020-06-06 19:33:08 +00:00
|
|
|
'nickname': 'sky',
|
2020-05-12 22:45:34 +00:00
|
|
|
'url': 'http://localhost:4000/users/sky'
|
|
|
|
},
|
|
|
|
'content': 'the happiest man ever',
|
|
|
|
'created_at': '2019-11-23T12:56:18.000Z',
|
|
|
|
'id': '9pFoVfWMU3A96Rzq3k',
|
|
|
|
'sensitive': false,
|
|
|
|
'url': 'http://localhost:4000/objects/449c90fe-c457-4c64-baf2-fe6d0a59ca25',
|
|
|
|
'visibility': 'unlisted'
|
|
|
|
}]
|
|
|
|
}
|
2020-05-12 19:43:15 +00:00
|
|
|
return Promise.resolve({ data })
|
|
|
|
}
|
|
|
|
|
2020-05-11 18:20:52 +00:00
|
|
|
export async function fetchStatusesCount(instance, authHost, token) {
|
2020-05-12 19:43:15 +00:00
|
|
|
const data = instance === 'heaven.com'
|
|
|
|
? {
|
|
|
|
'status_visibility':
|
|
|
|
{ 'direct': 1, 'private': 2, 'public': 3, 'unlisted': 0 }
|
|
|
|
}
|
|
|
|
: {
|
|
|
|
'status_visibility':
|
2020-05-11 18:20:52 +00:00
|
|
|
{ 'direct': 4, 'private': 10, 'public': 4, 'unlisted': 10 }
|
2020-05-12 19:43:15 +00:00
|
|
|
}
|
2020-05-11 18:20:52 +00:00
|
|
|
return Promise.resolve({ data })
|
|
|
|
}
|