iamstuartwilson / strava

PHP Class for the Strava API (v3)
MIT License
120 stars 26 forks source link

Requests not returning data? #3

Closed kicks66 closed 10 years ago

kicks66 commented 10 years ago

When using the PHP library for Strava it just returns the various input paramaters, and the data is not returned. How can you extract the data from the API?

iamstuartwilson commented 10 years ago

Hey @kicks66, can you show me a gist of the code you have?

kicks66 commented 10 years ago

Hey Stuart I am using:

$api->get( 'athlete', $accessToken );

Then print_r($api) to get the result. When I change the actual class itself to print out data when parseResponse() is called, i get the real data out (for example the atheletes data), but if I remove this, calling the above does not print out any actual data, instead just the query data.

Thanks Nick

On 6 October 2014 09:35, Stuart Wilson notifications@github.com wrote:

Hey @kicks66 https://github.com/kicks66, can you show me a gist of the code you have?

— Reply to this email directly or view it on GitHub https://github.com/iamstuartwilson/strava/issues/3#issuecomment-57988143 .

iamstuartwilson commented 10 years ago

Hi Nick,

Try this:

$athleteResponse = $api->get( 'athlete', $accessToken );
print_r($athleteResponse);
iamstuartwilson commented 10 years ago

Hopefully this is now resolved for you Nick.