D wrapper around (some) of the pixiv web API
Révision | 8ecf2fef46902817bfe693cc00b96753531429d1 (tree) |
---|---|
l'heure | 2023-12-10 14:31:10 |
Auteur | supercell <stigma@disr...> |
Commiter | supercell |
Replace 'in' parameter with 'const'
Will swap over for 'in' when the preview period is over (or the DFL
figures out how they want to implement "editions")
@@ -36,7 +36,7 @@ class Illustration | ||
36 | 36 | /** |
37 | 37 | * Create an Illustration from a JSONValue. |
38 | 38 | */ |
39 | - static Illustration fromJSON(in ref JSONValue json) | |
39 | + static Illustration fromJSON(const ref JSONValue json) | |
40 | 40 | { |
41 | 41 | if (mixin(mixCheckJsonError!("json"))) { |
42 | 42 | throw new PixivJSONException(json["message"].str); |
@@ -32,7 +32,7 @@ class Thumbnail | ||
32 | 32 | string[string] urls; |
33 | 33 | string profileImageUrl; |
34 | 34 | |
35 | - static Thumbnail fromJSON(in ref JSONValue json) | |
35 | + static Thumbnail fromJSON(const ref JSONValue json) | |
36 | 36 | { |
37 | 37 | auto thumb = new Thumbnail(); |
38 | 38 |
@@ -21,7 +21,7 @@ private: | ||
21 | 21 | Frame[] frames; |
22 | 22 | |
23 | 23 | public: |
24 | - static Ugoira fromJSON(in ref JSONValue json) { | |
24 | + static Ugoira fromJSON(const ref JSONValue json) { | |
25 | 25 | |
26 | 26 | if (mixin(mixCheckJsonError!("json"))) { |
27 | 27 | throw new PixivJSONException(json["message"].str); |
@@ -19,7 +19,7 @@ public: | ||
19 | 19 | string userId; |
20 | 20 | string userName; |
21 | 21 | |
22 | - static User fromJSON(in ref JSONValue json) | |
22 | + static User fromJSON(const ref JSONValue json) | |
23 | 23 | { |
24 | 24 | auto user = new User(); |
25 | 25 |
@@ -44,7 +44,7 @@ class FullUser : User | ||
44 | 44 | { |
45 | 45 | public string profileImageUrlBig; |
46 | 46 | |
47 | - static FullUser fromJSON(in ref JSONValue json) | |
47 | + static FullUser fromJSON(const ref JSONValue json) | |
48 | 48 | { |
49 | 49 | auto user = new FullUser(); |
50 | 50 |
@@ -92,7 +92,7 @@ public: | ||
92 | 92 | // Illustration[](?) pickup; |
93 | 93 | // ? request; |
94 | 94 | |
95 | - static UserBrief fromJSON(in ref JSONValue json) | |
95 | + static UserBrief fromJSON(const ref JSONValue json) | |
96 | 96 | { |
97 | 97 | auto ub = new UserBrief(); |
98 | 98 |