Skip to content

Commit 98034f9

Browse files
author
ducksoop
authored
Update README.md
1 parent 0c6b402 commit 98034f9

File tree

1 file changed

+47
-55
lines changed

1 file changed

+47
-55
lines changed

README.md

Lines changed: 47 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 📋 Overview
44

5-
This repository contains C# utilities designed to simplify constructing requests for the QuickBase API and provide intuitive interfaces for building insert, update, delete, and query operations on QuickBase tables.
5+
QuickbaseNet is a versatile C# library designed to simplify and streamline interactions with the QuickBase API. Tailored for developers looking to efficiently perform CRUD operations and build complex queries, QuickbaseNet offers a set of intuitive tools including `QuickBaseCommandBuilder`, `QueryBuilder`, and `QuickbaseClient`. Whether you're managing database records or crafting detailed queries, QuickbaseNet enhances your experience with QuickBase tables through its fluent and user-friendly interfaces.
66

77
## ✨ Features
88

@@ -13,128 +13,115 @@ This repository contains C# utilities designed to simplify constructing requests
1313

1414
## 💾 Installation
1515

16-
Provide installation instructions, such as NuGet package installation, cloning a repository, or manually adding files.
16+
To get started with QuickbaseNet, you can install it via NuGet or clone the repository:
1717

1818
```bash
19-
# Example: NuGet Package Installation
20-
Install-Package YourPackageName
19+
# Install via NuGet
20+
Install-Package QuickbaseNet
21+
22+
# Or clone the repository
23+
git clone https://github.com/yourusername/quickbase-net.git
2124
```
2225

23-
## 🛠️ Setup
26+
## 🛠️ Usage
2427

25-
### QuickbaseClient Initialization 🌟
28+
QuickbaseNet simplifies working with the QuickBase API across various operations. Here's how you can use its main features:
2629

27-
Initialize `QuickbaseClient` with your realm hostname and user token for a secure connection.
30+
### Initializing QuickbaseClient 🌟
2831

2932
```csharp
33+
// Initialize QuickbaseClient with your realm hostname and user token
3034
var quickbaseClient = new QuickbaseClient("your_realm_hostname", "your_user_token");
3135
```
32-
### Handling Responses 📬
33-
Sending a Query Request
36+
37+
### Handling API Responses 📬
38+
39+
#### Sending a Query Request
40+
3441
```csharp
42+
// Build a query using QueryBuilder
3543
var query = new QueryBuilder()
3644
.From("bck7gp3q2")
3745
.Select(1, 2, 3)
3846
.Where("{1.CT.'hello'}")
3947
.Build();
4048

49+
// Send the query and handle the response
4150
var (response, error, isSuccess) = await quickbaseClient.QueryRecords(query);
4251

4352
if (isSuccess)
4453
{
45-
// Process the response
46-
// response.Data, response.Fields, response.Metadata...
54+
// Process the successful response
4755
}
4856
else
4957
{
5058
// Handle the error
51-
// error.Message, error.Description...
5259
}
5360
```
5461

55-
Inserting Records
62+
#### Inserting Records
63+
5664
```csharp
65+
// Configure and build an insert request using QuickBaseCommandBuilder
5766
var insertRequest = new QuickBaseCommandBuilder()
58-
// ... configuration for insert request
67+
.ForTable("your_table_id")
68+
// Add configuration for insert request...
5969
.BuildInsertOrUpdateRequest();
6070

71+
// Send the insert request and handle the response
6172
var (response, error, isSuccess) = await quickbaseClient.InsertRecords(insertRequest);
6273

6374
if (isSuccess)
6475
{
65-
// Response handling for successful insert
76+
// Handle successful insert response
6677
}
6778
else
6879
{
69-
// Error handling
80+
// Process the error
7081
}
7182
```
7283

73-
Updating Records
84+
#### Updating Records
85+
7486
```csharp
87+
// Configure and build an update request
7588
var updateRequest = new QuickBaseCommandBuilder()
76-
// ... configuration for update request
89+
.ForTable("your_table_id")
90+
// Add configuration for update request...
7791
.BuildInsertOrUpdateRequest();
7892

93+
// Send the update request and handle the response
7994
var (response, error, isSuccess) = await quickbaseClient.UpdateRecords(updateRequest);
8095

8196
if (isSuccess)
8297
{
83-
// Response handling for successful update
98+
// Handle successful update response
8499
}
85100
else
86101
{
87-
// Error handling
102+
// Process the error
88103
}
89104
```
90105

91-
### QuickBaseCommandBuilder Usage 🧩
92-
93-
#### Inserting Records 💾
94-
95-
```csharp
96-
var commandBuilder = new QuickBaseCommandBuilder()
97-
.ForTable("your_table_id")
98-
.AddNewRecord(record => record
99-
.AddField("fieldId1", "Value1")
100-
.AddField("fieldId2", "Value2"))
101-
.BuildInsertOrUpdateRequest();
102-
103-
// Send request using QuickbaseClient
104-
var response = await quickbaseClient.InsertOrUpdateRecords(commandBuilder);
105-
```
106-
107-
#### Updating Records 🔄
106+
#### Deleting Records
108107

109108
```csharp
110-
var commandBuilder = new QuickBaseCommandBuilder()
111-
.ForTable("your_table_id")
112-
.UpdateRecord(123, record => record
113-
.AddField("fieldId1", "New Value1")
114-
.AddField("fieldId2", "New Value2"))
115-
.BuildInsertOrUpdateRequest();
116-
117-
// Send request using QuickbaseClient
118-
var response = await quickbaseClient.InsertOrUpdateRecords(commandBuilder);
119-
```
120-
121-
#### Deleting Records ❌
122-
123-
```csharp
124-
var commandBuilder = new QuickBaseCommandBuilder()
109+
// Build a delete request using QuickBaseCommandBuilder
110+
var deleteRequest = new QuickBaseCommandBuilder()
125111
.ForTable("your_table_id")
126112
.WithDeletionCriteria("{6.EX.'hello'}")
127113
.BuildDeleteRequest();
128114

129-
// Send request using QuickbaseClient
130-
var response = await quickbaseClient.DeleteRecords(commandBuilder);
115+
// Send the delete request and handle the response
116+
var response = await quickbaseClient.DeleteRecords(deleteRequest);
131117
```
132118

133119
### QueryBuilder - Crafting Queries with Precision 🔎
134120

135121
#### Building and Sending a Query 📤
136122

137123
```csharp
124+
// Create a query using QueryBuilder
138125
var query = new QueryBuilder()
139126
.From("bck7gp3q2")
140127
.Select(1, 2, 3)
@@ -144,13 +131,18 @@ var query = new QueryBuilder()
144131
.GroupBy(6, "equal-values")
145132
.Build();
146133

147-
// Send query using QuickbaseClient
134+
// Send the query and handle the response
148135
var response = await quickbaseClient.QueryRecords(query);
149136
```
150137

151138
## 👐 Contributing
139+
152140
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
153141

154142
## 📜 License
155143

156144
Distributed under the MIT License. See [LICENSE](https://github.com/ducksoop/quickbase-net/blob/master/LICENSE.txt) for more information.
145+
146+
## 📚 Additional Resources
147+
148+
- [QuickBase API Documentation](https://developer.quickbase.com)

0 commit comments

Comments
 (0)