@getanyapi/sdk 0.35.2 → 0.36.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.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -3
- package/dist/index.d.ts +14 -3
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -897,9 +897,22 @@ var AnyAPI = class {
|
|
|
897
897
|
);
|
|
898
898
|
return mapCatalogList(raw);
|
|
899
899
|
}
|
|
900
|
-
/**
|
|
900
|
+
/**
|
|
901
|
+
* Ranked catalog search. GET /catalog/search. Browse never accepts a query.
|
|
902
|
+
*
|
|
903
|
+
* The gateway needs at least one of query, category or platform, in any
|
|
904
|
+
* combination, so a scope with no query at all is a valid search. An absent or
|
|
905
|
+
* empty query omits `q` entirely, because an empty `q` is a different request.
|
|
906
|
+
*/
|
|
901
907
|
async search(options) {
|
|
902
|
-
|
|
908
|
+
if (!options.query && !options.category && !options.platform) {
|
|
909
|
+
throw new AnyAPIError(
|
|
910
|
+
"search needs at least one of query, category, or platform",
|
|
911
|
+
0
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
const search = new URLSearchParams();
|
|
915
|
+
if (options.query) search.set("q", options.query);
|
|
903
916
|
if (options.category) search.set("category", options.category);
|
|
904
917
|
if (options.platform) search.set("platform", options.platform);
|
|
905
918
|
if (options.limit !== void 0) search.set("limit", String(options.limit));
|
|
@@ -5981,7 +5994,7 @@ var TiktokNamespace = class {
|
|
|
5981
5994
|
*
|
|
5982
5995
|
* List recent TikTok videos for a hashtag (creator, caption, views, likes, shares).
|
|
5983
5996
|
*
|
|
5984
|
-
* Price: $0.
|
|
5997
|
+
* Price: $0.00144 per request.
|
|
5985
5998
|
*
|
|
5986
5999
|
* @example
|
|
5987
6000
|
* const res = await client.tiktok.hashtagVideos({ hashtag: "cooking", limit: 3 });
|