[civitai] use tuples instead of lists for API parameter constants
This commit is contained in:
@@ -321,7 +321,7 @@ class CivitaiModelExtractor(CivitaiExtractor):
|
|||||||
else:
|
else:
|
||||||
params = {
|
params = {
|
||||||
"modelVersionId": version["id"],
|
"modelVersionId": version["id"],
|
||||||
"prioritizedUserIds": [user["id"]],
|
"prioritizedUserIds": (user["id"],),
|
||||||
"period": "AllTime",
|
"period": "AllTime",
|
||||||
"sort": "Most Reactions",
|
"sort": "Most Reactions",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
@@ -499,7 +499,7 @@ class CivitaiUserVideosExtractor(CivitaiExtractor):
|
|||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
user, query = match.groups()
|
user, query = match.groups()
|
||||||
self.params = self._parse_query(query)
|
self.params = self._parse_query(query)
|
||||||
self.params["types"] = ["video"]
|
self.params["types"] = ("video",)
|
||||||
if self.params.get("section") == "reactions":
|
if self.params.get("section") == "reactions":
|
||||||
self.subcategory = "reactions-videos"
|
self.subcategory = "reactions-videos"
|
||||||
self.images = self._image_reactions
|
self.images = self._image_reactions
|
||||||
@@ -631,11 +631,11 @@ class CivitaiTrpcAPI():
|
|||||||
"useIndex" : True,
|
"useIndex" : True,
|
||||||
"period" : "AllTime",
|
"period" : "AllTime",
|
||||||
"sort" : "Newest",
|
"sort" : "Newest",
|
||||||
"types" : ["image"],
|
"types" : ("image",),
|
||||||
"withMeta" : False, # Metadata Only
|
"withMeta" : False, # Metadata Only
|
||||||
"fromPlatform" : False, # Made On-Site
|
"fromPlatform" : False, # Made On-Site
|
||||||
"browsingLevel": self.nsfw,
|
"browsingLevel": self.nsfw,
|
||||||
"include" : ["cosmetics"],
|
"include" : ("cosmetics",),
|
||||||
})
|
})
|
||||||
|
|
||||||
params = self._type_params(params)
|
params = self._type_params(params)
|
||||||
@@ -714,7 +714,7 @@ class CivitaiTrpcAPI():
|
|||||||
"followed" : False,
|
"followed" : False,
|
||||||
"draftOnly" : False,
|
"draftOnly" : False,
|
||||||
"pending" : True,
|
"pending" : True,
|
||||||
"include" : ["cosmetics"],
|
"include" : ("cosmetics",),
|
||||||
})
|
})
|
||||||
|
|
||||||
params = self._type_params(params)
|
params = self._type_params(params)
|
||||||
@@ -823,7 +823,7 @@ class CivitaiSearchAPI():
|
|||||||
"highlightPostTag": "__/ais-highlight__",
|
"highlightPostTag": "__/ais-highlight__",
|
||||||
"limit" : 51,
|
"limit" : 51,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"filter": [self._generate_filter(nsfw)],
|
"filter": (self._generate_filter(nsfw),),
|
||||||
}
|
}
|
||||||
|
|
||||||
return self._pagination(endpoint, query)
|
return self._pagination(endpoint, query)
|
||||||
|
|||||||
Reference in New Issue
Block a user