javascript-ampache 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.m.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -7
- package/src/albums.js +106 -0
- package/src/artists.js +105 -0
- package/src/auth.js +142 -0
- package/src/base.js +145 -0
- package/src/bookmarks.js +106 -0
- package/src/catalogs.js +133 -0
- package/src/genres.js +57 -0
- package/src/index.js +30 -0
- package/src/labels.js +53 -0
- package/src/licenses.js +47 -0
- package/src/live-streams.js +97 -0
- package/src/playlists.js +241 -0
- package/src/podcasts.js +230 -0
- package/src/preferences.js +114 -0
- package/src/shares.js +99 -0
- package/src/shouts.js +24 -0
- package/src/songs.js +273 -0
- package/src/system.js +510 -0
- package/src/users.js +224 -0
- package/src/{utils.ts → utils.js} +16 -16
- package/src/videos.js +84 -0
- package/dist/albums/index.d.ts +0 -64
- package/dist/albums/types.d.ts +0 -37
- package/dist/artists/index.d.ts +0 -64
- package/dist/artists/types.d.ts +0 -35
- package/dist/auth/index.d.ts +0 -56
- package/dist/auth/types.d.ts +0 -32
- package/dist/base.d.ts +0 -47
- package/dist/bookmarks/index.d.ts +0 -91
- package/dist/bookmarks/types.d.ts +0 -13
- package/dist/catalogs/index.d.ts +0 -87
- package/dist/catalogs/types.d.ts +0 -19
- package/dist/genres/index.d.ts +0 -28
- package/dist/genres/types.d.ts +0 -22
- package/dist/index.d.ts +0 -24
- package/dist/labels/index.d.ts +0 -32
- package/dist/labels/types.d.ts +0 -18
- package/dist/licenses/index.d.ts +0 -32
- package/dist/licenses/types.d.ts +0 -12
- package/dist/live-streams/index.d.ts +0 -80
- package/dist/live-streams/types.d.ts +0 -14
- package/dist/playlists/index.d.ts +0 -208
- package/dist/playlists/types.d.ts +0 -26
- package/dist/podcasts/index.d.ts +0 -121
- package/dist/podcasts/types.d.ts +0 -79
- package/dist/preferences/index.d.ts +0 -80
- package/dist/preferences/types.d.ts +0 -18
- package/dist/shares/index.d.ts +0 -69
- package/dist/shares/types.d.ts +0 -23
- package/dist/shouts/index.d.ts +0 -17
- package/dist/shouts/types.d.ts +0 -10
- package/dist/songs/index.d.ts +0 -146
- package/dist/songs/types.d.ts +0 -73
- package/dist/system/index.d.ts +0 -419
- package/dist/system/types.d.ts +0 -31
- package/dist/users/index.d.ts +0 -190
- package/dist/users/types.d.ts +0 -34
- package/dist/utils.d.ts +0 -4
- package/dist/videos/index.d.ts +0 -33
- package/dist/videos/types.d.ts +0 -38
- package/src/albums/index.ts +0 -88
- package/src/albums/types.ts +0 -40
- package/src/artists/index.ts +0 -88
- package/src/artists/types.ts +0 -38
- package/src/auth/index.ts +0 -118
- package/src/auth/types.ts +0 -32
- package/src/base.ts +0 -133
- package/src/bookmarks/index.ts +0 -116
- package/src/bookmarks/types.ts +0 -15
- package/src/catalogs/index.ts +0 -130
- package/src/catalogs/types.ts +0 -27
- package/src/genres/index.ts +0 -39
- package/src/genres/types.ts +0 -25
- package/src/index.ts +0 -63
- package/src/labels/index.ts +0 -43
- package/src/labels/types.ts +0 -20
- package/src/licenses/index.ts +0 -43
- package/src/licenses/types.ts +0 -14
- package/src/live-streams/index.ts +0 -104
- package/src/live-streams/types.ts +0 -16
- package/src/playlists/index.ts +0 -284
- package/src/playlists/types.ts +0 -29
- package/src/podcasts/index.ts +0 -174
- package/src/podcasts/types.ts +0 -85
- package/src/preferences/index.ts +0 -114
- package/src/preferences/types.ts +0 -20
- package/src/shares/index.ts +0 -100
- package/src/shares/types.ts +0 -25
- package/src/shouts/index.ts +0 -18
- package/src/shouts/types.ts +0 -11
- package/src/songs/index.ts +0 -221
- package/src/songs/types.ts +0 -77
- package/src/system/index.ts +0 -860
- package/src/system/types.ts +0 -50
- package/src/users/index.ts +0 -227
- package/src/users/types.ts +0 -38
- package/src/videos/index.ts +0 -49
- package/src/videos/types.ts +0 -42
package/dist/base.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
type Config = {
|
|
2
|
-
url: string;
|
|
3
|
-
sessionKey?: string;
|
|
4
|
-
useBearerToken?: boolean;
|
|
5
|
-
debug?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type Success = {
|
|
8
|
-
success: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @param [offset] Return results starting from this index position
|
|
12
|
-
* @param [limit] Maximum number of results to return
|
|
13
|
-
*/
|
|
14
|
-
export type Pagination = {
|
|
15
|
-
offset?: number;
|
|
16
|
-
limit?: number;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @param [offset] Return results starting from this index position
|
|
20
|
-
* @param [limit] Maximum number of results to return
|
|
21
|
-
* @param [cond] Apply additional filters to the browse using ; separated comma string pairs (e.g. 'filter1,value1;filter2,value2')
|
|
22
|
-
* @param [sort] Sort name or comma-separated key pair. (e.g. 'name,order') Default order 'ASC' (e.g. 'name,ASC' == 'name')
|
|
23
|
-
*/
|
|
24
|
-
export type ExtendedPagination = Pagination & {
|
|
25
|
-
cond?: string;
|
|
26
|
-
sort?: string;
|
|
27
|
-
};
|
|
28
|
-
export type BinaryBoolean = 0 | 1;
|
|
29
|
-
export type UID = string | number;
|
|
30
|
-
export declare abstract class Base {
|
|
31
|
-
sessionKey: string;
|
|
32
|
-
url: string;
|
|
33
|
-
version: string;
|
|
34
|
-
useBearerToken: boolean;
|
|
35
|
-
debug: boolean;
|
|
36
|
-
constructor(config: Config);
|
|
37
|
-
protected request<T>(endpoint: string): Promise<T>;
|
|
38
|
-
protected binary<T>(endpoint: string): Promise<Blob>;
|
|
39
|
-
setSessionKey(sessionKey: string): void;
|
|
40
|
-
/**
|
|
41
|
-
* Construct and return a URL
|
|
42
|
-
* @param endpoint
|
|
43
|
-
* @param [params]
|
|
44
|
-
*/
|
|
45
|
-
rawURL(endpoint: string, params?: {}): string;
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { BookmarkResponse, BookmarksResponse } from "./types";
|
|
2
|
-
import { Base, BinaryBoolean, Success, UID } from "../base";
|
|
3
|
-
export declare class Bookmarks extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* Get a single bookmark by bookmark_id
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=6.1.0
|
|
7
|
-
* @param params.filter UID to find
|
|
8
|
-
* @param [params.include] 0,1, if true include the object in the bookmark
|
|
9
|
-
* @see {@link https://ampache.org/api/api-json-methods#bookmark}
|
|
10
|
-
*/
|
|
11
|
-
bookmark(params: {
|
|
12
|
-
filter: UID;
|
|
13
|
-
include?: BinaryBoolean;
|
|
14
|
-
}): Promise<BookmarkResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* Get information about bookmarked media this user is allowed to manage
|
|
17
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
18
|
-
* @param [params.client] filter by the agent/client name
|
|
19
|
-
* @param [params.include] 0,1, if true include the object in the bookmark
|
|
20
|
-
* @see {@link https://ampache.org/api/api-json-methods#bookmarks}
|
|
21
|
-
*/
|
|
22
|
-
bookmarks(params: {
|
|
23
|
-
client?: string;
|
|
24
|
-
include?: BinaryBoolean;
|
|
25
|
-
}): Promise<BookmarksResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Get the bookmark/s from its object_id and object_type.
|
|
28
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
29
|
-
* @param params.filter UID to find
|
|
30
|
-
* @param params.type Object type
|
|
31
|
-
* @param [params.include] 0,1, if true include the object in the bookmark
|
|
32
|
-
* @see {@link https://ampache.org/api/api-json-methods#get_bookmark}
|
|
33
|
-
*/
|
|
34
|
-
getBookmark(params: {
|
|
35
|
-
filter: UID;
|
|
36
|
-
type: "song" | "video" | "podcast_episode";
|
|
37
|
-
include?: BinaryBoolean;
|
|
38
|
-
all?: BinaryBoolean;
|
|
39
|
-
}): Promise<BookmarkResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Create a placeholder for the current media that you can return to later.
|
|
42
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
43
|
-
* @param params.filter UID to find
|
|
44
|
-
* @param params.type Object type
|
|
45
|
-
* @param params.position current track time in seconds
|
|
46
|
-
* @param [params.client] Agent string. (Default: 'AmpacheAPI')
|
|
47
|
-
* @param [params.date] update time (Default: UNIXTIME())
|
|
48
|
-
* @param [params.include] 0,1, if true include the object in the bookmark
|
|
49
|
-
* @see {@link https://ampache.org/api/api-json-methods#bookmark_create}
|
|
50
|
-
*/
|
|
51
|
-
bookmarkCreate(params: {
|
|
52
|
-
filter: UID;
|
|
53
|
-
type: "song" | "video" | "podcast_episode";
|
|
54
|
-
position: number;
|
|
55
|
-
client?: string;
|
|
56
|
-
date?: number;
|
|
57
|
-
include?: BinaryBoolean;
|
|
58
|
-
}): Promise<BookmarkResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* Edit a placeholder for the current media that you can return to later.
|
|
61
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
62
|
-
* @param params.filter UID to find
|
|
63
|
-
* @param params.type Object type
|
|
64
|
-
* @param params.position current track time in seconds
|
|
65
|
-
* @param [params.client] Agent string. (Default: 'AmpacheAPI')
|
|
66
|
-
* @param [params.date] update time (Default: UNIXTIME())
|
|
67
|
-
* @param [params.include] 0,1, if true include the object in the bookmark
|
|
68
|
-
* @see {@link https://ampache.org/api/api-json-methods#bookmark_edit}
|
|
69
|
-
*/
|
|
70
|
-
bookmarkEdit(params: {
|
|
71
|
-
filter: UID;
|
|
72
|
-
type: "song" | "video" | "podcast_episode";
|
|
73
|
-
position: number;
|
|
74
|
-
client?: string;
|
|
75
|
-
date?: number;
|
|
76
|
-
include?: BinaryBoolean;
|
|
77
|
-
}): Promise<BookmarkResponse>;
|
|
78
|
-
/**
|
|
79
|
-
* Delete an existing bookmark. (if it exists)
|
|
80
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
81
|
-
* @param params.filter UID to find
|
|
82
|
-
* @param params.type Object type
|
|
83
|
-
* @param [params.client] Agent string. (Default: 'AmpacheAPI')
|
|
84
|
-
@see {@link https://ampache.org/api/api-json-methods#bookmark_delete}
|
|
85
|
-
*/
|
|
86
|
-
bookmarkDelete(params: {
|
|
87
|
-
filter: UID;
|
|
88
|
-
type: "song" | "video" | "podcast_episode";
|
|
89
|
-
client?: string;
|
|
90
|
-
}): Promise<Success>;
|
|
91
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type BookmarkResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
type: "song" | "video" | "podcast_episode";
|
|
5
|
-
position: number;
|
|
6
|
-
client?: string;
|
|
7
|
-
date?: number;
|
|
8
|
-
};
|
|
9
|
-
export type BookmarksResponse = {
|
|
10
|
-
total_count: number;
|
|
11
|
-
md5: string;
|
|
12
|
-
bookmark: BookmarkResponse[];
|
|
13
|
-
};
|
package/dist/catalogs/index.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { CatalogResponse, CatalogsResponse } from "./types";
|
|
2
|
-
import { Base, ExtendedPagination, Success, UID } from "../base";
|
|
3
|
-
export declare class Catalogs extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This searches the catalogs and returns... catalogs
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
7
|
-
* @param [params.filter] Catalog type
|
|
8
|
-
* @param [params.offset]
|
|
9
|
-
* @param [params.limit]
|
|
10
|
-
* @param [params.cond]
|
|
11
|
-
* @param [params.sort]
|
|
12
|
-
* @see {@link https://ampache.org/api/api-json-methods#catalogs}
|
|
13
|
-
*/
|
|
14
|
-
catalogs(params?: {
|
|
15
|
-
filter?: "music" | "clip" | "tvshow" | "movie" | "personal_video" | "podcast";
|
|
16
|
-
} & ExtendedPagination): Promise<CatalogsResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Return catalog by UID
|
|
19
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
20
|
-
* @param params.filter UID to find
|
|
21
|
-
* @see {@link https://ampache.org/api/api-json-methods#catalog}
|
|
22
|
-
*/
|
|
23
|
-
catalog(params: {
|
|
24
|
-
filter: UID;
|
|
25
|
-
}): Promise<CatalogResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Kick off a catalog update or clean for the selected catalog
|
|
28
|
-
* ACCESS REQUIRED: 75 (Catalog Manager)
|
|
29
|
-
* @remarks MINIMUM_API_VERSION=400001
|
|
30
|
-
* @param params.task add_to_catalog, clean_catalog
|
|
31
|
-
* @param params.catalog UID of catalog
|
|
32
|
-
* @see {@link https://ampache.org/api/api-json-methods#catalog_action}
|
|
33
|
-
*/
|
|
34
|
-
catalogAction(params: {
|
|
35
|
-
task: "add_to_catalog" | "clean_catalog";
|
|
36
|
-
catalog: UID;
|
|
37
|
-
}): Promise<Success>;
|
|
38
|
-
/**
|
|
39
|
-
* Perform actions on local catalog files. Single file versions of catalog add, clean, verify and remove (delete).
|
|
40
|
-
* Make sure you remember to urlencode those file names!
|
|
41
|
-
* ACCESS REQUIRED: 50 (Content Manager)
|
|
42
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
43
|
-
* @param params.file FULL path to local file
|
|
44
|
-
* @param params.task add, clean, verify, remove, (can include comma-separated values)
|
|
45
|
-
* @param params.catalog UID of catalog
|
|
46
|
-
* @see {@link https://ampache.org/api/api-json-methods#catalog_file}
|
|
47
|
-
*/
|
|
48
|
-
catalogFile(params: {
|
|
49
|
-
file: string;
|
|
50
|
-
task: string;
|
|
51
|
-
catalog: UID;
|
|
52
|
-
}): Promise<Success>;
|
|
53
|
-
/**
|
|
54
|
-
* Create a new catalog.
|
|
55
|
-
* ACCESS REQUIRED: 75 (Catalog Manager)
|
|
56
|
-
* @remarks MINIMUM_API_VERSION=6.0.0
|
|
57
|
-
* @param params.name Name for the catalog
|
|
58
|
-
* @param params.path URL or folder path for your catalog
|
|
59
|
-
* @param [params.type] Default: 'local'
|
|
60
|
-
* @param [params.media_type] Default: 'music'
|
|
61
|
-
* @param [params.file_pattern] Pattern used identify tags from the file name. Default: '%T - %t'
|
|
62
|
-
* @param [params.folder_pattern] Pattern used identify tags from the folder name. Default: '%a/%A'
|
|
63
|
-
* @param [params.username] login to remote catalog
|
|
64
|
-
* @param [params.password] password to remote catalog
|
|
65
|
-
* @see {@link https://ampache.org/api/api-json-methods#catalog_add}
|
|
66
|
-
*/
|
|
67
|
-
catalogAdd(params: {
|
|
68
|
-
name: string;
|
|
69
|
-
path: string;
|
|
70
|
-
type?: "local" | "beets" | "remote" | "subsonic" | "seafile" | "beetsremote";
|
|
71
|
-
media_type?: "music" | "podcast" | "clip" | "tvshow" | "movie" | "personal_video";
|
|
72
|
-
file_pattern?: string;
|
|
73
|
-
folder_pattern?: string;
|
|
74
|
-
username?: string;
|
|
75
|
-
password?: string;
|
|
76
|
-
}): Promise<CatalogResponse>;
|
|
77
|
-
/**
|
|
78
|
-
* Delete an existing catalog. (if it exists)
|
|
79
|
-
* ACCESS REQUIRED: 75 (Catalog Manager)
|
|
80
|
-
* @remarks MINIMUM_API_VERSION=6.0.0
|
|
81
|
-
* @param params.filter ID of the catalog
|
|
82
|
-
* @see {@link https://ampache.org/api/api-json-methods#catalog_delete}
|
|
83
|
-
*/
|
|
84
|
-
catalogDelete(params: {
|
|
85
|
-
filter: UID;
|
|
86
|
-
}): Promise<Success>;
|
|
87
|
-
}
|
package/dist/catalogs/types.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type CatalogResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
type: "local" | "remote";
|
|
6
|
-
gather_types: "podcast" | "clip" | "tvshow" | "movie" | "personal_video" | "music";
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
last_add: number;
|
|
9
|
-
last_clean: number;
|
|
10
|
-
last_update: number;
|
|
11
|
-
path: string;
|
|
12
|
-
rename_pattern: string;
|
|
13
|
-
sort_pattern: string;
|
|
14
|
-
};
|
|
15
|
-
export type CatalogsResponse = {
|
|
16
|
-
total_count: number;
|
|
17
|
-
md5: string;
|
|
18
|
-
catalog: CatalogResponse[];
|
|
19
|
-
};
|
package/dist/genres/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { GenreResponse, GenresResponse } from "./types";
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, UID } from "../base";
|
|
3
|
-
export declare class Genres extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This returns the genres (Tags) based on the specified filter
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
7
|
-
* @param [params.filter] UID to find
|
|
8
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
9
|
-
* @param [params.offset]
|
|
10
|
-
* @param [params.limit]
|
|
11
|
-
* @param [params.cond]
|
|
12
|
-
* @param [params.sort]
|
|
13
|
-
* @see {@link https://ampache.org/api/api-json-methods#genres}
|
|
14
|
-
*/
|
|
15
|
-
genres(params?: {
|
|
16
|
-
filter?: string;
|
|
17
|
-
exact?: BinaryBoolean;
|
|
18
|
-
} & ExtendedPagination): Promise<GenresResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* This returns a single genre based on UID
|
|
21
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
22
|
-
* @param params.filter UID to find
|
|
23
|
-
* @see {@link https://ampache.org/api/api-json-methods#genre}
|
|
24
|
-
*/
|
|
25
|
-
genre(params: {
|
|
26
|
-
filter: UID;
|
|
27
|
-
}): Promise<GenreResponse>;
|
|
28
|
-
}
|
package/dist/genres/types.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type GenreSummary = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
export type GenreResponse = {
|
|
7
|
-
id: UID;
|
|
8
|
-
name: string;
|
|
9
|
-
albums: number;
|
|
10
|
-
artists: number;
|
|
11
|
-
songs: number;
|
|
12
|
-
videos: number;
|
|
13
|
-
playlists: number;
|
|
14
|
-
live_streams: number;
|
|
15
|
-
is_hidden: boolean;
|
|
16
|
-
merge: GenreSummary[];
|
|
17
|
-
};
|
|
18
|
-
export type GenresResponse = {
|
|
19
|
-
total_count: number;
|
|
20
|
-
md5: string;
|
|
21
|
-
genre: GenreResponse[];
|
|
22
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Albums } from "./albums";
|
|
2
|
-
import { Artists } from "./artists";
|
|
3
|
-
import { Auth } from "./auth";
|
|
4
|
-
import { Bookmarks } from "./bookmarks";
|
|
5
|
-
import { Catalogs } from "./catalogs";
|
|
6
|
-
import { Genres } from "./genres";
|
|
7
|
-
import { Labels } from "./labels";
|
|
8
|
-
import { Licenses } from "./licenses";
|
|
9
|
-
import { LiveStreams } from "./live-streams";
|
|
10
|
-
import { Playlists } from "./playlists";
|
|
11
|
-
import { Podcasts } from "./podcasts";
|
|
12
|
-
import { Preferences } from "./preferences";
|
|
13
|
-
import { Shares } from "./shares";
|
|
14
|
-
import { Shouts } from "./shouts";
|
|
15
|
-
import { Songs } from "./songs";
|
|
16
|
-
import { System } from "./system";
|
|
17
|
-
import { Users } from "./users";
|
|
18
|
-
import { Videos } from "./videos";
|
|
19
|
-
import { Base } from "./base";
|
|
20
|
-
declare class AmpacheAPI extends Base {
|
|
21
|
-
}
|
|
22
|
-
interface AmpacheAPI extends Albums, Artists, Auth, Bookmarks, Catalogs, Genres, Labels, Licenses, LiveStreams, Playlists, Podcasts, Preferences, Shares, Shouts, Songs, System, Users, Videos {
|
|
23
|
-
}
|
|
24
|
-
export default AmpacheAPI;
|
package/dist/labels/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { LabelResponse, LabelsResponse } from "./types";
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, UID } from "../base";
|
|
3
|
-
export declare class Labels extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This returns labels based on the specified filter
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
7
|
-
* @param [params.filter] Filter results to match this string
|
|
8
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
9
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
10
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
11
|
-
* @param [params.offset]
|
|
12
|
-
* @param [params.limit]
|
|
13
|
-
* @param [params.cond]
|
|
14
|
-
* @param [params.sort]
|
|
15
|
-
* @see {@link https://ampache.org/api/api-json-methods#labels}
|
|
16
|
-
*/
|
|
17
|
-
labels(params?: {
|
|
18
|
-
filter?: string;
|
|
19
|
-
exact?: BinaryBoolean;
|
|
20
|
-
add?: Date;
|
|
21
|
-
update?: Date;
|
|
22
|
-
} & ExtendedPagination): Promise<LabelsResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* This returns a single label
|
|
25
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
26
|
-
* @param params.filter UID to find
|
|
27
|
-
* @see {@link https://ampache.org/api/api-json-methods#label}
|
|
28
|
-
*/
|
|
29
|
-
label(params: {
|
|
30
|
-
filter: UID;
|
|
31
|
-
}): Promise<LabelResponse>;
|
|
32
|
-
}
|
package/dist/labels/types.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type LabelResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
artists: number;
|
|
6
|
-
summary: string | null;
|
|
7
|
-
external_link: string | null;
|
|
8
|
-
address: string | null;
|
|
9
|
-
category: string | null;
|
|
10
|
-
email: string | null;
|
|
11
|
-
website: string | null;
|
|
12
|
-
user: UID;
|
|
13
|
-
};
|
|
14
|
-
export type LabelsResponse = {
|
|
15
|
-
total_count: number;
|
|
16
|
-
md5: string;
|
|
17
|
-
label: LabelResponse[];
|
|
18
|
-
};
|
package/dist/licenses/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { LicenseResponse, LicensesResponse } from "./types";
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, UID } from "../base";
|
|
3
|
-
export declare class Licenses extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This returns licenses based on the specified filter
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
7
|
-
* @param [params.filter] Filter results to match this string
|
|
8
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
9
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
10
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
11
|
-
* @param [params.offset]
|
|
12
|
-
* @param [params.limit]
|
|
13
|
-
* @param [params.cond]
|
|
14
|
-
* @param [params.sort]
|
|
15
|
-
* @see {@link https://ampache.org/api/api-json-methods#licenses}
|
|
16
|
-
*/
|
|
17
|
-
licenses(params?: {
|
|
18
|
-
filter?: string;
|
|
19
|
-
exact?: BinaryBoolean;
|
|
20
|
-
add?: Date;
|
|
21
|
-
update?: Date;
|
|
22
|
-
} & ExtendedPagination): Promise<LicensesResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* This returns a single license
|
|
25
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
26
|
-
* @param params.filter UID to find
|
|
27
|
-
* @see {@link https://ampache.org/api/api-json-methods#license}
|
|
28
|
-
*/
|
|
29
|
-
license(params: {
|
|
30
|
-
filter: UID;
|
|
31
|
-
}): Promise<LicenseResponse>;
|
|
32
|
-
}
|
package/dist/licenses/types.d.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { LiveStreamResponse, LiveStreamsResponse } from "./types";
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, Success, UID } from "../base";
|
|
3
|
-
export declare class LiveStreams extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This returns live_streams based on the specified filter
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=5.1.0
|
|
7
|
-
* @param [params.filter] Filter results to match this string
|
|
8
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
9
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
10
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
11
|
-
* @param [params.offset]
|
|
12
|
-
* @param [params.limit]
|
|
13
|
-
* @param [params.cond]
|
|
14
|
-
* @param [params.sort]
|
|
15
|
-
* @see {@link https://ampache.org/api/api-json-methods#live_streams}
|
|
16
|
-
*/
|
|
17
|
-
liveStreams(params?: {
|
|
18
|
-
filter?: string;
|
|
19
|
-
exact?: BinaryBoolean;
|
|
20
|
-
add?: Date;
|
|
21
|
-
update?: Date;
|
|
22
|
-
} & ExtendedPagination): Promise<LiveStreamsResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* This returns a single live_stream
|
|
25
|
-
* @remarks MINIMUM_API_VERSION=5.1.0
|
|
26
|
-
* @param params.filter UID to find
|
|
27
|
-
* @see {@link https://ampache.org/api/api-json-methods#live_stream}
|
|
28
|
-
*/
|
|
29
|
-
liveStream(params: {
|
|
30
|
-
filter: UID;
|
|
31
|
-
}): Promise<LiveStreamResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Create a live_stream (radio station) object.
|
|
34
|
-
* ACCESS REQUIRED: 50 (Content Manager)
|
|
35
|
-
* @remarks MINIMUM_API_VERSION=6.0.0
|
|
36
|
-
* @param params.name Stream title
|
|
37
|
-
* @param params.url URL of the http/s stream
|
|
38
|
-
* @param params.codec Stream codec
|
|
39
|
-
* @param params.catalog Catalog ID to associate with this stream
|
|
40
|
-
* @param [params.site_url] Homepage URL of the stream
|
|
41
|
-
* @see {@link https://ampache.org/api/api-json-methods#live_stream_create}
|
|
42
|
-
*/
|
|
43
|
-
liveStreamCreate(params: {
|
|
44
|
-
name: string;
|
|
45
|
-
url: string;
|
|
46
|
-
codec: "mp3" | "flac" | "ogg" | "vorbis" | "opus" | "aac" | "alac";
|
|
47
|
-
catalog: string;
|
|
48
|
-
site_url?: string;
|
|
49
|
-
}): Promise<LiveStreamResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* Edit a live_stream (radio station) object.
|
|
52
|
-
* ACCESS REQUIRED: 50 (Content Manager)
|
|
53
|
-
* @remarks MINIMUM_API_VERSION=6.0.0
|
|
54
|
-
* @param params.filter Object to find
|
|
55
|
-
* @param [params.name] Stream title
|
|
56
|
-
* @param [params.url] URL of the http/s stream
|
|
57
|
-
* @param [params.codec] Stream codec
|
|
58
|
-
* @param [params.catalog] Catalog ID to associate with this stream
|
|
59
|
-
* @param [params.site_url] Homepage URL of the stream
|
|
60
|
-
* @see {@link https://ampache.org/api/api-json-methods#live_stream_edit}
|
|
61
|
-
*/
|
|
62
|
-
liveStreamEdit(params: {
|
|
63
|
-
filter: string;
|
|
64
|
-
name?: string;
|
|
65
|
-
url?: string;
|
|
66
|
-
codec?: "mp3" | "flac" | "ogg" | "vorbis" | "opus" | "aac" | "alac";
|
|
67
|
-
catalog?: string;
|
|
68
|
-
site_url?: string;
|
|
69
|
-
}): Promise<LiveStreamResponse>;
|
|
70
|
-
/**
|
|
71
|
-
* Delete a live_stream (radio station) object (if it exists)
|
|
72
|
-
* ACCESS REQUIRED: 50 (Content Manager)
|
|
73
|
-
* @remarks MINIMUM_API_VERSION=6.0.0
|
|
74
|
-
* @param params.filter Object to find
|
|
75
|
-
* @see {@link https://ampache.org/api/api-json-methods#live_stream_delete}
|
|
76
|
-
*/
|
|
77
|
-
liveStreamDelete(params: {
|
|
78
|
-
filter: string;
|
|
79
|
-
}): Promise<Success>;
|
|
80
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type LiveStreamResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
url: string;
|
|
6
|
-
codec: string;
|
|
7
|
-
catalog: UID;
|
|
8
|
-
site_url: string;
|
|
9
|
-
};
|
|
10
|
-
export type LiveStreamsResponse = {
|
|
11
|
-
total_count: number;
|
|
12
|
-
md5: string;
|
|
13
|
-
live_stream: LiveStreamResponse[];
|
|
14
|
-
};
|