Add midjourney pagination (#172)
This commit is contained in:
1 parent
49b2a5846c
commit
31fc4b4472
10 files changed
+137
-32
No files matched your search
@@ -28,7 +28,16 @@ class MidjourneyOperator {
|
||||
}
|
||||
|
||||
async tasks(
|
||||
filter: { ids?: string[]; applicationId?: string; userId?: string; limit?: number; offset?: number },
|
||||
filter: {
|
||||
ids?: string[];
|
||||
applicationId?: string;
|
||||
userId?: string;
|
||||
type?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
createdAtMax?: number;
|
||||
createdAtMin?: number;
|
||||
},
|
||||
options: { token: string }
|
||||
): Promise<AxiosResponse<IMidjourneyTasksResponse>> {
|
||||
return await axios.post(
|
||||
@@ -50,6 +59,11 @@ class MidjourneyOperator {
|
||||
user_id: filter.userId
|
||||
}
|
||||
: {}),
|
||||
...(filter.type
|
||||
? {
|
||||
type: filter.type
|
||||
}
|
||||
: {}),
|
||||
...(filter.limit !== undefined
|
||||
? {
|
||||
limit: filter.limit
|
||||
@@ -59,6 +73,16 @@ class MidjourneyOperator {
|
||||
? {
|
||||
offset: filter.offset
|
||||
}
|
||||
: {}),
|
||||
...(filter.createdAtMax !== undefined
|
||||
? {
|
||||
created_at_max: filter.createdAtMax
|
||||
}
|
||||
: {}),
|
||||
...(filter.createdAtMin !== undefined
|
||||
? {
|
||||
created_at_min: filter.createdAtMin
|
||||
}
|
||||
: {})
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user