Page 1 of 1

Retrieve dB results from Dynamic list

Posted: Fri Mar 08, 2013 4:10 am
by damien

My app gets API response from facebook that returns all friends of current logged in user. The responses are displayed in a list.

Example response:

id123 name1
id234 name2
id345 name3

Is there a way to add to the response the users(friends) entires that also are in the tiggzi dataabse?

Tiggzi db

id123 db_Entry1
id123 db_Entry2
id234 db_Entry1
id345 db_Entry1

End result to display

id123 name1 db_Entry1
id123 name1 db_Entry2
id234 name2 db_Entry1
id345 name3 db_Entry1

As in above example each friend in list may have more that one corresponding record in tiggzi db. I want all such recods to display.

Thanks!


Retrieve dB results from Dynamic list

Posted: Fri Mar 08, 2013 5:29 am
by maxkatz

You can, send a POST request to the Tiggzi database with the data you need.


Retrieve dB results from Dynamic list

Posted: Wed Mar 13, 2013 5:02 am
by damien

Thanks for the respone. I am a bit confused. I dont want to add anything to the databse I just want to return all records from the database that match on user id to the initial response of the users friend list. Maybe my second sentence should say"

Is there a way to query the tiggzi dataabse USING the API response of the users friends in order to retrieve entires in the tiggzi datababse with matching userid?

Does that make more sense? sorry for confusion.


Retrieve dB results from Dynamic list

Posted: Wed Mar 13, 2013 11:01 am
by Maryna Brodina

Hello! Take a look at $in in where clause
You can send request to DB and set in "where" something like this
code{"user_id": {"$in": ["id123", "id234", "id345"]}}/code

This should also help http://docs.tiggzi.com/documentation/...