AnnouncementsFacet
Facet that lets read, create, update and delete announcements.
createAnnouncement
function createAnnouncement(string title, string content, string url, string img) external
Create a Party announcement
Managers are the only allowed to create announcements
Parameters
Name | Type | Description |
---|---|---|
title | string | Title of the announcement |
content | string | Content of the announcement |
url | string | Content URL added to the announcemnt |
img | string | Image uri of the announcement |
getAnnouncements
function getAnnouncements() external view returns (struct Announcement[])
Gets the Party announcements
Return Values
Name | Type | Description |
---|---|---|
[0] | struct Announcement[] | Array of Announcement structs |
getAnnouncement
function getAnnouncement(uint256 i) external view returns (struct Announcement)
Gets a single Party announcement
Parameters
Name | Type | Description |
---|---|---|
i | uint256 | Index of the announcement |
Return Values
Name | Type | Description |
---|---|---|
[0] | struct Announcement | Announcement struct |
editAnnouncement
function editAnnouncement(string title, string content, string url, string img, uint256 i) external
Edit a Party announcement
Managers are the only allowed to edit an announcement
Parameters
Name | Type | Description |
---|---|---|
title | string | Title of the announcement |
content | string | Content of the announcement |
url | string | Content URL added to the announcemnt |
img | string | Image uri of the announcement |
i | uint256 | Index of the announcement |
removeAnnouncement
function removeAnnouncement(uint256 i) external
Remove a Party announcement
Managers are the only allowed to remove an announcement
Parameters
Name | Type | Description |
---|---|---|
i | uint256 | Index of the announcement |