Commit 9d5a6d51 authored by Nelly Barret's avatar Nelly Barret

Update api.py

parent 6cc4f766
......@@ -131,6 +131,20 @@ class Mongiris:
doc = collection.find_one(json_query)
doc_json = Mongiris.bson_to_json(doc)
return doc_json
def find_all(self, collection):
"""
Finds all documents in the given collection.
Args:
collection: a string representing the collection name
Returns:
doc_json: a dictionnary representing the documents, or None
"""
doc = collection.find()
doc_json = Mongiris.bson_to_json(doc)
return doc_json
def get_iris_from_code(self, code_iris):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment