Methods
create(name) → {Promise.<Object>}
Create a new club.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | Name of the club to create |
- Source
Returns:
Created club
- Type:
- Promise.<Object>
deleteClubLogo(clubId) → {Promise.<Object>}
Delete a club's logo.
Parameters:
| Name | Type | Description |
|---|---|---|
clubId | string | ID of the club |
- Source
Returns:
Response data
- Type:
- Promise.<Object>
findByName(name) → {Promise.<Array>}
Find clubs by name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | Name of the club to search for |
- Source
Returns:
Array of club objects
- Type:
- Promise.<Array>
getAll() → {Promise.<Array>}
Get all clubs.
- Source
Returns:
Array of club objects
- Type:
- Promise.<Array>
getById(clubId) → {Promise.<Object>}
Get a club by its ID.
Parameters:
| Name | Type | Description |
|---|---|---|
clubId | string | ID of the club |
- Source
Returns:
Club object
- Type:
- Promise.<Object>
getClubLogo(clubId) → {Promise.<Blob>}
Get a club's logo as a blob.
Parameters:
| Name | Type | Description |
|---|---|---|
clubId | string | ID of the club |
- Source
Returns:
Club logo blob
- Type:
- Promise.<Blob>
remove(clubId) → {Promise.<Object>}
Remove a club by its ID.
Parameters:
| Name | Type | Description |
|---|---|---|
clubId | string | ID of the club to remove |
- Source
Returns:
Response data
- Type:
- Promise.<Object>
update(clubId, data) → {Promise.<Object>}
Update a club's data.
Parameters:
| Name | Type | Description |
|---|---|---|
clubId | string | ID of the club to update |
data | Object | Data to update the club with |
- Source
Returns:
Updated club
- Type:
- Promise.<Object>
updateClubLogo(clubId, clubLogo) → {Promise.<Object>}
Update a club's logo.
Parameters:
| Name | Type | Description |
|---|---|---|
clubId | string | ID of the club to update |
clubLogo | File | Logo file to upload |
- Source
Returns:
Response data
- Type:
- Promise.<Object>