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
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { HashResponse, PlaylistResponse, PlaylistsResponse } from "./types";
|
|
2
|
-
import { SongsResponse } from "../songs/types";
|
|
3
|
-
import { Base, BinaryBoolean, ExtendedPagination, Pagination, Success, UID } from "../base";
|
|
4
|
-
export declare class Playlists extends Base {
|
|
5
|
-
/**
|
|
6
|
-
* This returns playlists based on the specified filter
|
|
7
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
8
|
-
* @param [params.filter] Filter results to match this string
|
|
9
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
10
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
11
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
12
|
-
* @param [params.hide_search] 0, 1 (if true do not include searches/smartlists in the result)
|
|
13
|
-
* @param [params.show_dupes] 0, 1 (if true ignore 'api_hide_dupe_searches' setting)
|
|
14
|
-
* @param [params.include] 0, 1 (if true include the objects in the playlist)
|
|
15
|
-
* @param [params.offset]
|
|
16
|
-
* @param [params.limit]
|
|
17
|
-
* @param [params.cond]
|
|
18
|
-
* @param [params.sort]
|
|
19
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlists}
|
|
20
|
-
*/
|
|
21
|
-
playlists(params?: {
|
|
22
|
-
filter?: string;
|
|
23
|
-
exact?: BinaryBoolean;
|
|
24
|
-
add?: Date;
|
|
25
|
-
update?: Date;
|
|
26
|
-
hide_search?: BinaryBoolean;
|
|
27
|
-
show_dupes?: BinaryBoolean;
|
|
28
|
-
include?: BinaryBoolean;
|
|
29
|
-
} & ExtendedPagination): Promise<PlaylistsResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* This returns smartlists based on the specified filter. NOTE: Filtered from Playlists() so pagination is invalid.
|
|
32
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
33
|
-
* @param [params.filter] Filter results to match this string
|
|
34
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
35
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
36
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
37
|
-
* @param [params.show_dupes] 0, 1 (if true ignore 'api_hide_dupe_searches' setting)
|
|
38
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlists}
|
|
39
|
-
*/
|
|
40
|
-
smartlists(params?: {
|
|
41
|
-
filter?: string;
|
|
42
|
-
exact?: BinaryBoolean;
|
|
43
|
-
add?: Date;
|
|
44
|
-
update?: Date;
|
|
45
|
-
show_dupes?: BinaryBoolean;
|
|
46
|
-
}): Promise<PlaylistsResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* This returns a single playlist
|
|
49
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
50
|
-
* @param params.filter UID to find
|
|
51
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist}
|
|
52
|
-
*/
|
|
53
|
-
playlist(params: {
|
|
54
|
-
filter: UID;
|
|
55
|
-
}): Promise<PlaylistResponse>;
|
|
56
|
-
/**
|
|
57
|
-
* This returns a user's playlists based on the specified filter
|
|
58
|
-
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
59
|
-
* @param [params.filter] Filter results to match this string
|
|
60
|
-
* @param [params.include] 0, 1 (include playlist items)
|
|
61
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
62
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
63
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
64
|
-
* @param [params.offset]
|
|
65
|
-
* @param [params.limit]
|
|
66
|
-
* @param [params.cond]
|
|
67
|
-
* @param [params.sort]
|
|
68
|
-
* @see {@link https://ampache.org/api/api-json-methods#user_playlists}
|
|
69
|
-
*/
|
|
70
|
-
userPlaylists(params?: {
|
|
71
|
-
filter?: string;
|
|
72
|
-
include?: BinaryBoolean;
|
|
73
|
-
exact?: BinaryBoolean;
|
|
74
|
-
add?: Date;
|
|
75
|
-
update?: Date;
|
|
76
|
-
} & ExtendedPagination): Promise<PlaylistsResponse>;
|
|
77
|
-
/**
|
|
78
|
-
* This returns a user's smartlists based on the specified filter
|
|
79
|
-
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
80
|
-
* @param [params.filter] Filter results to match this string
|
|
81
|
-
* @param [params.include] 0, 1 (include playlist items)
|
|
82
|
-
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
83
|
-
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
84
|
-
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
85
|
-
* @param [params.offset]
|
|
86
|
-
* @param [params.limit]
|
|
87
|
-
* @param [params.cond]
|
|
88
|
-
* @param [params.sort]
|
|
89
|
-
* @see {@link https://ampache.org/api/api-json-methods#user_smartlists}
|
|
90
|
-
*/
|
|
91
|
-
userSmartlists(params?: {
|
|
92
|
-
filter?: string;
|
|
93
|
-
include?: BinaryBoolean;
|
|
94
|
-
exact?: BinaryBoolean;
|
|
95
|
-
add?: Date;
|
|
96
|
-
update?: Date;
|
|
97
|
-
} & ExtendedPagination): Promise<PlaylistsResponse>;
|
|
98
|
-
/**
|
|
99
|
-
* This creates a new playlist and returns it
|
|
100
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
101
|
-
* @param params.name Playlist name
|
|
102
|
-
* @param [params.type] public, private (Playlist type)
|
|
103
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_create}
|
|
104
|
-
*/
|
|
105
|
-
playlistCreate(params: {
|
|
106
|
-
name: string;
|
|
107
|
-
type?: "public" | "private";
|
|
108
|
-
}): Promise<PlaylistResponse>;
|
|
109
|
-
/**
|
|
110
|
-
* This adds an item to a playlist
|
|
111
|
-
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
112
|
-
* @param params.filter UID of Playlist
|
|
113
|
-
* @param params.id UID of the object to add to playlist
|
|
114
|
-
* @param params.type 'song', 'album', 'artist', 'playlist'
|
|
115
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_add}
|
|
116
|
-
*/
|
|
117
|
-
playlistAdd(params: {
|
|
118
|
-
filter: UID;
|
|
119
|
-
id: UID;
|
|
120
|
-
type: "song" | "album" | "artist" | "playlist";
|
|
121
|
-
}): Promise<Success>;
|
|
122
|
-
/**
|
|
123
|
-
* This modifies name and type of the playlist.
|
|
124
|
-
* NOTE items and tracks must be sent together and be of equal length.
|
|
125
|
-
* @remarks MINIMUM_API_VERSION=400001
|
|
126
|
-
* @param params.filter UID to find
|
|
127
|
-
* @param [params.name] Playlist name
|
|
128
|
-
* @param [params.type] public, private (Playlist type)
|
|
129
|
-
* @param [params.owner] Change playlist owner to the user id (-1 = System playlist)
|
|
130
|
-
* @param [params.items] comma-separated song_id's (replaces existing items with a new id)
|
|
131
|
-
* @param [params.tracks] comma-separated playlisttrack numbers matched to 'items' in order
|
|
132
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_edit}
|
|
133
|
-
*/
|
|
134
|
-
playlistEdit(params: {
|
|
135
|
-
filter: UID;
|
|
136
|
-
name?: string;
|
|
137
|
-
type?: "public" | "private";
|
|
138
|
-
owner?: string;
|
|
139
|
-
items?: string;
|
|
140
|
-
tracks?: string;
|
|
141
|
-
}): Promise<Success>;
|
|
142
|
-
/**
|
|
143
|
-
* This deletes a playlist
|
|
144
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
145
|
-
* @param params.filter UID of playlist to delete
|
|
146
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_delete}
|
|
147
|
-
*/
|
|
148
|
-
playlistDelete(params: {
|
|
149
|
-
filter: UID;
|
|
150
|
-
}): Promise<Success>;
|
|
151
|
-
/**
|
|
152
|
-
* This adds a song to a playlist
|
|
153
|
-
* @remarks MINIMUM_API_VERSION=380001; CHANGED_IN_API_VERSION=400003
|
|
154
|
-
* @param params.filter UID of Playlist
|
|
155
|
-
* @param params.song UID of song to add to playlist
|
|
156
|
-
* @param [params.check] 0, 1 Whether to check and ignore duplicates (default = 0)
|
|
157
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_add_song}
|
|
158
|
-
* @deprecated Being removed in 7.0.0. Use `playlist_add` instead.
|
|
159
|
-
*/
|
|
160
|
-
playlistAddSong(params: {
|
|
161
|
-
filter: UID;
|
|
162
|
-
song: UID;
|
|
163
|
-
check?: BinaryBoolean;
|
|
164
|
-
}): Promise<Success>;
|
|
165
|
-
/**
|
|
166
|
-
* This remove a song from a playlist
|
|
167
|
-
* @remarks MINIMUM_API_VERSION=380001; CHANGED_IN_API_VERSION=400001
|
|
168
|
-
* @param params.filter UID of Playlist
|
|
169
|
-
* @param [params.song] UID of song to remove from playlist
|
|
170
|
-
* @param [params.track] Track number to remove from playlist
|
|
171
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_remove_song}
|
|
172
|
-
*/
|
|
173
|
-
playlistRemoveSong(params: {
|
|
174
|
-
filter: UID;
|
|
175
|
-
song?: UID;
|
|
176
|
-
track?: number;
|
|
177
|
-
}): Promise<Success>;
|
|
178
|
-
/**
|
|
179
|
-
* Get a list of song JSON, indexes or id's based on some simple search criteria
|
|
180
|
-
* @remarks MINIMUM_API_VERSION=400001; CHANGED_IN_API_VERSION=400002; 'recent' will search for tracks played after 'Popular Threshold' days; 'forgotten' will search for tracks played before 'Popular Threshold' days; 'unplayed' added in 400002 for searching unplayed tracks
|
|
181
|
-
* @param [params.mode] (default = 'random')
|
|
182
|
-
* @param [params.filter] string LIKE matched to song title
|
|
183
|
-
* @param [params.album] UID of album
|
|
184
|
-
* @param [params.artist] UID of artist
|
|
185
|
-
* @param [params.flag] 0, 1 (get flagged songs only. default = 0)
|
|
186
|
-
* @param [params.format] song, index, id (default = 'song')
|
|
187
|
-
* @param [params.offset]
|
|
188
|
-
* @param [params.limit]
|
|
189
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_generate}
|
|
190
|
-
*/
|
|
191
|
-
playlistGenerate(params?: {
|
|
192
|
-
mode?: "recent" | "forgotten" | "unplayed" | "random";
|
|
193
|
-
filter?: string;
|
|
194
|
-
album?: number;
|
|
195
|
-
artist?: number;
|
|
196
|
-
flag?: BinaryBoolean;
|
|
197
|
-
format?: "song" | "index" | "id";
|
|
198
|
-
} & Pagination): Promise<SongsResponse>;
|
|
199
|
-
/**
|
|
200
|
-
* This returns the md5 hash for the songs in a playlist
|
|
201
|
-
* @remarks MINIMUM_API_VERSION=6.6.0
|
|
202
|
-
* @param params.filter string UID of Playlist
|
|
203
|
-
* @see {@link https://ampache.org/api/api-json-methods#playlist_hash}
|
|
204
|
-
*/
|
|
205
|
-
playlistHash(params: {
|
|
206
|
-
filter: UID;
|
|
207
|
-
}): Promise<HashResponse>;
|
|
208
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
import { UserSummary } from "../users/types";
|
|
3
|
-
export type PlaylistResponse = {
|
|
4
|
-
id: UID;
|
|
5
|
-
name: string;
|
|
6
|
-
owner: string;
|
|
7
|
-
items: number;
|
|
8
|
-
type: "public" | "private";
|
|
9
|
-
art: string;
|
|
10
|
-
has_art: boolean;
|
|
11
|
-
flag: boolean;
|
|
12
|
-
rating: number | null;
|
|
13
|
-
averagerating: number | null;
|
|
14
|
-
user: UserSummary;
|
|
15
|
-
has_access: boolean;
|
|
16
|
-
has_collaborate: boolean;
|
|
17
|
-
last_update: number;
|
|
18
|
-
};
|
|
19
|
-
export type PlaylistsResponse = {
|
|
20
|
-
total_count: number;
|
|
21
|
-
md5: string;
|
|
22
|
-
playlist: PlaylistResponse[];
|
|
23
|
-
};
|
|
24
|
-
export type HashResponse = {
|
|
25
|
-
md5: string;
|
|
26
|
-
};
|
package/dist/podcasts/index.d.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { PodcastResponse, PodcastsResponse, PodcastEpisodeResponse, PodcastEpisodesResponse, DeletedPodcastEpisodesResponse } from "./types";
|
|
2
|
-
import { Base, ExtendedPagination, Pagination, Success, UID } from "../base";
|
|
3
|
-
export declare class Podcasts extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* Get information about podcasts
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
7
|
-
* @param [params.filter] Value is Alpha Match for returned results, may be more than one letter/number
|
|
8
|
-
* @param [params.include] episodes (include podcast_episodes in the response)
|
|
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#podcasts}
|
|
14
|
-
*/
|
|
15
|
-
podcasts(params?: {
|
|
16
|
-
filter?: string;
|
|
17
|
-
include?: "episodes";
|
|
18
|
-
} & ExtendedPagination): Promise<PodcastsResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Get information about podcasts
|
|
21
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
22
|
-
* @param params.filter UID to find
|
|
23
|
-
* @param [params.include] episodes (include podcast_episodes in the response)
|
|
24
|
-
* @param [params.offset]
|
|
25
|
-
* @param [params.limit]
|
|
26
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast}
|
|
27
|
-
*/
|
|
28
|
-
podcast(params?: {
|
|
29
|
-
filter: UID;
|
|
30
|
-
include?: "episodes";
|
|
31
|
-
} & Pagination): Promise<PodcastResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Create a podcast that can be used by anyone to stream media.
|
|
34
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
35
|
-
* @param params.url RSS url for podcast
|
|
36
|
-
* @param params.catalog UID of podcast catalog
|
|
37
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast_create}
|
|
38
|
-
*/
|
|
39
|
-
podcastCreate(params: {
|
|
40
|
-
url: string;
|
|
41
|
-
catalog: UID;
|
|
42
|
-
}): Promise<PodcastResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* Update the description and/or expiration date for an existing podcast.
|
|
45
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
46
|
-
* @param params.filter UID to find
|
|
47
|
-
* @param [params.feed] RSS url for podcast
|
|
48
|
-
* @param [params.title] Podcast title
|
|
49
|
-
* @param [params.website] Source website URL
|
|
50
|
-
* @param [params.description] Podcast description
|
|
51
|
-
* @param [params.generator] Podcast generator
|
|
52
|
-
* @param [params.copyright] Podcast copyright
|
|
53
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast_edit}
|
|
54
|
-
*/
|
|
55
|
-
podcastEdit(params: {
|
|
56
|
-
filter: UID;
|
|
57
|
-
feed?: string;
|
|
58
|
-
title?: string;
|
|
59
|
-
website?: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
generator?: string;
|
|
62
|
-
copyright?: string;
|
|
63
|
-
}): Promise<Success>;
|
|
64
|
-
/**
|
|
65
|
-
* Delete an existing podcast
|
|
66
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
67
|
-
* @param params.filter UID of podcast to delete
|
|
68
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast_delete}
|
|
69
|
-
*/
|
|
70
|
-
podcastDelete(params: {
|
|
71
|
-
filter: UID;
|
|
72
|
-
}): Promise<Success>;
|
|
73
|
-
/**
|
|
74
|
-
* This returns the episodes for a podcast
|
|
75
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
76
|
-
* @param params.filter UID of podcast
|
|
77
|
-
* @param [params.offset]
|
|
78
|
-
* @param [params.limit]
|
|
79
|
-
* @param [params.cond]
|
|
80
|
-
* @param [params.sort]
|
|
81
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast_episodes}
|
|
82
|
-
*/
|
|
83
|
-
podcastEpisodes(params: {
|
|
84
|
-
filter: UID;
|
|
85
|
-
} & ExtendedPagination): Promise<PodcastEpisodesResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* Get the podcast_episode from a UID
|
|
88
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
89
|
-
* @param params.filter UID of podcast
|
|
90
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast_episode}
|
|
91
|
-
*/
|
|
92
|
-
podcastEpisode(params: {
|
|
93
|
-
filter: UID;
|
|
94
|
-
}): Promise<PodcastEpisodeResponse>;
|
|
95
|
-
/**
|
|
96
|
-
* Delete an existing podcast_episode
|
|
97
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
98
|
-
* @param params.filter UID of podcast episode to delete
|
|
99
|
-
* @see {@link https://ampache.org/api/api-json-methods#podcast_episode_delete}
|
|
100
|
-
*/
|
|
101
|
-
podcastEpisodeDelete(params: {
|
|
102
|
-
filter: UID;
|
|
103
|
-
}): Promise<Success>;
|
|
104
|
-
/**
|
|
105
|
-
* Sync and download new podcast episodes
|
|
106
|
-
* ACCESS REQUIRED: 50 (Content Manager)
|
|
107
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
108
|
-
* @param params.id UID of podcast
|
|
109
|
-
* @see {@link https://ampache.org/api/api-json-methods#update_podcast}
|
|
110
|
-
*/
|
|
111
|
-
updatePodcast(params: {
|
|
112
|
-
id: UID;
|
|
113
|
-
}): Promise<Success>;
|
|
114
|
-
/**
|
|
115
|
-
* This returns the episodes for a podcast that have been deleted
|
|
116
|
-
* @param [params.offset]
|
|
117
|
-
* @param [params.limit]
|
|
118
|
-
* @see {@link https://ampache.org/api/api-json-methods#deleted_podcast_episodes}
|
|
119
|
-
*/
|
|
120
|
-
deletedPodcastEpisodes(params?: {} & Pagination): Promise<DeletedPodcastEpisodesResponse>;
|
|
121
|
-
}
|
package/dist/podcasts/types.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type PodcastResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
language: string;
|
|
7
|
-
copyright: string;
|
|
8
|
-
feed_url: string;
|
|
9
|
-
generator: string;
|
|
10
|
-
website: string;
|
|
11
|
-
build_date: string;
|
|
12
|
-
sync_date: string;
|
|
13
|
-
public_url: string;
|
|
14
|
-
art: string;
|
|
15
|
-
has_art: boolean;
|
|
16
|
-
flag: boolean;
|
|
17
|
-
rating: number | null;
|
|
18
|
-
averaterating: number | null;
|
|
19
|
-
podcast_episode: PodcastEpisodeResponse[];
|
|
20
|
-
};
|
|
21
|
-
export type PodcastsResponse = {
|
|
22
|
-
total_count: number;
|
|
23
|
-
md5: string;
|
|
24
|
-
podcast: PodcastResponse[];
|
|
25
|
-
};
|
|
26
|
-
export type PodcastEpisodeResponse = {
|
|
27
|
-
id: UID;
|
|
28
|
-
title: string;
|
|
29
|
-
name: string;
|
|
30
|
-
description: string;
|
|
31
|
-
category: string;
|
|
32
|
-
author: string;
|
|
33
|
-
author_full: string;
|
|
34
|
-
website: string;
|
|
35
|
-
pubdate: string;
|
|
36
|
-
state: "completed" | "pending";
|
|
37
|
-
filelength: string;
|
|
38
|
-
filesize: string;
|
|
39
|
-
filename: string;
|
|
40
|
-
mime: string;
|
|
41
|
-
time: number;
|
|
42
|
-
size: number;
|
|
43
|
-
bitrate: number;
|
|
44
|
-
stream_bitrate: number;
|
|
45
|
-
rate: number;
|
|
46
|
-
mode: number | null;
|
|
47
|
-
channels: number | null;
|
|
48
|
-
public_url: string;
|
|
49
|
-
url: string;
|
|
50
|
-
catalog: UID;
|
|
51
|
-
art: string;
|
|
52
|
-
has_art: boolean;
|
|
53
|
-
flag: boolean;
|
|
54
|
-
rating: number | null;
|
|
55
|
-
averagerating: number | null;
|
|
56
|
-
playcount: number;
|
|
57
|
-
played: number;
|
|
58
|
-
};
|
|
59
|
-
export type PodcastEpisodesResponse = {
|
|
60
|
-
total_count: number;
|
|
61
|
-
md5: string;
|
|
62
|
-
podcast_episode: PodcastEpisodeResponse[];
|
|
63
|
-
};
|
|
64
|
-
export type DeletedPodcastEpisodeResponse = {
|
|
65
|
-
id: UID;
|
|
66
|
-
addition_time: number;
|
|
67
|
-
delete_time: number;
|
|
68
|
-
title: string;
|
|
69
|
-
file: string;
|
|
70
|
-
catalog: UID;
|
|
71
|
-
total_count: number;
|
|
72
|
-
total_skip: number;
|
|
73
|
-
podcast: UID;
|
|
74
|
-
};
|
|
75
|
-
export type DeletedPodcastEpisodesResponse = {
|
|
76
|
-
total_count: number;
|
|
77
|
-
md5: string;
|
|
78
|
-
deleted_podcast_episode: DeletedPodcastEpisodeResponse[];
|
|
79
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Base, BinaryBoolean, Success } from "../base";
|
|
2
|
-
import { PreferenceResponse, PreferencesResponse } from "./types";
|
|
3
|
-
export declare class Preferences extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* Get your server preferences
|
|
6
|
-
* ACCESS REQUIRED: 100 (Admin)
|
|
7
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
8
|
-
* @see {@link https://ampache.org/api/api-json-methods#system_preferences}
|
|
9
|
-
*/
|
|
10
|
-
systemPreferences(): Promise<PreferencesResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Get your system preference by name
|
|
13
|
-
* ACCESS REQUIRED: 100 (Admin)
|
|
14
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
15
|
-
* @param params.systemPreference Preference name e.g ('notify_email', 'ajax_load')
|
|
16
|
-
* @see {@link https://ampache.org/api/api-json-methods#system_preference}
|
|
17
|
-
*/
|
|
18
|
-
systemPreference(params: {
|
|
19
|
-
filter: string;
|
|
20
|
-
}): Promise<PreferenceResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Get your user preferences
|
|
23
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
24
|
-
* @see {@link https://ampache.org/api/api-json-methods#user_preferences}
|
|
25
|
-
*/
|
|
26
|
-
userPreferences(): Promise<PreferencesResponse>;
|
|
27
|
-
/**
|
|
28
|
-
* Get your user preference by name
|
|
29
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
30
|
-
* @param params.filter Preference name e.g ('notify_email', 'ajax_load')
|
|
31
|
-
* @see {@link https://ampache.org/api/api-json-methods#user_preference}
|
|
32
|
-
*/
|
|
33
|
-
userPreference(params: {
|
|
34
|
-
filter: string;
|
|
35
|
-
}): Promise<PreferenceResponse>;
|
|
36
|
-
/**
|
|
37
|
-
* Add a new preference to your server
|
|
38
|
-
* ACCESS REQUIRED: 100 (Admin)
|
|
39
|
-
* @param params.filter Preference name e.g ('notify_email', 'ajax_load')
|
|
40
|
-
* @param params.type boolean, integer, string, special
|
|
41
|
-
* @param params.default string or integer default value
|
|
42
|
-
* @param params.category Category type
|
|
43
|
-
* @param [params.description]
|
|
44
|
-
* @param [params.subcategory]
|
|
45
|
-
* @param [params.level] access level required to change the value (default 100)
|
|
46
|
-
* @see {@link https://ampache.org/api/api-json-methods#preference_create}
|
|
47
|
-
*/
|
|
48
|
-
preferenceCreate(params: {
|
|
49
|
-
filter: string;
|
|
50
|
-
type: "boolean" | "integer" | "string" | "special";
|
|
51
|
-
default: string | number;
|
|
52
|
-
category: "interface" | "internal" | "options" | "playlist" | "plugins" | "streaming";
|
|
53
|
-
description?: string;
|
|
54
|
-
subcategory?: string;
|
|
55
|
-
level?: number;
|
|
56
|
-
}): Promise<Success>;
|
|
57
|
-
/**
|
|
58
|
-
* Edit a preference value and apply to all users if allowed
|
|
59
|
-
* ACCESS REQUIRED: 100 (Admin)
|
|
60
|
-
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
61
|
-
* @param params.filter Preference name e.g ('notify_email', 'ajax_load')
|
|
62
|
-
* @param params.value (string/integer) Preference value
|
|
63
|
-
* @param [params.all] 0, 1 apply to all users
|
|
64
|
-
* @see {@link https://ampache.org/api/api-json-methods#preference_edit}
|
|
65
|
-
*/
|
|
66
|
-
preferenceEdit(params: {
|
|
67
|
-
filter: string;
|
|
68
|
-
value: string | number;
|
|
69
|
-
all?: BinaryBoolean;
|
|
70
|
-
}): Promise<Success>;
|
|
71
|
-
/**
|
|
72
|
-
* Delete a non-system preference by name
|
|
73
|
-
* ACCESS REQUIRED: 100 (Admin)
|
|
74
|
-
* @param params.filter Preference name e.g ('notify_email', 'ajax_load')
|
|
75
|
-
* @see {@link https://ampache.org/api/api-json-methods#preference_delete}
|
|
76
|
-
*/
|
|
77
|
-
preferenceDelete(params: {
|
|
78
|
-
filter: string;
|
|
79
|
-
}): Promise<Success>;
|
|
80
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type PreferenceResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
level: string;
|
|
6
|
-
description: string;
|
|
7
|
-
value: string;
|
|
8
|
-
type: string;
|
|
9
|
-
category: string;
|
|
10
|
-
subcategory: string | null;
|
|
11
|
-
has_access: boolean;
|
|
12
|
-
values?: string;
|
|
13
|
-
};
|
|
14
|
-
export type PreferencesResponse = {
|
|
15
|
-
total_count: number;
|
|
16
|
-
md5: string;
|
|
17
|
-
preference: PreferenceResponse[];
|
|
18
|
-
};
|
package/dist/shares/index.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ShareResponse, SharesResponse } from "./types";
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, Success, UID } from "../base";
|
|
3
|
-
export declare class Shares extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This searches the shares and returns... shares
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
7
|
-
* @param [params.filter] UID to find
|
|
8
|
-
* @param [params.exact] 0, 1 boolean to match the exact filter string
|
|
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#shares}
|
|
14
|
-
*/
|
|
15
|
-
shares(params?: {
|
|
16
|
-
filter?: string;
|
|
17
|
-
exact?: BinaryBoolean;
|
|
18
|
-
} & ExtendedPagination): Promise<SharesResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Return a share from UID
|
|
21
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
22
|
-
* @param params.filter UID to find
|
|
23
|
-
* @see {@link https://ampache.org/api/api-json-methods#share}
|
|
24
|
-
*/
|
|
25
|
-
share(params: {
|
|
26
|
-
filter: UID;
|
|
27
|
-
}): Promise<ShareResponse>;
|
|
28
|
-
/**
|
|
29
|
-
* Create a public url that can be used by anyone to stream media.
|
|
30
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
31
|
-
* @param params.filter UID of object you are sharing
|
|
32
|
-
* @param params.type ('song', 'album', 'artist', 'playlist', 'podcast', 'podcast_episode', 'video')
|
|
33
|
-
* @param [params.description] description (will be filled for you if empty)
|
|
34
|
-
* @param [params.expires] days to keep active
|
|
35
|
-
* @see {@link https://ampache.org/api/api-json-methods#share_create}
|
|
36
|
-
*/
|
|
37
|
-
shareCreate(params: {
|
|
38
|
-
filter: UID;
|
|
39
|
-
type: "song" | "album" | "artist" | "playlist" | "podcast" | "podcast_episode" | "video";
|
|
40
|
-
description?: string;
|
|
41
|
-
expires?: number;
|
|
42
|
-
}): Promise<ShareResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* Update the description and/or expiration date for an existing share
|
|
45
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
46
|
-
* @param params.filter UID to find
|
|
47
|
-
* @param [params.stream] 0, 1
|
|
48
|
-
* @param [params.download] 0, 1
|
|
49
|
-
* @param [params.expires] days to keep active
|
|
50
|
-
* @param [params.description] description
|
|
51
|
-
* @see {@link https://ampache.org/api/api-json-methods#share_edit}
|
|
52
|
-
*/
|
|
53
|
-
shareEdit(params: {
|
|
54
|
-
filter: UID;
|
|
55
|
-
stream?: BinaryBoolean;
|
|
56
|
-
download?: BinaryBoolean;
|
|
57
|
-
expires?: number;
|
|
58
|
-
description?: string;
|
|
59
|
-
}): Promise<Success>;
|
|
60
|
-
/**
|
|
61
|
-
* Delete an existing share.
|
|
62
|
-
* @remarks MINIMUM_API_VERSION=420000
|
|
63
|
-
* @param params.filter UID of share to delete
|
|
64
|
-
* @see {@link https://ampache.org/api/api-json-methods#share_delete}
|
|
65
|
-
*/
|
|
66
|
-
shareDelete(params: {
|
|
67
|
-
filter: UID;
|
|
68
|
-
}): Promise<Success>;
|
|
69
|
-
}
|
package/dist/shares/types.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UID } from "../base";
|
|
2
|
-
export type ShareResponse = {
|
|
3
|
-
id: UID;
|
|
4
|
-
name: string;
|
|
5
|
-
owner: string;
|
|
6
|
-
allow_stream: boolean;
|
|
7
|
-
allow_download: boolean;
|
|
8
|
-
creation_date: number;
|
|
9
|
-
lastvisit_date: number;
|
|
10
|
-
object_type: string;
|
|
11
|
-
object_id: UID;
|
|
12
|
-
expire_days: number;
|
|
13
|
-
max_counter: number;
|
|
14
|
-
counter: number;
|
|
15
|
-
secret: string;
|
|
16
|
-
public_url: string;
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
export type SharesResponse = {
|
|
20
|
-
total_count: number;
|
|
21
|
-
md5: string;
|
|
22
|
-
share: ShareResponse[];
|
|
23
|
-
};
|
package/dist/shouts/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ShoutResponse } from "./types";
|
|
2
|
-
import { Base } from "../base";
|
|
3
|
-
export declare class Shouts extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* This gets the latest posted shouts
|
|
6
|
-
* @remarks MINIMUM_API_VERSION=380001
|
|
7
|
-
* @param [params.username] Username to find
|
|
8
|
-
* @param [params.limit] Maximum number of results to return
|
|
9
|
-
* @see {@link https://ampache.org/api/api-json-methods#last_shouts}
|
|
10
|
-
*/
|
|
11
|
-
last_shouts(params?: {
|
|
12
|
-
username?: string;
|
|
13
|
-
limit?: number;
|
|
14
|
-
}): Promise<{
|
|
15
|
-
shout: ShoutResponse[];
|
|
16
|
-
}>;
|
|
17
|
-
}
|
package/dist/shouts/types.d.ts
DELETED