Search code examples
phpcomposer-phpgoogle-api-php-client

Use Google PHP API without including whole package


I want to be able to use the Google API with PHP, but I don't want to have to include all 23MB and 8,000+ files. I only really need the Sheets and Drive functionality (for now), but autoload seems to insist I include everything.

Because of what I'm using it for, running Composer I think isn't feasible and I've never managed to get composer working with XAMPP anyway.

Help appreciated.


Solution

  • Check your directory structure you should have something like "Google/Service" look inside. There is a class for each of the Google APIs. Unless you are using every single one of the Google APIs you dont need all of these files. You can remove all but the one API you are going to be using.

    That is the extent of what files you can safely remove everything else is needed.