Beamable SDK
Public Member Functions | Public Attributes | List of all members
Beamable.Common.Api.Announcements.AnnouncementView Class Reference

The AnnouncementView is the network response from the Beamable Announcement API. It contains details describing the current state of a particular announcement. More...

Inheritance diagram for Beamable.Common.Api.Announcements.AnnouncementView:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Common.Api.Announcements.AnnouncementView:
Collaboration graph
[legend]

Public Member Functions

bool HasClaimsAvailable ()
 Announcements can have rewards that the player can claim. This method will tell you if there are pending rewards to claim. The value of isClaimed may be false, even if there are no rewards anyway. More...
 

Public Attributes

string id
 The runtime id of the announcement. This is not guaranteed to be the same as the content's id that spawned the announcement.
 
string channel
 The name of the inbox that the announcement should be categorized with. The value can be whatever you'd like. Common usages could be, "Primary", "Advertising", "Seasonal", etc.
 
string startDate
 Announcements can have an optional startDate endDate. If the current time is before the start date, or after the end date, then the announcement won't be visible to the player. If there is no start date, then this value will be null.
 
string endDate
 Announcements can have an optional startDate endDate. If the current time is before the start date, or after the end date, then the announcement won't be visible to the player. If there is no end date, then this value will be null.
 
long secondsRemaining
 Announcements can have an endDate, after which the announcement will no longer be visible. The secondsRemaining is the number of seconds before the endDate, as evaluated when this AnnouncementView instances was received. This value will not update in real time. If there is no endDate, then this value will be 0, the default(long)
 
DateTime endDateTime
 Announcements can have an optional startDate endDate. If the current time is before the start date, or after the end date, then the announcement won't be visible to the player. If there is no end date, then this value will be the default(DateTime)
 
string title
 Every announcement must have a title. This is similar to the subject line of an email.
 
string summary
 Every announcement must have a brief summary. This can be used to provide some flavor text of the announcement before the player decides to read the announcement.
 
string body
 Every announcement must have a body. This body is a plain string, but can be evaluated however you like. The body is where the main content of the announcement should be.
 
List< AnnouncementAttachmentattachments
 An announcement can have rewards that the player can claim with the IAnnouncementsApi.Claim(string) method. This list of AnnouncementAttachment is a set of rewards that the player will get when they claim the announcement. The contents of this field align with the values of the AnnouncementContent.attachments field. Be careful! Player rewards can also exist in the gift field. In the future, this field will be deprecated in favor of the gift field.
 
AnnouncementPlayerRewards gift
 An announcement cna have rewards that the player can claim with the IAnnouncementsApi.Claim(string) method. The AnnouncementPlayerRewards is the set of rewards that the player will get when they claim the announcement. The contents of this field align with the values of the AnnouncementContent.gift field. Be careful! Player rewards can also exist in the attachments field. In the future, this field will replace the attachments field entirely.
 
bool isRead
 You can mark an announcement as "read" so that it doesn't appear as "new" for the player. This field shows if the announcement has been read. You can mark an announcement as read with the IAnnouncementsApi.MarkRead(string) method.
 
bool isClaimed
 Announcements can have rewards that the player can claim. If the player has already claimed the rewards for the announcement, this field will be true. You can claim the rewards for an announcement with the IAnnouncementsApi.Claim(string) method. More...
 
- Public Attributes inherited from Beamable.Common.Api.CometClientData
CometClientDataEntry[] clientDataList
 

Additional Inherited Members

- Properties inherited from Beamable.Common.Api.CometClientData
Dictionary< string, string > ClientData [get]
 Produce a dictionary of client data from the serialized clientDataList
 
string this[string key] [get]
 Look up a client data property by key. This will try to get the given key from the ClientData dictionary. More...
 

Detailed Description

The AnnouncementView is the network response from the Beamable Announcement API. It contains details describing the current state of a particular announcement.

Member Function Documentation

◆ HasClaimsAvailable()

bool Beamable.Common.Api.Announcements.AnnouncementView.HasClaimsAvailable ( )
inline

Announcements can have rewards that the player can claim. This method will tell you if there are pending rewards to claim. The value of isClaimed may be false, even if there are no rewards anyway.

Returns
true if there are available rewards, and the player hasn't already claimed them; false otherwise

Member Data Documentation

◆ isClaimed

bool Beamable.Common.Api.Announcements.AnnouncementView.isClaimed

Announcements can have rewards that the player can claim. If the player has already claimed the rewards for the announcement, this field will be true. You can claim the rewards for an announcement with the IAnnouncementsApi.Claim(string) method.

Also see the HasClaimsAvailable method.


The documentation for this class was generated from the following file: