Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
wikimedia Class Reference

Public Member Functions

 __construct ($url='')
 
 get_image_url ($titles)
 
 get_images_by_page ($title)
 
object get_thumb_url ($image_url, $orig_width, $orig_height, $thumb_width=75, $force=false)
 Generate thumbnail URL from image URL.
 
 login ($user, $pass)
 
 logout ()
 
 search_images ($keyword, $page=0, $params=array())
 Search for images and return photos array.
 

Protected Attributes

string $api
 API URL.
 
string $token
 token key.
 
string $userid
 user ID.
 
string $username
 username.
 

Member Function Documentation

◆ get_thumb_url()

object wikimedia::get_thumb_url ( $image_url,
$orig_width,
$orig_height,
$thumb_width = 75,
$force = false )

Generate thumbnail URL from image URL.

Parameters
string$image_url
int$orig_width
int$orig_height
int$thumb_width
bool$forceWhen true, forces the generation of a thumb URL. OUTPUT
Return values
string

◆ search_images()

wikimedia::search_images ( $keyword,
$page = 0,
$params = array() )

Search for images and return photos array.

Parameters
string$keyword
int$page
array$paramsadditional query params
Return values
array

The documentation for this class was generated from the following file: