Search...
listBadges( )
Lists the badges.
Description
The listBadges
function returns a Promise that resolves when the badges are retrieved. Retrieves up to 1000 badges, given the requested paging. Default paging.limit is 100, paging.offset - 0.
Syntax
function listBadges(options: ListBadgesOptions): Promise<ListBadgesResponse>
listBadges Parameters
NAME
TYPE
DESCRIPTION
options
Optional
ListBadgesOptions
Returns
Return Type:
Promise<
ListBadgesResponse
>NAME
TYPE
DESCRIPTION
badges
Array<
Badge
>List of badges.
metadata
PagingMetadata
Metadata for the paginated results.
Was this helpful?
listBadges example
Copy Code
1import { badges } from 'wix-members.v2';23 async function listBadges(options) {4 try {5 const result = await badges.listBadges(options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13