In trying to follow the Hello Analytics API (https://developers.google.com/analytics/solutions/articles/hello-analytics-api) I have found many issues. I have downloaded it off github as described. The problem is: The API comes with errors itself. Firstly it has many internal (files from within the api to other files within the api) link errors. It does not link correctly to its other files. I was able to fix this
But, some functions that the class in the API provides are incorrect as well. There are errors that exist within the php files the api provides. Such as :
Call to undefined method Google_Http_Request::getItems().
This is due to a incorrect return type
In conclusion the API comes with errors within itself! How has anyone been able to use this API if it causes errors before it can even execute?
Did i download it from the correct location? (https://github.com/google/google-api-php-client)
Is there something causing an error with my server?
I dont understand how the API has errors by itself
Any help would be greatly appreciated.
I had the same problem.
The reason is that the function getItems return bad type in case it fails (http instead of list).
Related
I am having trouble with several php files.
The problem is when I try to access my WebApp in said php files it results in a 503 error. Both files have API calls to different services that have worked perfectly until yesterday. When I remove the API call from the code the WebApp opens with no problem. I called both API services and they are both getting the API requests made from my server with no problem.
I've already exhausted all options to fix this error but came up with no results.
Any help is valid.
Thank you so much.
I've tried to change PHP version, but as I said there is no problem with PHP. Removing the API call makes the webapp function normally.
I've written some API code for a project of mine, on my local machine (Wampserver), there's no problem sending custom request methods, and the stack handles them the same as GET and POST.
In Cloud9, however, all the basic methods go to the application bootstrap (a PHP file), but custom method names, for example "GENERATE", which I totally made-up, is stopped before the PHP bootstrapper with the following message: "Something went wrong! Server timed out or sent incomplete response" with error code 502.
I attempted to investigate and fix it myself, but couldn't. I don't even know which behaviour (Wampserver or Cloud9) is the default expected behaviour.
Can anyone help? How do I tell Cloud9 instances to handle custom methods the same as regular ones?
I'm working on using the Etsy API and have been trying to complete this online tutorial but haven't been able to load any of the data successfully:
http://www.onextrapixel.com/2012/10/01/custom-products-webpage-layout-via-the-etsy-api/
When I load the page, it creates the cache file but the page is blank.
This is my first venture into APIs and I'm not sure how to troubleshoot what the problem might be. It seems like all of the code with loading it into the PHP webpage should work ok.
I've read about a few issues people have had using the Etsy API beacuse of the json cross-domain policy, so I'm wondering if that might be the issue, or if there might be authentication that is required.
I created a pastebin of the code from the tutorial here:
http://pastebin.com/RVDzjG4B
After checking the docs and the API, I got this.
API requests must be made over HTTPS.
Change your links to use https://.
I'm trying to get Gracenote APi to work on my site. I got it working some months back but never went any further. I am using the same credintials that used back then when it worked and the php gracnote class from Rich Adams on github. I am trying to get the example file to work but am recieving this error.
Fatal error: Undefined class constant 'HTTP_RESPONSE_ERROR' in C:\wamp\www\Interface\php-gracenote-master\php-gracenote\HTTP.class.php on line 113
This is on my localhost atm. I tried it on my server aswell and it threw the same error.
I have made another app on Gracenote thinking they may have blocked the old one but that didn't help. Does gracenote block the entire account if it isn't active for some months or I am I just been a tool and missing something here?
EDIT
The issue seems to be when trying to register for a user id
This is caused when cURL returns an error code when trying to make the request to Gracenote's servers.
There was a bug in php-gracenote where HTTP_RESPONSE_ERROR wasn't defined, which is why you didn't get a human-friendly error message. I've just updated the code on GitHub, so you'll actually get a proper error now.
The exception will give you the cURL error code that was returned, which you can lookup in the libcurl error codes to see what the problem is. Could be anything from a DNS issue to an incorrect SSL version.
As far as I'm aware, Gracenote doesn't deactivate accounts for inactivity on the developer program. This may change in future though.
im trying to access a php rest service on a different server with silverlight, but everytime i do the
request.EndGetResponse(ar) as HttpWebResponse;
it throws a SecurityException any idea how i can fix this?
Take a look at the URL Access Restrictions in Silverlight:
Also try adding the <allow-from http-request-headers="*"> statement in the clientaccesspolicy.xml on the php site.
When in doubt, run fiddler so you can see the exact sequence of web calls.