schoology / schoology_php_sdk

PHP SDK for making requests against the Schoology API
19 stars 13 forks source link

can you make schoology php sdk available as a composer package? #13

Open danhammari opened 4 years ago

danhammari commented 4 years ago

I use composer (https://getcomposer.org/) and its autoload libraries with my php projects, and would like to import the schoology_php_sdk library through composer. Could you register this library with composer to make it easy to import it into php projects?

danatemple commented 4 years ago

Yes, this would be a really good idea.

d4mation commented 3 years ago

While this is a pretty hacky workaround, something like this could be used to pull in the code via Composer:

{
    "name": "your-package-name",
    "type": "multimedia",
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "schoology/schoology_php_sdk",
                "version": "1.0.0",
                "source": {
                    "url": "https://github.com/schoology/schoology_php_sdk",
                    "type": "git",
                    "reference": "ca91e6d68b8f5de0fe4b64f19d8f9109e78cdaa4"
                },
                "autoload": {
                    "files": [
                        "SchoologyContentAPI.class.php"
                    ]
                }
            }
        }
    ],
    "require": {
        "schoology/schoology_php_sdk": "1.0.*"
    }
}

./SchoologyContentAPI.class.php has require_once calls to include all the other files, so only that one needs to be loaded.