There’s the documentation on publish/subscribe to begin with.
This has helped me in the beginning: Tutorial: Getting Started with Spark.publish()
Using javascript, you don’t get that return page, much cleaner. Why bother with such an elaborate interface for something seemingly so simple? You could just have some physical buttons, or a dial to select the type of waste.