Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

How to execute query service: using Apperyio.get

How would I pass the where clause when executing a service in my bootstrap app. Is there any documentation on "Apperyio.get" and how to execute services using it?

code
Apperyio.get("My_query_service")({data:{"where":{"artist._id":id}}}).then(
function(success){
var list_scope = $scope["list"];
list_scope = success.data;
$scope["list"] = list_scope;
},
function(error){

}
);
/code

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

How to execute query service: using Apperyio.get

Thank you but that does not help.

I asked if there is any documentation on "Apperyio.get" or an example of how to execute a Query service and passing the where clause using the "Apperyio.get" method.

As far as I know that tutorial does not include such an example.

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

How to execute query service: using Apperyio.get

Figured it out, see below

code
var requestData = {};
requestData.params = Apperyio.EntityAPI('My_query_service.request.query', undefined, true);

var id_scope = $scope["id"];
requestData.params["where"] = {"artist._id":id_scope};

Apperyio.get("My_query_service")(requestData).then(

Code: Select all

 function(success){ 

var list_scope = $scope["list"];
list_scope = success.data;
$scope["list"] = list_scope;

Code: Select all

 }, 
 function(error){ 

 }); 

/code

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to execute query service: using Apperyio.get

Hello Dupdroid,

Thank you for the update.

Return to “Issues”