Skip to content

Commit

Permalink
Update readme to reflect renaming of err to error
Browse files Browse the repository at this point in the history
  • Loading branch information
danyalaytekin committed Nov 9, 2023
1 parent 6553217 commit 67370cc
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,100 +30,100 @@ client.tasks.create({
name: 'Nature Home Page',
url: 'nature.com',
standard: 'WCAG2AA'
}, function (err, task) {
}, function (error, task) {
// task = object representing the new task, or null if an error occurred
});

// Get all tasks
client.tasks.get({}, function (err, tasks) {
client.tasks.get({}, function (error, tasks) {
// tasks = array of objects representing tasks, or null if an error occurred
});

// Get all tasks with last results included for each
client.tasks.get({
lastres: true
}, function (err, tasks) {
}, function (error, tasks) {
// tasks = array of objects representing tasks, or null if an error occurred
});

// Get results for all tasks
client.tasks.results({}, function (err, results) {
client.tasks.results({}, function (error, results) {
// results = array of objects representing results, or null if an error occurred
});

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

// Get results for all tasks with full details
client.tasks.results({
full: true
}, function (err, results) {
}, function (error, results) {
// results = array of objects representing results, or null if an error occurred
});

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

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

// Edit a task by ID
client.task('5231c687bbdf0f94fa000007').edit({
name: 'New name'
}, function (err, task) {
}, function (error, task) {
// task = object representing the newly updated task, or null if an error occurred
});

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

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

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

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

// Get results for a task with full details
client.task('5231c687bbdf0f94fa000007').results({
full: true
}, function (err, results) {
}, function (error, results) {
// results = array of objects representing results, or null if an error occurred
});

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

// Get a result by ID with full details
client.task('5231c687bbdf0f94fa000007').result('523c0ee0ca452f0000000009').get({
full: true
}, function (err, result) {
}, function (error, result) {
// task = object representing the requested result, or null if an error occurred
});
```
Expand Down

0 comments on commit 67370cc

Please sign in to comment.