PHPackages                             llagerlof/moodlerest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. llagerlof/moodlerest

ActiveLibrary[API Development](/categories/api)

llagerlof/moodlerest
====================

MoodleRest is a PHP class to query Moodle REST webservices

2.4.0(5y ago)9374.9k↑86.8%20[1 PRs](https://github.com/llagerlof/MoodleRest/pulls)2MITPHP

Since Dec 20Pushed 2y ago7 watchersCompare

[ Source](https://github.com/llagerlof/MoodleRest)[ Packagist](https://packagist.org/packages/llagerlof/moodlerest)[ Docs](https://github.com/llagerlof)[ RSS](/packages/llagerlof-moodlerest/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (4)Used By (2)

MoodleRest
==========

[](#moodlerest)

MoodleRest is a PHP class to query Moodle REST webservices. You can make GET and POST requests.

Quick start
-----------

[](#quick-start)

Ensure you already have access to a Moodle webservice. To use this class you will need a token (generated by Moodle admin) with the necessary capabilities for the services you want to access.

**IMPORTANT**

If you need a detailed explanation about the **$parameters** format of the **request()** method, [read it in wiki](https://github.com/llagerlof/MoodleRest/wiki/Understanding-the-$parameters-in-request()-method).

To the code
-----------

[](#to-the-code)

**You have 2 options to add this lib to your project:**

**Option One:** Use Composer to include it in your project.

- Inside your project directory create or modify the file `composer.json`:

```
{
    "require": {
        "llagerlof/moodlerest": "2.4.0"
    }
}
```

- In the same directory of the `composer.json`, run:

```
$ composer install
```

- In your project, load the lib using composer autoloader:

```
