Fires whenever a channel publishes a tier on GameWisp
Using Socket.IO this benefit can be listened to as follows:
socket.on('tier-published', function(data){
//Do stuff.
});
The tier published event is fired whenever a channel publishes a subscriber tier. The tier may be new, or it may a tier that was unpublished and then published again by the channel. The JSON structure of the event is as follows:
{
event: "tier-published",
channel_id: "channel-id",
channel: {
names: {
gamewisp: "GameWisp channel name",
twitch: "twitch channel name",
youtube: "youtube channel name"
},
ids: {
gamewisp: "channel identifier",
twitch: "12312312q",
youtube: "UCiqp4J8asdkssssssssdfae"
}
},
data: {
id: "12345",
title: "Tier Title",
level: "1",
cost: "4.00",
description: "Tier description.",
published: true,
subscribers: 0,
benefits: [
{
id: "3",
delivery: "delivery-messaging",
title: "Subscriber Messaging",
description: "Receive Subscriber-only messages from me.",
channel_data: null,
type: "unknown-type",
month_delay: null,
recurring: false,
recurring_input: false,
receieve_immediately: false,
removed_at: null,
subscriber_limit: null,
tier_bonus: false,
quantity: 1,
multiplier: 1
},
//...
]
}
}
The tier-published event contains the following data Object:
Property | Type | Description |
---|---|---|
id | Integer | The unique identifier of the tier. |
title | String | The title of the tier. |
level | Integer | The level of the tier. Minimum: 1, Maximum:6. This value is null for Twitch tiers. |
cost | String formatted USD amount. | The cost of the tier. |
description | String | The text description of the tier. |
published | Boolean | The published state of the tier. |
subscribers | Integer | The count of subscribers currently in the tier. |
benefits | Array | An array of benefits contained in the tier. |
Published tiers can be seen on a channel’s GameWisp page. Subscribers can only be granted benefits from published tiers. However, if a subscriber has benefits for a tier that a channel later sets to unpublished, the subscriber still has access to those benefits since they were in a published tier at the time of subscription. Recurring benefits from an unpublished tier will not recur.