Hello everyone,
Hope you can lay some light on this problem I’m facing. I’m trying to fetch a list of users from Helix API that match the substring I’m passing to the API.
For example: If I want to find a user with a username ‘username’, I tried the following:
getManyUsers ( substring ) {
axios.get( API_URL + `users?limit=10&login=${ substring }` )
.then( ( response ) => {
console.log( response.data.data );
} ).catch( ( error ) => console.log( error ) );
}
// Using an incomplete, not exact username, throws an error:
getManyUsers( 'usern' );
// Using regular expressions also fails:
getManyUsers( /usern/ );
// Using asterix at the end or beggining also throws:
getManyUsers( *usern* );
This is what I thought to solve the problem, but neither of those happens to work…
Any clue?
Thank you very much.