Debian Codegraph @

gallery_dl/extractor/utils/luscious_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 AlbumGet = """
10 query AlbumGet($id: ID!) {
11 album {
12 get(id: $id) {
13 ... on Album {
14 ...AlbumStandard
15 }
16 ... on MutationError {
17 errors {
18 code
19 message
20 }
21 }
22 }
23 }
24 }
25
26 fragment AlbumStandard on Album {
27 __typename
28 id
29 title
30 labels
31 description
32 created
33 modified
34 like_status
35 number_of_favorites
36 rating
37 status
38 marked_for_deletion
39 marked_for_processing
40 number_of_pictures
41 number_of_animated_pictures
42 slug
43 is_manga
44 url
45 download_url
46 permissions
47 cover {
48 width
49 height
50 size
51 url
52 }
53 created_by {
54 id
55 name
56 display_name
57 user_title
58 avatar {
59 url
60 size
61 }
62 url
63 }
64 content {
65 id
66 title
67 url
68 }
69 language {
70 id
71 title
72 url
73 }
74 tags {
75 id
76 category
77 text
78 url
79 count
80 }
81 genres {
82 id
83 title
84 slug
85 url
86 }
87 audiences {
88 id
89 title
90 url
91 url
92 }
93 last_viewed_picture {
94 id
95 position
96 url
97 }
98 }
99 """
100
101 AlbumListOwnPictures = """
102 query AlbumListOwnPictures($input: PictureListInput!) {
103 picture {
104 list(input: $input) {
105 info {
106 ...FacetCollectionInfo
107 }
108 items {
109 ...PictureStandardWithoutAlbum
110 }
111 }
112 }
113 }
114
115 fragment FacetCollectionInfo on FacetCollectionInfo {
116 page
117 has_next_page
118 has_previous_page
119 total_items
120 total_pages
121 items_per_page
122 url_complete
123 url_filters_only
124 }
125
126 fragment PictureStandardWithoutAlbum on Picture {
127 __typename
128 id
129 title
130 created
131 like_status
132 number_of_comments
133 number_of_favorites
134 status
135 width
136 height
137 resolution
138 aspect_ratio
139 url_to_original
140 url_to_video
141 is_animated
142 position
143 tags {
144 id
145 category
146 text
147 url
148 }
149 permissions
150 url
151 thumbnails {
152 width
153 height
154 size
155 url
156 }
157 }
158 """
159
160 AlbumListWithPeek = """
161 query AlbumListWithPeek($input: AlbumListInput!) {
162 album {
163 list(input: $input) {
164 info {
165 ...FacetCollectionInfo
166 }
167 items {
168 ...AlbumMinimal
169 peek_thumbnails {
170 width
171 height
172 size
173 url
174 }
175 }
176 }
177 }
178 }
179
180 fragment FacetCollectionInfo on FacetCollectionInfo {
181 page
182 has_next_page
183 has_previous_page
184 total_items
185 total_pages
186 items_per_page
187 url_complete
188 url_filters_only
189 }
190
191 fragment AlbumMinimal on Album {
192 __typename
193 id
194 title
195 labels
196 description
197 created
198 modified
199 number_of_favorites
200 number_of_pictures
201 slug
202 is_manga
203 url
204 download_url
205 cover {
206 width
207 height
208 size
209 url
210 }
211 content {
212 id
213 title
214 url
215 }
216 language {
217 id
218 title
219 url
220 }
221 tags {
222 id
223 category
224 text
225 url
226 count
227 }
228 genres {
229 id
230 title
231 slug
232 url
233 }
234 audiences {
235 id
236 title
237 url
238 }
239 }
240 """