Announcement

Each announcement is accessed via /api/announcement and has the following properties. Complete details in AnnouncementProperties.

id

The unique id for this announcement. It will never change.

wing_object_type

announcement.

date_created

A date when the announcement was created.

date_updated

A date when the announcement was last updated.

user_id

The unique id of a user that this announcement belongs to.

name

The name or title of the announcement.

body

A text representation of the body. No HTML should be present here. URLs are allowed.

body_html

The rendered HTML version of the body.

Related Objects

user

The User that this announcement is controlled by.

Announcement Methods

The methods used to fetch and manipulate announcements.

Create Announcement

 POST /api/announcement
session_id

Required. The unique session id provided by a Session method.

name

Required.

user_id
body

Required.

Returns:

 {
   "id" : "xxx",
   "name" : "My Game Just Dropped",
   ...
 }

Update Announcement

 PUT /api/announcement/xxx

See Create Announcement for details.

Delete Announcement

 DELETE /api/announcement/xxx
session_id

Required. The unique session id provided by a Session method.

Returns:

 {
   "success" : 1
 }

Fetch Announcement

 GET /api/announcement/xxx
session_id

Optional. The unique session id provided by a Session method.

_include_relationships

Optional. See "Relationships" in Intro and Announcement Relationships above for details.

Returns:

 {
   "id" : "xxx",
   "name" : "My Game Just Dropped",
   ...
 }

List Announcements

 GET /api/announcement

The list is returned descending by date_created.

Returns:

 {
  ...,
  "items" : [
   {
    "id" : "xxx",
    "name" : "My Game Just Dropped",
    ...
   },
   ...
  ]
 }
^ Back to Top ^