ClubService
Source: ClubService.ts:3
Service for managing clubs and their data.
Constructor
new ClubService(): ClubServiceInstance Methods
getAll(): Promise.<Array>
Get all clubs.
Returns
Promise.<Array>— Array of club objects
getById(clubId: string): Promise.<Object>
Get a club by its ID.
Parameters
clubId(string) — ID of the club
Returns
Promise.<Object>— Club object
findByName(name: string): Promise.<Array>
Find clubs by name.
Parameters
name(string) — Name of the club to search for
Returns
Promise.<Array>— Array of club objects
create(name: string, ownerId: string | null): Promise.<Object>
Create a new club.
Parameters
name(string) — Name of the club to createownerId(string | null, default: null) — ID of the owner
Returns
Promise.<Object>— Created club
update(clubId: string, data: Object): Promise.<Object>
Update a club's data.
Parameters
clubId(string) — ID of the club to updatedata(Object) — Data to update the club with
Returns
Promise.<Object>— Updated club
updateClubLogo(clubId: string, clubLogo: File): Promise.<Object>
Update a club's logo.
Parameters
clubId(string) — ID of the club to updateclubLogo(File) — Logo file to upload
Returns
Promise.<Object>— Response data
getClubLogo(clubId: string): Promise.<Blob>
Get a club's logo as a blob.
Parameters
clubId(string) — ID of the club
Returns
Promise.<Blob>— Club logo blob
deleteClubLogo(clubId: string): Promise.<Object>
Delete a club's logo.
Parameters
clubId(string) — ID of the club
Returns
Promise.<Object>— Response data
remove(clubId: string): Promise.<Object>
Remove a club by its ID.
Parameters
clubId(string) — ID of the club to remove
Returns
Promise.<Object>— Response data