-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
44 lines (36 loc) · 1.09 KB
/
index.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
import { Promise } from 'es6-promise';
interface SoundCloud {
initialize(options: SoundCloud.InitializeOptions): void;
connect(options?: SoundCloud.ConnectOptions): Promise<any>;
get(path: string, params?: any): Promise<any>;
post(path: string, params?: any): Promise<any>;
put(path: string, params?: any): Promise<any>;
delete(path: string): Promise<any>;
upload(options: any): Promise<any>;
resolve(url: string): Promise<any>;
oEmbed(url: string, params?: any): Promise<any>;
stream(trackPath: string, secretToken?: string): Promise<SoundCloud.Player>;
}
declare namespace SoundCloud {
interface InitializeOptions {
client_id: string;
redirect_uri?: string;
oauth_token?: string;
}
interface ConnectOptions {
client_id: string;
redirect_uri: string;
scope?: string;
}
interface Player {
play(): void;
pause(): void;
seek(time: number): void;
currentTime(): number;
setVolume(volume: number): void;
getVolume(): number;
on(event: string, handler: any): void;
}
}
declare let SoundCloud: SoundCloud;
export = SoundCloud;