Web Module
This modules contains every internal function related to the web (making web requests).
Documentation
Function documentation is using a specific syntax. More information here
tp.web.daily_quote()
Retrieves and parses the daily quote from the API https://api.quotable.io
tp.web.random_picture(size?: string, query?: string, include_size?: boolean)
Gets a random image from https://unsplash.com/
Arguments
-
include_size
: Optional argument to include the specified size in the image link markdown. Defaults to false -
query
: Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma,
-
size
: Image size in the format<width>x<height>
Examples
Web Daily quote:
<% tp.web.daily_quote() %>
Web Random picture:
<% tp.web.random_picture() %>
Web Random picture with size:
<% tp.web.random_picture("200x200") %>
Web random picture with size + query:
<% tp.web.random_picture("200x200", "landscape,water") %>