[moodle] / moodle / lib / googleapi.php Repository:

Diff of /moodle/lib/googleapi.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Mon Mar 9 00:53:11 2009 WST revision 1.7, Mon May 25 16:27:25 2009 WST

By samhemelryk:

lib MDL-19236 added phpdocs and copyrights

# Line 1  Line 1 
1  <?php // $Id$  <?php
2  /**  /**
3   * Moodle - Modular Object-Oriented Dynamic Learning Environment   * Moodle - Modular Object-Oriented Dynamic Learning Environment
4   *          http://moodle.org   *          http://moodle.org
# Line 17  Line 17 
17   * You should have received a copy of the GNU General Public License   * You should have received a copy of the GNU General Public License
18   * along with this program.  If not, see <http://www.gnu.org/licenses/>.   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19   *   *
20   * @package    moodle   * @package    moodlecore
21   * @subpackage lib   * @subpackage lib
22   * @author     Dan Poltawski <talktodan@gmail.com>   * @copyright Dan Poltawski <talktodan@gmail.com>
23   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24   *   *
25   * Simple implementation of some Google API functions for Moodle.   * Simple implementation of some Google API functions for Moodle.
26   */   */
27    
28     /** Include essential file */
29  require_once($CFG->libdir.'/filelib.php');  require_once($CFG->libdir.'/filelib.php');
30    
31  /**  /**
# Line 33  Line 34 
34   * Most Google API Calls required that requests are sent with an   * Most Google API Calls required that requests are sent with an
35   * Authorization header + token. This class extends the curl class   * Authorization header + token. This class extends the curl class
36   * to aid this   * to aid this
37     *
38     * @package    moodlecore
39     * @subpackage lib
40     * @copyright Dan Poltawski <talktodan@gmail.com>
41     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
42   */   */
43  abstract class google_auth_request extends curl{  abstract class google_auth_request extends curl{
44      protected $token = '';      protected $token = '';
# Line 78  Line 84 
84  /**  /**
85   * Used to uprade a google AuthSubRequest one-time token into   * Used to uprade a google AuthSubRequest one-time token into
86   * a session token which can be used long term.   * a session token which can be used long term.
87     *
88     * @package    moodlecore
89     * @subpackage lib
90     * @copyright Dan Poltawski <talktodan@gmail.com>
91     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
92   */   */
93  class google_authsub_request extends google_auth_request {  class google_authsub_request extends google_auth_request {
94      const AUTHSESSION_URL = 'https://www.google.com/accounts/AuthSubSessionToken';      const AUTHSESSION_URL = 'https://www.google.com/accounts/AuthSubSessionToken';
# Line 114  Line 125 
125    
126  /**  /**
127   * Allows http calls using google subauth authorisation   * Allows http calls using google subauth authorisation
128     *
129     * @package    moodlecore
130     * @subpackage lib
131     * @copyright Dan Poltawski <talktodan@gmail.com>
132     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
133   */   */
134  class google_authsub extends google_auth_request {  class google_authsub extends google_auth_request {
135      const LOGINAUTH_URL    = 'https://www.google.com/accounts/AuthSubRequest';      const LOGINAUTH_URL    = 'https://www.google.com/accounts/AuthSubRequest';
# Line 199  Line 215 
215  /**  /**
216   * Class for manipulating google documents through the google data api   * Class for manipulating google documents through the google data api
217   * Docs for this can be found here:   * Docs for this can be found here:
218   * http://code.google.com/apis/documents/docs/2.0/developers_guide_protocol.html   * {@link http://code.google.com/apis/documents/docs/2.0/developers_guide_protocol.html}
219     *
220     * @package    moodlecore
221     * @subpackage lib
222     * @copyright Dan Poltawski <talktodan@gmail.com>
223     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
224   */   */
225  class google_docs {  class google_docs {
226      // need both docs and the spreadsheets realm      // need both docs and the spreadsheets realm
# Line 320  Line 341 
341  /**  /**
342   * Class for manipulating picasa through the google data api   * Class for manipulating picasa through the google data api
343   * Docs for this can be found here:   * Docs for this can be found here:
344   * http://code.google.com/apis/picasaweb/developers_guide_protocol.html   * {@link http://code.google.com/apis/picasaweb/developers_guide_protocol.html}
345     *
346     * @package    moodlecore
347     * @subpackage lib
348     * @copyright Dan Poltawski <talktodan@gmail.com>
349     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
350   */   */
351  class google_picasa {  class google_picasa {
352      const REALM             = 'http://picasaweb.google.com/data/';      const REALM             = 'http://picasaweb.google.com/data/';
# Line 502  Line 528 
528  /**  /**
529   * Beginings of an implementation of Clientogin authenticaton for google   * Beginings of an implementation of Clientogin authenticaton for google
530   * accounts as documented here:   * accounts as documented here:
531   * http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#ClientLogin   * {@link http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#ClientLogin}
532   *   *
533   * With this authentication we have to accept a username and password and to post   * With this authentication we have to accept a username and password and to post
534   * it to google. Retrieving a token for use afterwards.   * it to google. Retrieving a token for use afterwards.
535     *
536     * @package    moodlecore
537     * @subpackage lib
538     * @copyright Dan Poltawski <talktodan@gmail.com>
539     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
540   */   */
541  class google_authclient extends google_auth_request {  class google_authclient extends google_auth_request {
542      const LOGIN_URL = 'https://www.google.com/accounts/ClientLogin';      const LOGIN_URL = 'https://www.google.com/accounts/ClientLogin';

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7