Load google-api-php-client as package |
[eluser]redcloud80[/eluser]
Hi! I'm trying to load google-api-php-client as a package into one of my controllers but there's something wrong that I'm unable to fix. Once downloaded this https://github.com/google/google-api-php-client I've copied the src/Google directory into CI third_party. Then inside my controller I try to load the Client.php file (which contains a Google_Client class) using this code Code: public function index() that returns this error "Unable to load the requested class: client" What's the missing block?
[eluser]Karman de Lange[/eluser]
Probably not the best way of doing it, but it works (well for me) Create new file under application/library called google.php Code: <?php Then to use: Code: $this->load->library('google');
[eluser]redcloud80[/eluser]
Thanks Karman! It works for me too. So there's no way to load this library directly as a package?
[eluser]Karman de Lange[/eluser]
Probably is, hopefully one of the clever people might chirp in ;-) L:
[eluser]redcloud80[/eluser]
[quote author="Karman de Lange" date="1387808901"]Probably is, hopefully one of the clever people might chirp in ;-) L:[/quote] Do you have any example about how to create an event on a given calendar? I'm using Google APIs Client Library for PHP 1.0 which has no useful examples :\
[eluser]Karman de Lange[/eluser]
[quote author="redcloud80" date="1387811563"][quote author="Karman de Lange" date="1387808901"]Probably is, hopefully one of the clever people might chirp in ;-) L:[/quote] Do you have any example about how to create an event on a given calendar? I'm using Google APIs Client Library for PHP 1.0 which has no useful examples :\[/quote] Actually never used the library, but have look for you tomorrow .. L:
[eluser]Tpojka[/eluser]
I think it is up to organiying files / folders. Reading docs, I think Client.php should be in folder Code: application/third_party/Google/library I am bit confused why don't file name and class name are not the same. But if Karman's solution works it is not main problem here. But there is risk of possible affection to other files so it should be organized accordingly eventually errors. ![]() |
Welcome Guest, Not a member yet? Register Sign In |