Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getTask() function #9

Merged
merged 1 commit into from
Jul 24, 2022
Merged

Add getTask() function #9

merged 1 commit into from
Jul 24, 2022

Conversation

Christopher-Hayes
Copy link
Contributor

Added a function to get an individual task. The generate function already does this, just creating an endpoint for anyone to use it. Updated generate() to use this function as well.

Arguments

taskId The ID of the task, this gets returned by generate().

Sample Usage

import { Dalle } from "./dalle-node.js";
const dalle = new Dalle('bearer-token');

dalle.getTask('task-id-here').then(task => {
  console.log(task);
}).catch(error => {
  console.log('error', error);
})

@ezzcodeezzlife
Copy link
Owner

🚀

@ezzcodeezzlife ezzcodeezzlife merged commit c7efa14 into ezzcodeezzlife:main Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants