-
Notifications
You must be signed in to change notification settings - Fork 12
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
Issue with requesting api rest #7
Comments
I think I found the Issue the API.php installed with composer it is old version I have to replace it with the download and it works now!!! composer installation must be updated!!! |
Do you use develop branch in your composer.json file? |
yes I do, It was installed with the installation of the api using composer |
I am trying to use the optional args Like explained here: Optional Arguments Agile API supports various get arguments. ?sort=name,-age specify columns to sort by. but it does not work!!! gives me an empty array!!! nothing... any option return the same empty array if I use optional args.. any tip what am I doing wrong? I am trying to add this, to see if this is missing in my php file but if I include it or not the optional args does not return anything... function args(\atk4\data\Model $m) {
} any tips? most important things are... to be able to filter or sort or show only some fields thanks |
Sometimes Composer doesn't update github repos. This shit happens. @romaninsh will check that when he will return from vacation. Speaking about some aspects which are described in readme - yes, not everything is implemented yet and some things could be implemented different than in readme. This repo still is under construction. We use it in few our projects, but only in simple way - for quickly setting up simple REST interface. Anyway - it's all in our ToDo list and will be developed in near future. Also you can help us and send in some PRs :) |
Great :) of course! |
if I Use this it works; print all Json array
$api->rest('/customers', new Customers($db));
but if I use this, it does not work why? it print empty Json array
$api->rest('/customers', function() use($db) {
$c = new Customers($db);
$c->setLimit(20);
return $c;
});
any ideas?
The text was updated successfully, but these errors were encountered: