Debian Codegraph @

gallery_dl/extractor/utils/behance_graphql.py

raw
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 canBeBoosted
31 colors {
32 r
33 g
34 b
35 }
36 covers {
37 size_202 {
38 url
39 }
40 size_404 {
41 url
42 }
43 size_808 {
44 url
45 }
46 }
47 features {
48 url
49 name
50 featuredOn
51 ribbon {
52 image
53 image2x
54 image3x
55 }
56 }
57 fields {
58 id
59 label
60 slug
61 url
62 }
63 hasMatureContent
64 id
65 oid
66 isBoosted
67 isFeatured
68 isHiddenFromWorkTab
69 isMatureReviewSubmitted
70 isMonaReported
71 isOwner
72 isFounder
73 isPinnedToSubscriptionOverview
74 isPrivate
75 sourceFiles {
76 ...sourceFileWithCoverFields
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 privacyLevel
92 profileSectionId
93 stats {
94 appreciations {
95 all
96 }
97 views {
98 all
99 }
100 comments {
101 all
102 }
103 }
104 slug
105 tools {
106 id
107 title
108 category
109 categoryLabel
110 categoryId
111 approved
112 url
113 backgroundColor
114 }
115 url
116 }
117 }
118 }
119 }
120
121
122 fragment sourceFileWithCoverFields on SourceFile {
123 __typename
124 sourceFileId
125 projectId
126 userId
127 creator {
128 username
129 }
130 title
131 assetId
132 renditionUrl
133 mimeType
134 size
135 category
136 licenseType
137 unitAmount
138 currency
139 tier
140 hidden
141 extension
142 hasUserPurchased
143 description
144 cover {
145 coverUrl
146 coverX
147 coverY
148 coverScale
149 width
150 height
151 }
152 }
153
154
155 fragment OwnerFields on User {
156 displayName
157 hasPremiumAccess
158 id
159 isFollowing
160 isProfileOwner
161 location
162 locationUrl
163 url
164 username
165 isMessageButtonVisible
166 availabilityInfo {
167 availabilityTimeline
168 isAvailableFullTime
169 isAvailableFreelance
170 hiringTimeline {
171 key
172 label
173 }
174 }
175 creatorPro {
176 isActive
177 initialSubscriptionDate
178 }
179 recruiterPro {
180 isActive
181 }
182 }
183 """
184
185 GetMoodboardItemsAndRecommendations = """\
186 query GetMoodboardItemsAndRecommendations(
187 $id: Int!
188 $firstItem: Int!
189 $afterItem: String
190 $shouldGetRecommendations: Boolean!
191 $shouldGetItems: Boolean!
192 $shouldGetMoodboardFields: Boolean!
193 ) {
194 viewer @include(if: $shouldGetMoodboardFields) {
195 isOptedOutOfRecommendations
196 isAdmin
197 }
198 moodboard(id: $id) {
199 ...moodboardFields @include(if: $shouldGetMoodboardFields)
200
201 items(first: $firstItem, after: $afterItem) @include(if: $shouldGetItems) {
202 pageInfo {
203 endCursor
204 hasNextPage
205 }
206 nodes {
207 ...nodesFields
208 }
209 }
210
211 recommendedItems(first: 80) @include(if: $shouldGetRecommendations) {
212 nodes {
213 ...nodesFields
214 fetchSource
215 }
216 }
217 }
218 }
219
220 fragment moodboardFields on Moodboard {
221 id
222 label
223 privacy
224 followerCount
225 isFollowing
226 projectCount
227 url
228 isOwner
229 owners {
230 ...OwnerFields
231 images {
232 size_50 {
233 url
234 }
235 size_100 {
236 url
237 }
238 size_115 {
239 url
240 }
241 size_230 {
242 url
243 }
244 size_138 {
245 url
246 }
247 size_276 {
248 url
249 }
250 }
251 }
252 }
253
254 fragment projectFields on Project {
255 __typename
256 id
257 isOwner
258 publishedOn
259 matureAccess
260 hasMatureContent
261 modifiedOn
262 name
263 url
264 isPrivate
265 slug
266 license {
267 license
268 description
269 id
270 label
271 url
272 text
273 images
274 }
275 fields {
276 label
277 }
278 colors {
279 r
280 g
281 b
282 }
283 owners {
284 ...OwnerFields
285 images {
286 size_50 {
287 url
288 }
289 size_100 {
290 url
291 }
292 size_115 {
293 url
294 }
295 size_230 {
296 url
297 }
298 size_138 {
299 url
300 }
301 size_276 {
302 url
303 }
304 }
305 }
306 covers {
307 size_original {
308 url
309 }
310 size_max_808 {
311 url
312 }
313 size_808 {
314 url
315 }
316 size_404 {
317 url
318 }
319 size_202 {
320 url
321 }
322 size_230 {
323 url
324 }
325 size_115 {
326 url
327 }
328 }
329 stats {
330 views {
331 all
332 }
333 appreciations {
334 all
335 }
336 comments {
337 all
338 }
339 }
340 }
341
342 fragment exifDataValueFields on exifDataValue {
343 id
344 label
345 value
346 searchValue
347 }
348
349 fragment nodesFields on MoodboardItem {
350 id
351 entityType
352 width
353 height
354 flexWidth
355 flexHeight
356 images {
357 size
358 url
359 }
360
361 entity {
362 ... on Project {
363 ...projectFields
364 }
365
366 ... on ImageModule {
367 project {
368 ...projectFields
369 }
370
371 colors {
372 r
373 g
374 b
375 }
376
377 exifData {
378 lens {
379 ...exifDataValueFields
380 }
381 software {
382 ...exifDataValueFields
383 }
384 makeAndModel {
385 ...exifDataValueFields
386 }
387 focalLength {
388 ...exifDataValueFields
389 }
390 iso {
391 ...exifDataValueFields
392 }
393 location {
394 ...exifDataValueFields
395 }
396 flash {
397 ...exifDataValueFields
398 }
399 exposureMode {
400 ...exifDataValueFields
401 }
402 shutterSpeed {
403 ...exifDataValueFields
404 }
405 aperture {
406 ...exifDataValueFields
407 }
408 }
409 }
410
411 ... on MediaCollectionComponent {
412 project {
413 ...projectFields
414 }
415 }
416 }
417 }
418
419 fragment OwnerFields on User {
420 displayName
421 hasPremiumAccess
422 id
423 isFollowing
424 isProfileOwner
425 location
426 locationUrl
427 url
428 username
429 availabilityInfo {
430 availabilityTimeline
431 isAvailableFullTime
432 isAvailableFreelance
433 }
434 }
435 """