You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-29Lines changed: 24 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,34 @@
1
-
# Deno MongoDB Atlas Data API Wrapper
1
+
# Deno MongoDB Atlas Data API
2
2
3
-
This is a simple library that turns the long and repeating code to access the MongoDB Data API into more simple, readable, and maintainable code.
3
+
This is a simple library that provides an interface to the MongoDB Atlas Data API. The library can be used to perform basic CRUD (Create, Read, Update, and Delete) operations on a MongoDB database without the need for a dedicated driver.
4
+
5
+
The library is written in TypeScript, and it provides TypeScript definitions for all of its methods.
6
+
7
+
## Usage
8
+
To use the DataAPI library, you first need to initialize it with your MongoDB Atlas API key and the URL of your Data API endpoint. You can then use the insertOne, insertMany, findOne, find, updateOne, and deleteOne methods to perform CRUD operations on your database.
9
+
10
+
Here's an example of how you can use the library to insert a document into a collection:
The `init` method initializes the library with the URL of the Data API endpoint, the name of the cluster, the name of the database, and the API key. The insertOne method is then used to insert a document into the my-collection collection. The result of the operation is logged to the console.
31
+
37
32
## When to Use the Data API
38
33
39
34
*taken straight from this [documentation page](https://www.mongodb.com/docs/atlas/api/data-api/)*
0 commit comments