Skip to content

Commit 67370cc

Browse files
committed
Update readme to reflect renaming of err to error
1 parent 6553217 commit 67370cc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,100 +30,100 @@ client.tasks.create({
3030
name: 'Nature Home Page',
3131
url: 'nature.com',
3232
standard: 'WCAG2AA'
33-
}, function (err, task) {
33+
}, function (error, task) {
3434
// task = object representing the new task, or null if an error occurred
3535
});
3636

3737
// Get all tasks
38-
client.tasks.get({}, function (err, tasks) {
38+
client.tasks.get({}, function (error, tasks) {
3939
// tasks = array of objects representing tasks, or null if an error occurred
4040
});
4141

4242
// Get all tasks with last results included for each
4343
client.tasks.get({
4444
lastres: true
45-
}, function (err, tasks) {
45+
}, function (error, tasks) {
4646
// tasks = array of objects representing tasks, or null if an error occurred
4747
});
4848

4949
// Get results for all tasks
50-
client.tasks.results({}, function (err, results) {
50+
client.tasks.results({}, function (error, results) {
5151
// results = array of objects representing results, or null if an error occurred
5252
});
5353

5454
// Get results for all tasks within a date range
5555
client.tasks.results({
5656
from: '2023-01-01',
5757
to: '2023-01-31'
58-
}, function (err, results) {
58+
}, function (error, results) {
5959
// results = array of objects representing results, or null if an error occurred
6060
});
6161

6262
// Get results for all tasks with full details
6363
client.tasks.results({
6464
full: true
65-
}, function (err, results) {
65+
}, function (error, results) {
6666
// results = array of objects representing results, or null if an error occurred
6767
});
6868

6969
// Get a task by ID
70-
client.task('5231c687bbdf0f94fa000007').get({}, function (err, task) {
70+
client.task('5231c687bbdf0f94fa000007').get({}, function (error, task) {
7171
// task = object representing the requested task, or null if an error occurred
7272
});
7373

7474
// Get a task by ID with last results included
7575
client.task('5231c687bbdf0f94fa000007').get({
7676
lastres: true
77-
}, function (err, task) {
77+
}, function (error, task) {
7878
// task = object representing the requested task, or null if an error occurred
7979
});
8080

8181
// Edit a task by ID
8282
client.task('5231c687bbdf0f94fa000007').edit({
8383
name: 'New name'
84-
}, function (err, task) {
84+
}, function (error, task) {
8585
// task = object representing the newly updated task, or null if an error occurred
8686
});
8787

8888
// Delete a task by ID
89-
client.task('5231c687bbdf0f94fa000007').remove(function (err) {
89+
client.task('5231c687bbdf0f94fa000007').remove(function (error) {
9090
// err = null if task was deleted, or an Error object if something went wrong
9191
});
9292

9393
// Run a task by ID
94-
client.task('5231c687bbdf0f94fa000007').run(function (err) {
94+
client.task('5231c687bbdf0f94fa000007').run(function (error) {
9595
// err = null if task is running, or an Error object if something went wrong
9696
});
9797

9898
// Get results for a task
99-
client.task('5231c687bbdf0f94fa000007').results({}, function (err, results) {
99+
client.task('5231c687bbdf0f94fa000007').results({}, function (error, results) {
100100
// results = array of objects representing results, or null if an error occurred
101101
});
102102

103103
// Get results for a task within a date range
104104
client.task('5231c687bbdf0f94fa000007').results({
105105
from: '2023-01-01',
106106
to: '2023-01-31'
107-
}, function (err, results) {
107+
}, function (error, results) {
108108
// results = array of objects representing results, or null if an error occurred
109109
});
110110

111111
// Get results for a task with full details
112112
client.task('5231c687bbdf0f94fa000007').results({
113113
full: true
114-
}, function (err, results) {
114+
}, function (error, results) {
115115
// results = array of objects representing results, or null if an error occurred
116116
});
117117

118118
// Get a result by ID
119-
client.task('5231c687bbdf0f94fa000007').result('523c0ee0ca452f0000000009').get({}, function (err, result) {
119+
client.task('5231c687bbdf0f94fa000007').result('523c0ee0ca452f0000000009').get({}, function (error, result) {
120120
// task = object representing the requested result, or null if an error occurred
121121
});
122122

123123
// Get a result by ID with full details
124124
client.task('5231c687bbdf0f94fa000007').result('523c0ee0ca452f0000000009').get({
125125
full: true
126-
}, function (err, result) {
126+
}, function (error, result) {
127127
// task = object representing the requested result, or null if an error occurred
128128
});
129129
```

0 commit comments

Comments
 (0)