Schlagwort: stickers

  • 10,000 sticker pack giveaway

    10,000 sticker pack giveaway

    Reading Time: 2 minutes

    UPDATE: all 10,000 sticker packs have now been claimed. We honestly didn’t think these would go so quickly. If you’re in a different time zone to us and reading this later during your day, we’re sorry you missed out. We’ll see whether we can run another giveaway in the future at a time that’s better suited for community members in other time zones.

    Would you like a Raspberry Pi sticker pack? We’re giving away a whopping 10,000 sticker packs to the first 10,000 people who fill in the form at the bottom of this post.

    But before you do that, please read the following guidelines.

    Giveaway guidelines

    Please:

    • Only fill in the form once, to give as many people as possible the chance to get their hands on a sticker pack. We will ignore duplicate entries.
    • Fill in all the boxes, otherwise we may not be able to get your sticker pack to you.
    • Include your email address so we can follow up with you if we encounter issues with postage. We won’t use your email address for any other reason.
    • Include a postal address you will have access to for at least the next two months, since it may take up to two months for the sticker pack to reach you.
    • All entries must be submitted by 1 September 2019.

    We’ll only use your details for this giveaway. All data you enter into the form will be permanently deleted after two months.

    It may take until 15 October for your sticker pack to reach you. Please do not contact us before that date to enquire about your stickers.

    Website: LINK

  • Win some Raspberry Pi stickers #GimmeRaspberryPiStickers

    Win some Raspberry Pi stickers #GimmeRaspberryPiStickers

    Reading Time: < 1 minute

    To celebrate the launch of Raspberry Pi 4, and because it’s almost the weekend, we’re giving away some sticker packs!

    For your chance to win a pack, all you have to do is leave a comment below, or comment on the Facebook post about this give-away, or tweet us with the hashtag #GimmeRaspberryPiStickers — all before midnight (BST) Monday 8 July.

    Each sticker pack will contain the following stickers, plus any others I find between now and Monday, and we have 10 packs to give away.

    Winners will be picked at random, and I’ll tweet who these lucky ten are on Tuesday, so keep your eyes peeled.

    Good luck!

    Oh, if you don’t see your comment on this post, it’s because you’re new to the blog and we haven’t approved it yet. Don’t worry, it’s there, and we’ll see it before the contest ends.

    Website: LINK

  • Building a Live Stream Feed for Twitch Extensions

    Building a Live Stream Feed for Twitch Extensions

    Reading Time: 6 minutes

    Notify your Discord and website when streamers go live with your Extension!

    This is a guest post by Matt Condon (Thanks, Matt! 👋), one half of the two-person team at dot that builds the Stickers Extension.

    The Stickers Extension turns any stream into a canvas for viewers where viewers receive rare digital stickers that they place on-stream for everyone to see in real-time. Each time a viewer places a sticker on-stream, every viewer sees it for a few seconds and the Extension gives the placer a shout-out in chat. Subscribers can claim a free sticker ticket every week, and since each sticker is a scarce, unique item, stickers placed on a stream are now owned by the streamer, who can spread the love to other channels.

    Recently, as part of the Stickers website and Discord, we added a live feed of channels that are streaming with the Stickers Extension enabled. With live channels on the Stickers website, prospective streamers can easily see Stickers live on an active streamer’s channel, helping them understand how it will look on their own channel and affect their viewers. Plus, with the live feed in Discord, chatters see when a new streamer goes live, as social proof that the Stickers Extension is being used across Twitch.

    We have so many live streamer notifications that I’m tempted to mute the channel, but I love knowing when a new streamer joins the Sticker fam.

    The stickers website with a list of live channels in the footer.
    The Stickers Bot posting a live notification for FluxFer in the #live-with-stickers channel in the Stickers Discord.

    We’ll show you how to build a feed of live channels for your own Extension and how to integrate it into your own Discord channel and website. We’ll assume basic knowledge of Lambda and basic understanding of how to use databases like DynamoDB, but you can use the technique here with any technology stack you choose.

    How the Live Channel Feed Works

    The live channel feed consists of two separate outputs:

    1. A list of all of the currently active channels in order to display them on the website.
    2. A feed of new channels going live in order to post messages in the Discord.

    The Twitch Extension API provides the useful endpoint live_activated_channels which returns a paginated list of channels that are live with your Extension activated. We’ll periodically ask Twitch for a list of live activated channels and then do our own processing to create a list of channels and a feed of newly live channels. Note that streamers will take a few minutes to show up in the list provided by this endpoint, so if you’re looking for by-the-second updates on when streamers go live, read the Twitch documentation–specifically the Webhook support via stream_changed.

    Backend Architecture

    At dot we rely heavily on AWS, among others, for our backend infrastructure — Stickers is a real-time serverless application that has run with 100 percent uptime over the last two months.

    We leverage AWS’s serverless-friendly products like Lambda, DynamoDB, AppSync, and CloudWatch in particular to drive the live feed.

    The backend architecture of our live channel feed, described in detail below.
    1. Every 10 minutes, a CloudWatch Rule invokes a sync_live_channels Lambda function which queries the Twitch Extension API for live activated channels — paging through the returned pages — and stores the results in a DynamoDB table called live-channels.
    2. The live-channels table has an item TTL of 15 minutes, so stale items are removed 15 minutes after insertion. This keeps the list of live channels fresh — streams that go offline will be removed within 15 minutes.
    3. To get a list of channels, the get_live_channels Lambda function runs a DynamoDB query against the live-channels table’s by_view_count index — sorted by a streamer’s view_count — and returns that list to the caller.
    4. To produce a list of newly live channels, the DynamoDB Stream from live-channels is forwarded to a Lambda consumer called notify_live_channels which then posts a message to Discord using their webhooks API.

    Let’s break some of those steps down with some code examples! These examples are in TypeScript, a typed superset of JavaScript that JS developers should feel at home reading.

    The sync_live_channels Lambda function

    The sync_live_channels Lambda function is responsible for pulling the list of live channels from Twitch and storing them in our DynamoDB table.

    Here we can see some pseudocode for querying the Twitch API and storing the results in our live-channels DynamoDB table. At the moment, there’s a bug in the API response: occasionally, you’ll receive a response with an empty list of channels but still receive a cursor for the next page. Once you query that cursor again, Twitch will return the next page of live activated channels to you, so your code must be able to handle the case where no channels are returned in the response, but a cursor still provides another page. The TwitchAPI team is aware of this minor issue, though it’s always advisable to check your data!

    The notify_live_channels Lambda function

    This Lambda function is subscribed to DynamoDB Stream events from our live-channel table, so it gets invoked when items are added. This Lambda’s job is to take the new stream, combine it with other information we know about the streamer — using the Twitch API — and publish that information to our Discord channel.

    Notice how we use the Twitch brand purple — encoded in decimal — as the color for our Discord embed; that’s what gives us the pretty purple border to the left of Discord messages! Also notice that we restrict Discord notifications to streamers with at least 5,000 total views on their channel; this helps us avoid spam from accounts with low view counts that may install the Extension.

    To get a Discord Webhook, set up a webhook in the channel you’d like messages to appear.

    Configuring a Discord webhook for the #live-with-stickers channel in the Stickers Discord.

    And then enjoy the result!

    A notification for CrazeG4 going live with Stickers.

    The get_live_channels Lambda function

    This Lambda function is in charge of querying the currently live channels and returning that to the caller. In a production application, you would expose this with an API Gateway route or an AppSync resolver and cache the result.

    This Lambda function queries the DynamoDB index for the top 20 live channels ordered by their view_count, merges that data with extra information about the streamer we know, like their profile_image_url and login, and returns the bundle of data to the caller.

    On the frontend, we can build our UI with the following elements:

    • the streamer’s profile_image_url
    • a recent frame from their stream, which is provided via thumbnail_url in the /helix/streams endpoint, and adding our dimensions of 256x144
    • a link to their Twitch channel like https://twitch.tv/{login}

    That’s All, Folks

    To check out this feed in action, visit stickersbydot.com or join the Stickers Discord.

    For more information on Extensions, visit dev.twitch.tv/build or join the TwitchDev Community Discord.

    Website: LINK