| 1 |
# -*- coding: utf-8 -*- |
| 2 |
|
| 3 |
# Copyright 2026 Mike Fährmann |
| 4 |
# |
| 5 |
# This program is free software; you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License version 2 as |
| 7 |
# published by the Free Software Foundation. |
| 8 |
|
| 9 |
|
| 10 |
GetProfileProjects = """\ |
| 11 |
query GetProfileProjects($username: String, $after: String) { |
| 12 |
user(username: $username) { |
| 13 |
profileProjects(first: 12, after: $after) { |
| 14 |
pageInfo { |
| 15 |
endCursor |
| 16 |
hasNextPage |
| 17 |
} |
| 18 |
nodes { |
| 19 |
__typename |
| 20 |
adminFlags { |
| 21 |
mature_lock |
| 22 |
privacy_lock |
| 23 |
dmca_lock |
| 24 |
flagged_lock |
| 25 |
privacy_violation_lock |
| 26 |
trademark_lock |
| 27 |
spam_lock |
| 28 |
eu_ip_lock |
| 29 |
} |
| 30 |
colors { |
| 31 |
r |
| 32 |
g |
| 33 |
b |
| 34 |
} |
| 35 |
covers { |
| 36 |
size_202 { |
| 37 |
url |
| 38 |
} |
| 39 |
size_404 { |
| 40 |
url |
| 41 |
} |
| 42 |
size_808 { |
| 43 |
url |
| 44 |
} |
| 45 |
} |
| 46 |
features { |
| 47 |
url |
| 48 |
name |
| 49 |
featuredOn |
| 50 |
ribbon { |
| 51 |
image |
| 52 |
image2x |
| 53 |
image3x |
| 54 |
} |
| 55 |
} |
| 56 |
fields { |
| 57 |
id |
| 58 |
label |
| 59 |
slug |
| 60 |
url |
| 61 |
} |
| 62 |
hasMatureContent |
| 63 |
id |
| 64 |
isFeatured |
| 65 |
isHiddenFromWorkTab |
| 66 |
isMatureReviewSubmitted |
| 67 |
isOwner |
| 68 |
isFounder |
| 69 |
isPinnedToSubscriptionOverview |
| 70 |
isPrivate |
| 71 |
linkedAssets { |
| 72 |
...sourceLinkFields |
| 73 |
} |
| 74 |
linkedAssetsCount |
| 75 |
sourceFiles { |
| 76 |
...sourceFileFields |
| 77 |
} |
| 78 |
matureAccess |
| 79 |
modifiedOn |
| 80 |
name |
| 81 |
owners { |
| 82 |
...OwnerFields |
| 83 |
images { |
| 84 |
size_50 { |
| 85 |
url |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
premium |
| 90 |
publishedOn |
| 91 |
stats { |
| 92 |
appreciations { |
| 93 |
all |
| 94 |
} |
| 95 |
views { |
| 96 |
all |
| 97 |
} |
| 98 |
comments { |
| 99 |
all |
| 100 |
} |
| 101 |
} |
| 102 |
slug |
| 103 |
tools { |
| 104 |
id |
| 105 |
title |
| 106 |
category |
| 107 |
categoryLabel |
| 108 |
categoryId |
| 109 |
approved |
| 110 |
url |
| 111 |
backgroundColor |
| 112 |
} |
| 113 |
url |
| 114 |
} |
| 115 |
} |
| 116 |
} |
| 117 |
} |
| 118 |
|
| 119 |
fragment sourceFileFields on SourceFile { |
| 120 |
__typename |
| 121 |
sourceFileId |
| 122 |
projectId |
| 123 |
userId |
| 124 |
title |
| 125 |
assetId |
| 126 |
renditionUrl |
| 127 |
mimeType |
| 128 |
size |
| 129 |
category |
| 130 |
licenseType |
| 131 |
unitAmount |
| 132 |
currency |
| 133 |
tier |
| 134 |
hidden |
| 135 |
extension |
| 136 |
hasUserPurchased |
| 137 |
} |
| 138 |
|
| 139 |
fragment sourceLinkFields on LinkedAsset { |
| 140 |
__typename |
| 141 |
name |
| 142 |
premium |
| 143 |
url |
| 144 |
category |
| 145 |
licenseType |
| 146 |
} |
| 147 |
|
| 148 |
fragment OwnerFields on User { |
| 149 |
displayName |
| 150 |
hasPremiumAccess |
| 151 |
id |
| 152 |
isFollowing |
| 153 |
isProfileOwner |
| 154 |
location |
| 155 |
locationUrl |
| 156 |
url |
| 157 |
username |
| 158 |
availabilityInfo { |
| 159 |
availabilityTimeline |
| 160 |
isAvailableFullTime |
| 161 |
isAvailableFreelance |
| 162 |
} |
| 163 |
} |
| 164 |
""" |
| 165 |
|
| 166 |
GetMoodboardItemsAndRecommendations = """\ |
| 167 |
query GetMoodboardItemsAndRecommendations( |
| 168 |
$id: Int! |
| 169 |
$firstItem: Int! |
| 170 |
$afterItem: String |
| 171 |
$shouldGetRecommendations: Boolean! |
| 172 |
$shouldGetItems: Boolean! |
| 173 |
$shouldGetMoodboardFields: Boolean! |
| 174 |
) { |
| 175 |
viewer @include(if: $shouldGetMoodboardFields) { |
| 176 |
isOptedOutOfRecommendations |
| 177 |
isAdmin |
| 178 |
} |
| 179 |
moodboard(id: $id) { |
| 180 |
...moodboardFields @include(if: $shouldGetMoodboardFields) |
| 181 |
|
| 182 |
items(first: $firstItem, after: $afterItem) @include(if: $shouldGetItems) { |
| 183 |
pageInfo { |
| 184 |
endCursor |
| 185 |
hasNextPage |
| 186 |
} |
| 187 |
nodes { |
| 188 |
...nodesFields |
| 189 |
} |
| 190 |
} |
| 191 |
|
| 192 |
recommendedItems(first: 80) @include(if: $shouldGetRecommendations) { |
| 193 |
nodes { |
| 194 |
...nodesFields |
| 195 |
fetchSource |
| 196 |
} |
| 197 |
} |
| 198 |
} |
| 199 |
} |
| 200 |
|
| 201 |
fragment moodboardFields on Moodboard { |
| 202 |
id |
| 203 |
label |
| 204 |
privacy |
| 205 |
followerCount |
| 206 |
isFollowing |
| 207 |
projectCount |
| 208 |
url |
| 209 |
isOwner |
| 210 |
owners { |
| 211 |
...OwnerFields |
| 212 |
images { |
| 213 |
size_50 { |
| 214 |
url |
| 215 |
} |
| 216 |
size_100 { |
| 217 |
url |
| 218 |
} |
| 219 |
size_115 { |
| 220 |
url |
| 221 |
} |
| 222 |
size_230 { |
| 223 |
url |
| 224 |
} |
| 225 |
size_138 { |
| 226 |
url |
| 227 |
} |
| 228 |
size_276 { |
| 229 |
url |
| 230 |
} |
| 231 |
} |
| 232 |
} |
| 233 |
} |
| 234 |
|
| 235 |
fragment projectFields on Project { |
| 236 |
__typename |
| 237 |
id |
| 238 |
isOwner |
| 239 |
publishedOn |
| 240 |
matureAccess |
| 241 |
hasMatureContent |
| 242 |
modifiedOn |
| 243 |
name |
| 244 |
url |
| 245 |
isPrivate |
| 246 |
slug |
| 247 |
license { |
| 248 |
license |
| 249 |
description |
| 250 |
id |
| 251 |
label |
| 252 |
url |
| 253 |
text |
| 254 |
images |
| 255 |
} |
| 256 |
fields { |
| 257 |
label |
| 258 |
} |
| 259 |
colors { |
| 260 |
r |
| 261 |
g |
| 262 |
b |
| 263 |
} |
| 264 |
owners { |
| 265 |
...OwnerFields |
| 266 |
images { |
| 267 |
size_50 { |
| 268 |
url |
| 269 |
} |
| 270 |
size_100 { |
| 271 |
url |
| 272 |
} |
| 273 |
size_115 { |
| 274 |
url |
| 275 |
} |
| 276 |
size_230 { |
| 277 |
url |
| 278 |
} |
| 279 |
size_138 { |
| 280 |
url |
| 281 |
} |
| 282 |
size_276 { |
| 283 |
url |
| 284 |
} |
| 285 |
} |
| 286 |
} |
| 287 |
covers { |
| 288 |
size_original { |
| 289 |
url |
| 290 |
} |
| 291 |
size_max_808 { |
| 292 |
url |
| 293 |
} |
| 294 |
size_808 { |
| 295 |
url |
| 296 |
} |
| 297 |
size_404 { |
| 298 |
url |
| 299 |
} |
| 300 |
size_202 { |
| 301 |
url |
| 302 |
} |
| 303 |
size_230 { |
| 304 |
url |
| 305 |
} |
| 306 |
size_115 { |
| 307 |
url |
| 308 |
} |
| 309 |
} |
| 310 |
stats { |
| 311 |
views { |
| 312 |
all |
| 313 |
} |
| 314 |
appreciations { |
| 315 |
all |
| 316 |
} |
| 317 |
comments { |
| 318 |
all |
| 319 |
} |
| 320 |
} |
| 321 |
} |
| 322 |
|
| 323 |
fragment exifDataValueFields on exifDataValue { |
| 324 |
id |
| 325 |
label |
| 326 |
value |
| 327 |
searchValue |
| 328 |
} |
| 329 |
|
| 330 |
fragment nodesFields on MoodboardItem { |
| 331 |
id |
| 332 |
entityType |
| 333 |
width |
| 334 |
height |
| 335 |
flexWidth |
| 336 |
flexHeight |
| 337 |
images { |
| 338 |
size |
| 339 |
url |
| 340 |
} |
| 341 |
|
| 342 |
entity { |
| 343 |
... on Project { |
| 344 |
...projectFields |
| 345 |
} |
| 346 |
|
| 347 |
... on ImageModule { |
| 348 |
project { |
| 349 |
...projectFields |
| 350 |
} |
| 351 |
|
| 352 |
colors { |
| 353 |
r |
| 354 |
g |
| 355 |
b |
| 356 |
} |
| 357 |
|
| 358 |
exifData { |
| 359 |
lens { |
| 360 |
...exifDataValueFields |
| 361 |
} |
| 362 |
software { |
| 363 |
...exifDataValueFields |
| 364 |
} |
| 365 |
makeAndModel { |
| 366 |
...exifDataValueFields |
| 367 |
} |
| 368 |
focalLength { |
| 369 |
...exifDataValueFields |
| 370 |
} |
| 371 |
iso { |
| 372 |
...exifDataValueFields |
| 373 |
} |
| 374 |
location { |
| 375 |
...exifDataValueFields |
| 376 |
} |
| 377 |
flash { |
| 378 |
...exifDataValueFields |
| 379 |
} |
| 380 |
exposureMode { |
| 381 |
...exifDataValueFields |
| 382 |
} |
| 383 |
shutterSpeed { |
| 384 |
...exifDataValueFields |
| 385 |
} |
| 386 |
aperture { |
| 387 |
...exifDataValueFields |
| 388 |
} |
| 389 |
} |
| 390 |
} |
| 391 |
|
| 392 |
... on MediaCollectionComponent { |
| 393 |
project { |
| 394 |
...projectFields |
| 395 |
} |
| 396 |
} |
| 397 |
} |
| 398 |
} |
| 399 |
|
| 400 |
fragment OwnerFields on User { |
| 401 |
displayName |
| 402 |
hasPremiumAccess |
| 403 |
id |
| 404 |
isFollowing |
| 405 |
isProfileOwner |
| 406 |
location |
| 407 |
locationUrl |
| 408 |
url |
| 409 |
username |
| 410 |
availabilityInfo { |
| 411 |
availabilityTimeline |
| 412 |
isAvailableFullTime |
| 413 |
isAvailableFreelance |
| 414 |
} |
| 415 |
} |
| 416 |
""" |