-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathapi.ts
More file actions
77 lines (76 loc) · 1.61 KB
/
Copy pathapi.ts
File metadata and controls
77 lines (76 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// This file contains the types of the issue returned from the API
import type { Language } from 'prism-react-renderer';
export interface IssueAPIResponse {
id: number;
date: string;
title: string;
description: string;
imgURL: string;
tip_of_the_week: TipOfTheWeek;
dev_of_the_week: DevOfTheWeek;
gif: Gif;
quiz: Quiz;
articles: ArticlesEntityOrTalksEntity[];
tools: ToolsEntity[];
talks: ArticlesEntityOrTalksEntity[];
}
export interface TipOfTheWeek {
description: string;
sourceName: string;
sourceURL: string;
title: string;
issue: number;
codeSnippet?: CodeSnippet;
}
export interface CodeSnippet {
code: { code: string };
language: Language;
showLineNumbers: boolean;
}
export interface DevOfTheWeek {
name: string;
profileImg: string;
bio: string;
website?: string | null;
twitter?: string | null;
github?: string | null;
youtube?: string | null;
linkedin?: string | null;
instagram?: string | null;
}
export interface Gif {
gifURL: string;
caption: string;
}
export interface Quiz {
id: number;
question: string;
answerId: number;
issue: number;
options: OptionEntity[];
codeSnippet: CodeSnippet;
}
export interface OptionEntity {
id: number;
text: string;
description: string;
option_id: number;
}
export interface ArticlesEntityOrTalksEntity {
id: number;
title: string;
url: string;
description: string;
issue: number;
tags: Array<string>;
authors: Array<string>;
}
export interface ToolsEntity {
id: number;
name: string;
url: string;
logo?: string | null;
description: string;
authors: Array<string>;
tags: Array<string>;
}