Weather API examples & templates
Use these vals as a playground to view and fork Weather API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
roramigator
lootGenAPI
HTTP
Loot Generator API How It Works Components The Loot Generator API creates random loot items by combining: 30 adjectives 29 materials 15 item types resulting in 13,050 possible items. Legendary Items Occasionally, a rare legendary item is generated. An item becomes legendary if all three components are rare. Rarity is determined by a threshold: Threshold = max(1,⌊log(length)×0.6⌋) Probability of a legendary item with the default settings: P(Legendary) = 1/13,050 ≈ 0.00766% Only one legendary item is possible: ✨💎 Arcane Diamond Rock . Customization You can expand the lists or adjust the 0.6 multiplier to control rarity.
1
maxm
openAIStreaming
HTTP
OpenAI Streaming - Assistant and Threads An example of using OpenAI to stream back a chat with an assistant. This example sends two messages to the assistant and streams back the responses when they come in. Example response: user > What should I build today?
................
assistant > Here are a few fun Val ideas you could build on Val Town:
1. **Random Joke Generator:** Fetch a random joke from an API and display it.
2. **Daily Weather Update:** Pull weather data for your location using an API and create a daily summary.
3. **Mini Todo List:** Create a simple to-do list app with add, edit, and delete functionalities.
4. **Chuck Norris Facts:** Display a random Chuck Norris fact sourced from an API.
5. **Motivational Quote of the Day:** Fetch and display a random motivational quote each day.
Which one sounds interesting to you?
user > Cool idea, can you make it even cooler?
...................
assistant > Sure, let's add some extra flair to make it even cooler!
How about creating a **Motivational Quote of the Day** app with these features:
1. **Random Color Theme:** Each day, the background color/theme changes randomly.
2. **Quote Sharing:** Add an option to share the quote on social media.
3. **Daily Notifications:** Send a daily notification with the quote of the day.
4. **User Preferences:** Allow users to choose categories (e.g., success, happiness, perseverance) for the quotes they receive.
Would you like some code snippets or guidance on implementing any of these features?
0