forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
google.feed.api.d.ts
80 lines (71 loc) · 1.73 KB
/
google.feed.api.d.ts
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
78
79
80
// Type definitions for Google Feed Apis
// Project: https://developers.google.com/feed/
// Definitions by: RodneyJT <https://github.com/RodneyJT>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module google.feeds {
export class Feed {
constructor();
constructor(url: string);
findFeeds(query?: string, callback?: (result: findResult) => void ): void;
getElementsByTagNameNS(node: string, ns: string, localName: string): any[];
includeHistoricalEntries(): void;
load(callback?: (result: feedResult) => void ): void;
setNumEntries(num: number): void;
setResultFormat(format: string): void;
}
}
interface feedResult {
error?: feedError;
xmlDocument?: string;
feed: feedJSON;
}
interface findResult {
error?: feedError;
xmlDocument?: string;
findEntries: findEntry[];
}
interface feedError {
code: string;
message: string;
}
interface feedJSON {
feedURL: string;
link: string;
author: string;
description: string;
entries: feedEntry[];
}
interface feedEntry {
mediaGroup: MediaGroup[];
title: string;
link: string;
content: string;
contentSnippet: string;
publishedDate: string;
categories: string[];
}
interface findEntry {
title: string;
link: string;
contentSnippet: string;
url: string;
}
interface MediaGroup {
content: MediaContent[];
}
interface MediaContent {
url: string;
fileSize: number;
type: string;
medium: string;
isDefault: boolean;
expression: string;
bitrate: number;
framerate: number;
samplingrate: number;
channels: string;
duration: number;
height: number;
width: number;
lang: string;
}