How to get data from the user documents from firestore? (Flutter) - visual-studio

I'am new in flutter_programming.
I want to get the data from the user.document. I have already created a new collection if I sign up in my application.
I use this command snapshot.data.document[][] (Streambuilder) for getting data from firestore.
But I have to declare the first array to access the document.
So I can't access automatically the user document.

To get the data from Firestore you need to use the stream,
Stream<QuerySnapshot> get data {
return Firestore.instance.collection('yo').snapshots().map(_taskListFromSnapshot);
}
}

Related

Creating ResponseEntity CREATED for multiple records

I have an application that exposed an endpoint to insert multiple records into the DB. It takes in a list of ids and inserts them into the DB.
Now I have already worked on an endpoint, where I was getting a DTO and then I inserted that DTO into the DB which gave back the UID of the record. Using this UID I created the URI that I used to create and return the ResponseEntity.created() like below:
return ResponseEntity.created(URI.create(location)).body(roId);
The challenge here is that it works for only one location and one UID. Is it possible to do that same in case I am inserting multiple records in the DB and I will be getting a list of ids? Is this even the right approach?
NOTE: I do not want to return the List<ResponseEntity<Long>>. I require ResponseEntity<List<Long>>.

Rest API Call in uipath

My requirement is to fetch the data from rest api data and store it in separate variable. I had the endpoint url(https://abcdev.service-now.com/api/now/table/sc_multi_row_question_answer?sysparm_query=parent_id%3Dxxxxxxxxxxxxxxxxxxxx&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_fields=variable_set%2Cvalue%2Citem_option_new%2Crow_index).This is fetching the datas for all 3 rows. But i wants that this user needs to be added in this delegate access like that.
I have attached the image for which field i want to fetch.
I wants to fetch user to be added,level of access required,inbox,calender,tasks,contacts,notes,journal,select required send rights for these field i wants to fetch row by row.kindly assist me in that.
You will receive the response in JSON with all the rows, but you can use de serialize JSON Array activity to de serialize the JSON in each record with all the columns you have mentioned.
And Once you have the rows in the array JSON you can loop through it and get the details for each field.

How to save json feed to MongoDB in Laravel and get the key?

I need the following: I make GET requests to the API and receive responses in JSON format.
We have some sort of logs about responses and I'd like to keep record about the content of these JSON objects on the moment of the request.
In the Laravel command, I have to:
1) Save JSON object to MongoDB and get the unique key "feed_id" from collection under which it was saved.
2) Save the "feed_id" to the table column, where we store logs about history of requests.
How can I implement the first step in Laravel? I have seen some example, but without getting the id.
there is a excellent package for mongoDB in laravel named jenssegers/mongodb
you can install it via composer.
once you've installed it , you can simply insert an object and get the id in response like you do with eloquent and mysql

Angularfire2 getting nested data from Firestore database

I'm trying to develop a small application with a Firestore backend and angularfire2 in the frontend. I created some data and now I'm trying to get the right reference to them. These are my data:
Firestore data
I'm trying to get the reference to them with:
this.afs.collection("accounts").doc(accountId).collection("conversations").doc(conversationId).valueChanges().subscribe(conversation => {...}
(afs is the Angularfirestore from angularfire2/firestore)
But this results in no data in the conversation-object.
If I do this.afs.collection("accounts").doc(accountId)... I get the Account-Document as expected.
But I can't get deeper into the object.
I'm trying the same as described here:
https://firebase.google.com/docs/firestore/data-model
I'm using Firestore and Angularfire2 (5.0.0-rc.4)
I think you're doing everything correct apart of declaring the subcollection. Your "conversations" subcollection is not a Collection, it is a "field" of the document. That's why you can not access it in the way you're trying to access it.

Magento loses session data

I use the following to set some data:
Mage::getSingleton('core/session')->setData('amprevnext_collection_ids', array_values($ids));
it contains an array of ids,
when trying to retrieve the data
Mage::getSingleton('core/session')->getData('amprevnext_collection_ids')
it does not return any value, I tested by trying to change the core to customer,
I also used a $_SESSION, which in return was empty as well..

Resources