mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 10:53:24 +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:
@@ -143,11 +143,13 @@ export class RondevuOffers {
|
||||
async getTopics(options?: {
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
startsWith?: string;
|
||||
}): Promise<{
|
||||
topics: TopicInfo[];
|
||||
total: number;
|
||||
limit: number;
|
||||
offset: number;
|
||||
startsWith?: string;
|
||||
}> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
@@ -159,6 +161,10 @@ export class RondevuOffers {
|
||||
params.set('offset', options.offset.toString());
|
||||
}
|
||||
|
||||
if (options?.startsWith) {
|
||||
params.set('startsWith', options.startsWith);
|
||||
}
|
||||
|
||||
const url = `${this.baseUrl}/topics${
|
||||
params.toString() ? '?' + params.toString() : ''
|
||||
}`;
|
||||
|
||||
Reference in New Issue
Block a user