DeniDianNurchayo / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Fatal error: Class 'apiAnalyticsService' not found #196

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. 
https://developers.google.com/analytics/resources/tutorials/hello-analytics-api

What is the expected output? What do you see instead?
expected output should be the one stated at the tutorial

What version of the product are you using? On what operating system?
I am using google-api-php-client-0.5.0.

Original issue reported on code.google.com by sixtysec...@gmail.com on 27 Sep 2012 at 6:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I had the same problem.

The solution is actually quite simple; in the getting started guide for PHP 
they tell you to place these tzo lines in your code:

require_once "google-api-php-client/src/apiClient.php";
require_once "google-api-php-client/src/contrib/apiPlusService.php";

If oyu open up the src/contrib folder you'll see there's a file 
apiAnalyticsService.php. Add a require_once line for that one too, like so:

require_once "google-api-php-client/src/contrib/apiAnalyticsService.php";

Then it'll work.

Original comment by tizi...@thedefectors.com.au on 3 Oct 2012 at 7:06

GoogleCodeExporter commented 8 years ago
There is no apiAnalyticsService.php file in the most recent library. Has the 
name been changed?

Original comment by dan...@youngfolksconsulting.com on 21 Oct 2012 at 6:17

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I think it is Google_AnalyticsService.php now. Take a look in the file, the 
function names seem to be changed too - I think they added Google_ in front of 
all names.

Original comment by tizi...@thedefectors.com.au on 21 Oct 2012 at 10:52

GoogleCodeExporter commented 8 years ago
And neglected to update their own documentation/usage guides? Not even a 
mention of the code being changed compared to the docs? Thanks, Google!

Original comment by mykelsca...@gmail.com on 23 Nov 2012 at 4:57

GoogleCodeExporter commented 8 years ago
to be sure, they renamed all files from apiSOMETHING to Google_SOMETHING ... 
with this pattern everything works just fine.... :)

Original comment by i...@realhit.cz on 18 Dec 2012 at 2:08

GoogleCodeExporter commented 8 years ago
Dear Google,
Update your documentation! How are people suppose to learn how to use your 
tools when your own docs are out of date and full of errors. 

Original comment by kander...@searchtoppers.com on 22 Jan 2013 at 4:51

GoogleCodeExporter commented 8 years ago

Original comment by ianbar...@google.com on 22 Mar 2013 at 3:40

GoogleCodeExporter commented 8 years ago
Change the code from 'apiAnalyticsService' to 'Google_AnalyticsService'. It 
just wokrs fine.

Original comment by ja...@linedmedia.com.au on 21 Jun 2013 at 6:34

GoogleCodeExporter commented 8 years ago
Yeah this is sloppy by Google

Original comment by cod...@googlemail.com on 31 Jan 2014 at 10:16

GoogleCodeExporter commented 8 years ago
Dear Google,

I wasted hours using this tutorial that does not work!
https://developers.google.com/analytics/solutions/articles/hello-analytics-api

How can developers learn how to use your tools properly with outdated 
documentation?

Change the code from 'apiAnalyticsService' to 'Google_AnalyticsService'. It 
just works fine.

Original comment by j...@lesite.ca on 19 Feb 2014 at 9:44

GoogleCodeExporter commented 8 years ago
Hey guys,

Its no longer Google_Analtyics_Service 

Its NOW Google_Service_Analytics

GET YOU SH*T SORTED GOOGLE, DONT RELEASE IT UNLESS YOU HAVE UPDATED YOUR 
DOCUMENTATION. You're wasting developers time to figure out your sloppy 
documentation upkeep!!!!!

Original comment by dakin...@gmail.com on 24 May 2014 at 3:04

GoogleCodeExporter commented 8 years ago
Brilliant.  I can confirm that the above answer does now work.

FFS google, sort it out!

Original comment by goo...@blinkio.co.uk on 20 Jun 2014 at 5:22

GoogleCodeExporter commented 8 years ago
Agreed.  Ubeliveable that there is not even a note on tutorial saying it is 
broken for latest API version.  No respect for other's time.

Original comment by jerrygar...@gmail.com on 17 Oct 2014 at 8:40