27
27
28
28
You can send insert, update, delete, and fetch data from Axe API servers without pain. ` axe-api-client ` has advanced query support with the active record pattern.
29
29
30
- ## Config
30
+ ## ⚙️ Config
31
31
32
32
``` ts
33
33
import { api , IRequest } from " axe-api-client" ;
@@ -47,7 +47,7 @@ api.interceptors.addResponse((response: Response) => {
47
47
});
48
48
```
49
49
50
- ## Insert
50
+ ## ➕ Insert
51
51
52
52
``` js
53
53
const response = await api .resource (" users" ).insert ({
@@ -56,7 +56,7 @@ const response = await api.resource("users").insert({
56
56
});
57
57
```
58
58
59
- ## Post
59
+ ## 📤 Post
60
60
61
61
``` js
62
62
const response = await api .resource (" users" ).post ({
@@ -65,7 +65,7 @@ const response = await api.resource("users").post({
65
65
});
66
66
```
67
67
68
- ## Update
68
+ ## 🔄 Update
69
69
70
70
``` js
71
71
const response = await api .resource (" users" ).update ({
@@ -74,7 +74,7 @@ const response = await api.resource("users").update({
74
74
});
75
75
```
76
76
77
- ## Patch
77
+ ## 🩹 Patch
78
78
79
79
``` js
80
80
const response = await api .resource (" users" ).patch ({
@@ -83,7 +83,7 @@ const response = await api.resource("users").patch({
83
83
});
84
84
```
85
85
86
- ## Put
86
+ ## ✏️ Put
87
87
88
88
``` js
89
89
const response = await api .resource (" users" ).put ({
@@ -92,21 +92,21 @@ const response = await api.resource("users").put({
92
92
});
93
93
```
94
94
95
- ## Delete
95
+ ## 🗑️ Delete
96
96
97
97
``` js
98
98
const response = await api .resource (" users" ).delete ();
99
99
```
100
100
101
- ## Query
101
+ ## 🔍 Query
102
102
103
103
``` js
104
104
import { api } from " axe-api-client" ;
105
105
106
106
const data = await api .resource (" users" ).paginate ();
107
107
```
108
108
109
- ## Fields
109
+ ## 📝 Fields
110
110
111
111
``` js
112
112
const response = await api
@@ -115,7 +115,7 @@ const response = await api
115
115
.paginate ();
116
116
```
117
117
118
- ## Sorting
118
+ ## 🧩 Sorting
119
119
120
120
``` js
121
121
const response = await api
@@ -127,19 +127,19 @@ const response = await api
127
127
.paginate ();
128
128
```
129
129
130
- ## Limits
130
+ ## 🚦 Limits
131
131
132
132
``` js
133
133
const response = await api .resource (" users" ).paginate ({ page: 1 , perPage: 25 });
134
134
```
135
135
136
- ## First
136
+ ## ⏩ First
137
137
138
138
``` js
139
139
const response = await api .resource (" users" ).first ();
140
140
```
141
141
142
- ## Where Conditions
142
+ ## ❓ Where Conditions
143
143
144
144
``` js
145
145
const response = await api .resource (" users" ).where (" age" , 18 ).paginate ();
@@ -188,7 +188,7 @@ const response = await api
188
188
189
189
> All the [ operators] ( https://axe-api.com/basics/queries/index.html#operators ) should be able to used.
190
190
191
- ## Related Data
191
+ ## 🔗 Related Data
192
192
193
193
``` js
194
194
const response = await api
@@ -197,7 +197,7 @@ const response = await api
197
197
.paginate ();
198
198
```
199
199
200
- ## Quick where functions
200
+ ## ⚡ Quick where functions
201
201
202
202
We can use the following query where functions:
203
203
@@ -211,6 +211,14 @@ We can use the following query where functions:
211
211
- ` whereNull("age") `
212
212
- ` whereNotNull("age") `
213
213
214
- ## License
214
+ ## 👥 Contributors
215
+
216
+ <a href =" https://github.com/axe-api/client/graphs/contributors " >
217
+ <img src =" https://contrib.rocks/image?repo=axe-api/client " />
218
+ </a >
219
+
220
+ Made with [ contrib.rocks] ( https://contrib.rocks ) .
221
+
222
+ ## 📜 License
215
223
216
224
[ MIT License] ( LICENSE )
0 commit comments