Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem / help #10

Open
ozedesk opened this issue Jan 3, 2019 · 6 comments
Open

problem / help #10

ozedesk opened this issue Jan 3, 2019 · 6 comments

Comments

@ozedesk
Copy link

ozedesk commented Jan 3, 2019

I have something like this:
echo $api->sale->delivery-methods()->get();
and the effect:
Fatal error: Call to undefined function methods() in /users/0014/users/www/website.pl/api/demo/delivery.php on line 51

line 51 : echo $api->sale->delivery-methods()->get();

@kubasco
Copy link

kubasco commented Feb 22, 2019

ścieżka tej metody to : https://api.allegro.pl/sale/delivery-methods

więc powinno być :
echo $api->sale->delivery-methods->get();

@Lebioda
Copy link

Lebioda commented Jun 6, 2019

ścieżka tej metody to : https://api.allegro.pl/sale/delivery-methods

więc powinno być :
echo $api->sale->delivery-methods->get();

ściezki z myślnikiem nie działają, jest na to rozwiązanie?

@kubasco
Copy link

kubasco commented Jun 6, 2019

ścieżka tej metody to : https://api.allegro.pl/sale/delivery-methods
więc powinno być :
echo $api->sale->delivery-methods->get();

ściezki z myślnikiem nie działają, jest na to rozwiązanie?

Powinny bez problemu działać.
Pokaż fragment kodu, może problem nie leży w tym

@Lebioda
Copy link

Lebioda commented Jun 6, 2019

Przykładowo:

$res = json_decode($api->sale->user-ratings->get());

Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/.../REST-API/ApiTest.php on line 69

@Lebioda
Copy link

Lebioda commented Jun 6, 2019

Jest rozwiązanie: grzegorzjj/PHP-allegro-rest-api-HOWTO#2 (comment)

@kubasco
Copy link

kubasco commented Jun 6, 2019

Przykładowo:

$res = json_decode($api->sale->user-ratings->get());

Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/.../REST-API/ApiTest.php on line 69

Można też w ten sposób :
$res = json_decode($api->sale->{'user-ratings'}->get());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants