Add author to the result
This commit is contained in:
parent
95afc76a5c
commit
0b9013a779
4 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
export default interface IFetchResult {
|
export default interface IFetchResult {
|
||||||
data: {
|
data: {
|
||||||
archived: boolean,
|
archived: boolean,
|
||||||
|
author: string,
|
||||||
downs: number,
|
downs: number,
|
||||||
hidden: boolean,
|
hidden: boolean,
|
||||||
permalink: string,
|
permalink: string,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export default interface IRedditResult {
|
export default interface IRedditResult {
|
||||||
Archived: boolean,
|
Archived: boolean,
|
||||||
|
Author: string,
|
||||||
Downs: number,
|
Downs: number,
|
||||||
Hidden: boolean,
|
Hidden: boolean,
|
||||||
Permalink: string,
|
Permalink: string,
|
||||||
|
|
|
@ -12,6 +12,7 @@ export default class OutputHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
outputLines.push(`Archived = ${result.Archived}`);
|
outputLines.push(`Archived = ${result.Archived}`);
|
||||||
|
outputLines.push(`Author = ${result.Author}`);
|
||||||
outputLines.push(`Downvotes = ${result.Downs}`);
|
outputLines.push(`Downvotes = ${result.Downs}`);
|
||||||
outputLines.push(`Hidden = ${result.Hidden}`);
|
outputLines.push(`Hidden = ${result.Hidden}`);
|
||||||
outputLines.push(`Permalink = ${result.Permalink}`);
|
outputLines.push(`Permalink = ${result.Permalink}`);
|
||||||
|
|
|
@ -118,6 +118,7 @@ export default async function randomBunny(subreddit: string, sortBy: "new" | "ho
|
||||||
}
|
}
|
||||||
|
|
||||||
const redditResult: IRedditResult = {
|
const redditResult: IRedditResult = {
|
||||||
|
Author: randomData['author'],
|
||||||
Archived: randomData['archived'],
|
Archived: randomData['archived'],
|
||||||
Downs: randomData['downs'],
|
Downs: randomData['downs'],
|
||||||
Hidden: randomData['hidden'],
|
Hidden: randomData['hidden'],
|
||||||
|
|
Loading…
Reference in a new issue