javascript-ampache 1.1.10 → 1.2.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/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/dist/playlists/index.d.ts +4 -0
- package/dist/songs/index.d.ts +4 -1
- package/dist/system/index.d.ts +13 -1
- package/dist/system/types.d.ts +7 -0
- package/package.json +1 -1
- package/src/playlists/index.ts +4 -0
- package/src/songs/index.ts +6 -6
- package/src/system/index.ts +16 -1
- package/src/system/types.ts +8 -0
|
@@ -57,6 +57,7 @@ export declare class Playlists extends Base {
|
|
|
57
57
|
* This returns a user's playlists based on the specified filter
|
|
58
58
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
59
59
|
* @param [params.filter] Filter results to match this string
|
|
60
|
+
* @param [params.include] 0, 1 (include playlist items)
|
|
60
61
|
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
61
62
|
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
62
63
|
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
@@ -68,6 +69,7 @@ export declare class Playlists extends Base {
|
|
|
68
69
|
*/
|
|
69
70
|
userPlaylists(params?: {
|
|
70
71
|
filter?: string;
|
|
72
|
+
include?: BinaryBoolean;
|
|
71
73
|
exact?: BinaryBoolean;
|
|
72
74
|
add?: Date;
|
|
73
75
|
update?: Date;
|
|
@@ -76,6 +78,7 @@ export declare class Playlists extends Base {
|
|
|
76
78
|
* This returns a user's smartlists based on the specified filter
|
|
77
79
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
78
80
|
* @param [params.filter] Filter results to match this string
|
|
81
|
+
* @param [params.include] 0, 1 (include playlist items)
|
|
79
82
|
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
80
83
|
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
81
84
|
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
@@ -87,6 +90,7 @@ export declare class Playlists extends Base {
|
|
|
87
90
|
*/
|
|
88
91
|
userSmartlists(params?: {
|
|
89
92
|
filter?: string;
|
|
93
|
+
include?: BinaryBoolean;
|
|
90
94
|
exact?: BinaryBoolean;
|
|
91
95
|
add?: Date;
|
|
92
96
|
update?: Date;
|
package/dist/songs/index.d.ts
CHANGED
|
@@ -108,10 +108,13 @@ export declare class Songs extends Base {
|
|
|
108
108
|
/**
|
|
109
109
|
* Get the full song file tags using VaInfo
|
|
110
110
|
* This is used to get tags for remote catalogs to allow maximum data to be returned
|
|
111
|
-
* @remarks MINIMUM_API_VERSION=7.
|
|
111
|
+
* @remarks MINIMUM_API_VERSION=6.7.0
|
|
112
112
|
* @param params.filter UID of song to fetch
|
|
113
113
|
* @see {@link https://ampache.org/api/api-json-methods#song_tags}
|
|
114
114
|
*/
|
|
115
|
+
songTags(params: {
|
|
116
|
+
filter: UID;
|
|
117
|
+
}): Promise<unknown>;
|
|
115
118
|
/**
|
|
116
119
|
* This takes a URL and returns the song object in question
|
|
117
120
|
* @remarks MINIMUM_API_VERSION=380001
|
package/dist/system/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base, BinaryBoolean, ExtendedPagination, Pagination, Success, UID } from "../base";
|
|
2
|
-
import { IndexEntry, NowPlayingResponse } from "./types";
|
|
2
|
+
import { IndexEntry, NowPlayingResponse, RuleResponse } from "./types";
|
|
3
3
|
export declare class System extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Check Ampache for updates and run the update if there is one.
|
|
@@ -102,6 +102,7 @@ export declare class System extends Base {
|
|
|
102
102
|
catalog?: number;
|
|
103
103
|
add?: Date;
|
|
104
104
|
update?: Date;
|
|
105
|
+
cond?: string;
|
|
105
106
|
} & ExtendedPagination): Promise<{
|
|
106
107
|
browse: IndexEntry[];
|
|
107
108
|
}>;
|
|
@@ -361,6 +362,17 @@ export declare class System extends Base {
|
|
|
361
362
|
}): Promise<{
|
|
362
363
|
now_playing: NowPlayingResponse[];
|
|
363
364
|
}>;
|
|
365
|
+
/**
|
|
366
|
+
* Print a list of valid search rules for your search type
|
|
367
|
+
* @remarks MINIMUM_API_VERSION=6.8.0
|
|
368
|
+
* @param params.filter Object type
|
|
369
|
+
* @see {@link https://ampache.org/api/api-json-methods#search_rules}
|
|
370
|
+
*/
|
|
371
|
+
searchRules(params: {
|
|
372
|
+
filter: "song" | "album" | "song_artist" | "album_artist" | "artist" | "label" | "playlist" | "podcast" | "podcast_episode" | "genre" | "user" | "video";
|
|
373
|
+
}): Promise<{
|
|
374
|
+
rule: RuleResponse[];
|
|
375
|
+
}>;
|
|
364
376
|
/**
|
|
365
377
|
* Perform an advanced search given passed rules.
|
|
366
378
|
* You'll want to consult the docs for this.
|
package/dist/system/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/playlists/index.ts
CHANGED
|
@@ -89,6 +89,7 @@ export class Playlists extends Base {
|
|
|
89
89
|
* This returns a user's playlists based on the specified filter
|
|
90
90
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
91
91
|
* @param [params.filter] Filter results to match this string
|
|
92
|
+
* @param [params.include] 0, 1 (include playlist items)
|
|
92
93
|
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
93
94
|
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
94
95
|
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
@@ -101,6 +102,7 @@ export class Playlists extends Base {
|
|
|
101
102
|
userPlaylists(
|
|
102
103
|
params?: {
|
|
103
104
|
filter?: string;
|
|
105
|
+
include?: BinaryBoolean;
|
|
104
106
|
exact?: BinaryBoolean;
|
|
105
107
|
add?: Date;
|
|
106
108
|
update?: Date;
|
|
@@ -115,6 +117,7 @@ export class Playlists extends Base {
|
|
|
115
117
|
* This returns a user's smartlists based on the specified filter
|
|
116
118
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
117
119
|
* @param [params.filter] Filter results to match this string
|
|
120
|
+
* @param [params.include] 0, 1 (include playlist items)
|
|
118
121
|
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
119
122
|
* @param [params.add] ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date
|
|
120
123
|
* @param [params.update] ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date
|
|
@@ -127,6 +130,7 @@ export class Playlists extends Base {
|
|
|
127
130
|
userSmartlists(
|
|
128
131
|
params?: {
|
|
129
132
|
filter?: string;
|
|
133
|
+
include?: BinaryBoolean;
|
|
130
134
|
exact?: BinaryBoolean;
|
|
131
135
|
add?: Date;
|
|
132
136
|
update?: Date;
|
package/src/songs/index.ts
CHANGED
|
@@ -165,15 +165,15 @@ export class Songs extends Base {
|
|
|
165
165
|
/**
|
|
166
166
|
* Get the full song file tags using VaInfo
|
|
167
167
|
* This is used to get tags for remote catalogs to allow maximum data to be returned
|
|
168
|
-
* @remarks MINIMUM_API_VERSION=7.
|
|
168
|
+
* @remarks MINIMUM_API_VERSION=6.7.0
|
|
169
169
|
* @param params.filter UID of song to fetch
|
|
170
170
|
* @see {@link https://ampache.org/api/api-json-methods#song_tags}
|
|
171
171
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
songTags(params: { filter: UID }) {
|
|
173
|
+
let query = "song_tags";
|
|
174
|
+
query += qs.stringify(params, "&");
|
|
175
|
+
return this.request(query); // TODO response type
|
|
176
|
+
}
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
179
|
* This takes a URL and returns the song object in question
|
package/src/system/index.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { LiveStreamsResponse } from "../live-streams/types";
|
|
|
22
22
|
import { LabelResponse, LabelsResponse } from "../labels/types";
|
|
23
23
|
import { GenreResponse, GenresResponse } from "../genres/types";
|
|
24
24
|
import { UserResponse, UsersResponse } from "../users/types";
|
|
25
|
-
import { IndexEntry, NowPlayingResponse } from "./types";
|
|
25
|
+
import { IndexEntry, NowPlayingResponse, RuleResponse } from "./types";
|
|
26
26
|
|
|
27
27
|
export class System extends Base {
|
|
28
28
|
/**
|
|
@@ -209,6 +209,7 @@ export class System extends Base {
|
|
|
209
209
|
catalog?: number;
|
|
210
210
|
add?: Date;
|
|
211
211
|
update?: Date;
|
|
212
|
+
cond?: string;
|
|
212
213
|
} & ExtendedPagination,
|
|
213
214
|
) {
|
|
214
215
|
let query = "browse";
|
|
@@ -637,6 +638,20 @@ export class System extends Base {
|
|
|
637
638
|
return this.request<{ now_playing: NowPlayingResponse[] }>(query);
|
|
638
639
|
}
|
|
639
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Print a list of valid search rules for your search type
|
|
643
|
+
* @remarks MINIMUM_API_VERSION=6.8.0
|
|
644
|
+
* @param params.filter Object type
|
|
645
|
+
* @see {@link https://ampache.org/api/api-json-methods#search_rules}
|
|
646
|
+
*/
|
|
647
|
+
searchRules(params: {
|
|
648
|
+
filter: "song" | "album" | "song_artist" | "album_artist" | "artist" | "label" | "playlist" | "podcast" | "podcast_episode" | "genre" | "user" | "video";
|
|
649
|
+
}) {
|
|
650
|
+
let query = "search_rules";
|
|
651
|
+
query += qs.stringify(params, "&");
|
|
652
|
+
return this.request<{ rule: RuleResponse[] }>(query);
|
|
653
|
+
}
|
|
654
|
+
|
|
640
655
|
/**
|
|
641
656
|
* Perform an advanced search given passed rules.
|
|
642
657
|
* You'll want to consult the docs for this.
|
package/src/system/types.ts
CHANGED