mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 02:43:25 +00:00
Add startsWith parameter to getTopics method
Added optional startsWith parameter to topics query: - Filters topics by prefix on the server side - Updated TypeScript types - Supports response with startsWith field Version bumped to 0.7.5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@xtr-dev/rondevu-client",
|
"name": "@xtr-dev/rondevu-client",
|
||||||
"version": "0.7.4",
|
"version": "0.7.5",
|
||||||
"description": "TypeScript client for Rondevu topic-based peer discovery and signaling server",
|
"description": "TypeScript client for Rondevu topic-based peer discovery and signaling server",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@@ -143,11 +143,13 @@ export class RondevuOffers {
|
|||||||
async getTopics(options?: {
|
async getTopics(options?: {
|
||||||
limit?: number;
|
limit?: number;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
|
startsWith?: string;
|
||||||
}): Promise<{
|
}): Promise<{
|
||||||
topics: TopicInfo[];
|
topics: TopicInfo[];
|
||||||
total: number;
|
total: number;
|
||||||
limit: number;
|
limit: number;
|
||||||
offset: number;
|
offset: number;
|
||||||
|
startsWith?: string;
|
||||||
}> {
|
}> {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
|
|
||||||
@@ -159,6 +161,10 @@ export class RondevuOffers {
|
|||||||
params.set('offset', options.offset.toString());
|
params.set('offset', options.offset.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options?.startsWith) {
|
||||||
|
params.set('startsWith', options.startsWith);
|
||||||
|
}
|
||||||
|
|
||||||
const url = `${this.baseUrl}/topics${
|
const url = `${this.baseUrl}/topics${
|
||||||
params.toString() ? '?' + params.toString() : ''
|
params.toString() ? '?' + params.toString() : ''
|
||||||
}`;
|
}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user