Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | List of all members
google_picasa Class Reference

Class for manipulating picasa through the google data api. More...

Public Member Functions

 __construct (google_oauth $googleoauth)
 Constructor. More...
 
 do_photo_search ($query)
 Does text search on the users photos and returns matches in format for picasa api. More...
 
 get_album_photos ($albumid)
 Returns list of photos in album specified. More...
 
 get_albums ()
 Gets all the users albums and returns them as a list of folders for the file picker. More...
 
 get_file_list ($path='')
 Returns list of photos for file picker. More...
 
 get_last_album_name ()
 Returns the name of the album for which get_photo_details was called last time. More...
 
 get_photo_details ($rawxml)
 Recieves XML from a picasa list of photos and returns array in format for file picker. More...
 
 send_file ($file)
 Sends a file object to picasaweb. More...
 

Public Attributes

string const ALBUM_PHOTO_LIST = 'https://picasaweb.google.com/data/feed/api/user/default/albumid/'
 photo list url
 
string const LIST_ALBUMS_URL = 'https://picasaweb.google.com/data/feed/api/user/default'
 album list url
 
string const MANAGE_URL = 'http://picasaweb.google.com/'
 manage files url
 
string const PHOTO_SEARCH_URL = 'https://picasaweb.google.com/data/feed/api/user/default?kind=photo&q='
 search url
 
string const REALM = 'http://picasaweb.google.com/data/'
 Realm for authentication.
 
string const UPLOAD_LOCATION = 'https://picasaweb.google.com/data/feed/api/user/default/albumid/default'
 Upload url.
 

Detailed Description

Class for manipulating picasa through the google data api.

Docs for this can be found here:

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

google_picasa::__construct ( google_oauth  $googleoauth)

Constructor.

Parameters
google_oauth$googleoauthoauth curl class for making authenticated requests

Member Function Documentation

◆ do_photo_search()

google_picasa::do_photo_search (   $query)

Does text search on the users photos and returns matches in format for picasa api.

Parameters
string$querySearch terms
Return values
mixed::$filesA list of files for the file picker

◆ get_album_photos()

google_picasa::get_album_photos (   $albumid)

Returns list of photos in album specified.

Parameters
int$albumidPhoto album to list photos from
Return values
mixed::$filesA list of files for the file picker

◆ get_albums()

google_picasa::get_albums ( )

Gets all the users albums and returns them as a list of folders for the file picker.

Return values
mixes::$filesArray in the format get_listing uses for folders

◆ get_file_list()

google_picasa::get_file_list (   $path = '')

Returns list of photos for file picker.

If top level then returns list of albums, otherwise photos within an album.

Parameters
string$pathThe path to files (assumed to be albumid)
Return values
mixed::$filesA list of files for the file picker

◆ get_last_album_name()

google_picasa::get_last_album_name ( )

Returns the name of the album for which get_photo_details was called last time.

Return values
string

◆ get_photo_details()

google_picasa::get_photo_details (   $rawxml)

Recieves XML from a picasa list of photos and returns array in format for file picker.

Parameters
string$rawxmlXML from picasa api
Return values
mixed::$filesA list of files for the file picker

◆ send_file()

google_picasa::send_file (   $file)

Sends a file object to picasaweb.

Parameters
object$fileFile object
Return values
booleanTrue on success

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