Tag: beta

TwitchPress Pro Beta 0.0.2

The professional edition of TwitchPress Beta can be downloaded from Patreon.com and Discord (backers only). The pro edition has changed in ways not everyone will see i.e. the code has evolved while I try different approaches used in the free edition and it should lead to better performance.

The freely downloadable plugin will continue to improve but my work will focus on performance and bugs with very little new features being added unless I’m paid to do so. The free edition will always have basic support with respect to the Twitch.tv and WordPress.org communities.

Request Beta 0.0.3

Already, version 0.0.3 offers something new in the form of a sensible shortcode. The sensibility of this shortcode comes from two factors. The first is that it has been designed in a generic way, where other shortcodes are very close to what has been requested by specific users. The new shortcode taps into an object of many values and makes each value available as an individual output. Rather than a design that includes difficult to customize output i.e. HTML is included that might not suit everyone’s needs.

The second factor relates to the fact that the new shortcode can be used many times on a single page, without making many calls to Twitch API. This is nothing special, I’ve not done anything technically clever and this type of shortcode is a natural approach within a plugin like this. What makes it interesting is how long it has taking for this to be done, simply because I’ve been wrapped up in finishing other things within the project and completing the features I was hired to create.

So now, we’ll begin to see a plugin that adds a wealth of content to pages. This will trickle down to the free edition just a little but the pro edition will offer far more.

Feel free to request 0.0.3 if you ever backed** the project.

* * All funds raised through Patreon.com or donations will be spent on the project and achieving a professional solution that can only be done with funding. This is not for-profit.

Sandbox-Mode

Sandbox-Mode

A recent bug with Ultimate Member roles reminded me how difficult it is to create Twitch subscriber based features without a channel that offers a subscription program to perform testing. The alternative is sandbox-mode which makes use of sample data from Twitch.tv and other sources, to behave as if API calls have been made.

Development Only

This feature is intended for developers during development of beta versions. A sandbox is an environment designed for practice, testing new code, and not for testing a live site. Never activate this mode on a live-site.

 

TwitchPress Sandbox Mode Active

Sandbox Generator

The Sandbox-mode Generator option allows the mode to generate random data, rather than simply using hardcoded values. This requires a developer to create a procedure that will generate seemingly valid values. This is done based on validation parameters that would normally be applied to each value of data. So in many cases, we wouldn’t be able to tell the difference. TwitchPress Sandbox Mode Generator

A generator procedure won’t always (or even often) simply create random values though. My initial need was to generate WP users, based on real Twitch channels and randomly generate subscription data for those users. So I require both real data (to ensure some real validation and real API calls work correctly) and randomly generated data for the purpose of testing new procedures i.e. a procedure that would otherwise need real visitors to register and use features. I can’t get enough people to do that, at the time I need them to and at a rate that is helpful to me while I watch the log. I created something that would be the next best thing.

Generator Off Option

When the Sandbox-Mode Generator box isn’t checked, TwitchPress will only use hardcoded data which involves manual entry and can be time-consuming. This is ideal for very precise tests, which are normally small anyway.

The generator is off by default and not every feature in the plugin will be supported due to the work involved.

False/Failed Returns Option

This option allows a little more natural behavior to be applied. A lot of functions won’t always return a full set of records or a response that we can do much with. A real response might include an error and contain very little data compared to a successful response.

TwitchPress Sandbox Mode False ReturnsIn some cases, it is entirely normal to get a short response i.e. when we query if someone is a subscriber to our own Twitch channel, but they aren’t. The Twitch API will respond with a very basic and small set of values when compared to a positive response which would tell us far more.

We need false/failed responses from the API to ensure the plugin handles them properly. So when in sandbox mode we need the same behavior. This means I have to make TwitchPress randomly switch between the data and the tester/developer will see a natural randomness during testing just as if they were processing many Twitch channels/users for real.

Help Maintain Test Data

The more test data the quicker we can fix any bugs that come up. This will be a simple task of copying and pasting samples from API documentation. If you know GitHub then this is a task you can get involved with. Just 30 minutes of your time, adding more sample data or just suggesting samples in the form of GitHub issues.

Here is an image of the sample data offered by Twitch.tv within developer documentation for their API.

Twitch Example API Response if user is subscribed to the channel