Constructors
constructor
- new WomboDream(authentifier: GoogleAuthentifier, apiTaskUrl: string, apiUserSuffix: string, apiTaskSuffix: string, apiShopSuffix: string, apiStyleSuffix: string, apiGallerySuffix: string, originUrl: string, uploadUrl: string): WomboDream
Parameters
apiTaskUrl: string
apiUserSuffix: string
apiTaskSuffix: string
apiShopSuffix: string
apiStyleSuffix: string
apiGallerySuffix: string
originUrl: string
uploadUrl: string
Properties
apiGallerySuffix
apiGallerySuffix: string
apiShopSuffix
apiShopSuffix: string
apiStyleSuffix
apiStyleSuffix: string
apiTaskSuffix
apiTaskSuffix: string
apiTaskUrl
apiTaskUrl: string
apiUserSuffix
apiUserSuffix: string
originUrl
originUrl: string
uploadUrl
uploadUrl: string
Methods
buildApiGalleryUrl
- buildApiGalleryUrl(taskId: string): string
buildApiStyleUrl
- buildApiStyleUrl(): string
buildApiTaskShopUrl
- buildApiTaskShopUrl(taskId: string): string
buildApiTaskUrl
- buildApiTaskUrl(taskId: string): string
buildHttpRequestAgentForDreamApi
buildHttpRequestAgentForUserAPI
buildRawApiGalleryUrl
- buildRawApiGalleryUrl(): string
buildRawApiTaskUrl
- buildRawApiTaskUrl(): string
configureTask
Parameters
prompt: string
style: number
display_freq: number = DEFAULT_DISPLAY_FREQ
Returns Promise<Task>
createTask
- createTask(prompt: string, style: number, input_image?: TaskImageInputSpec, display_freq?: number): Promise<Task>
Parameters
prompt: string
style: number
display_freq: number = DEFAULT_DISPLAY_FREQ
Returns Promise<Task>
deleteGalleryTask
- deleteGalleryTask(taskGalleryId: number): Promise<void>
Parameters
Returns Promise<void>
fetchGalleryTask
- fetchGalleryTask(taskGalleryId: number): Promise<SavedTask>
fetchTaskInfos
- fetchTaskInfos(taskId: string): Promise<Task>
Parameters
Returns Promise<Task>
fetchTaskShopUrl
- fetchTaskShopUrl(taskId: string): Promise<String>
Parameters
Returns Promise<String>
generatePicture
- generatePicture(prompt: string, style: number, progressCallback?: (task: Task) => void, input_image?: TaskImageInputSpec, checkFrequency?: number, display_freq?: number): Promise<Task>
Parameters
prompt: string
style: number
progressCallback: (task: Task) => void = ...
checkFrequency: number = DEFAULT_CHECK_FREQ
display_freq: number = DEFAULT_DISPLAY_FREQ
Returns Promise<Task>
initTask
- initTask(): Promise<Task>
saveTaskToGallery
- saveTaskToGallery(taskId: string, name?: string, isPublic?: boolean, isPromptVisible?: boolean): Promise<SavedTask>
Parameters
taskId: string
name: string = ''
isPublic: boolean = false
isPromptVisible: boolean = true
setUsername
- setUsername(username: string): Promise<void>
Parameters
Returns Promise<void>
Create a new HTTP request agent with custom headers