+
     hIO  c                  sz   ^ RI Ht ^ RIHtHtHtHt ^RIHt ^RI	H
t
HtHt ]'       d7   ^RIHtHt ^RIHtHtHtHtHtHtHtHtHtHtHtHtHtHtHt ^RI	Ht ^RI H!t!  ! R	 R
4      t" ! R R4      t# ! R R4      t$ ! R R4      t% ! R R4      t& ! R R4      t' ! R R4      t( ! R R4      t) ! R R4      t*R# )i    )annotations)TYPE_CHECKINGListTupleUnion)Tag)BASE_URLget_pageget_sitearea)
ResultList	Thumbnail)AddonCategoryArticleCategory
DifficultyFileCategoryGenreHardwareCategoryLicencePlayerStyleRSSTypeScopeSoftwareCategoryStatusTheme	TimeFrameTutorialCategory)Object)Gamec                  sN    ] tR t^tRtRRRRRRRRRRRRRR	RR
R/R R llltRtR# )GetGamesMixinz.Abstract class containing the get_games methodqueryNstatusgenrethemescopeplayers	timeframesortc               @    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRR/
# )   indexintr   strr   r   r   r   r    r   r!   r   r"   r   r#   r   r$   Tuple[str, str]returnr	    Zformat   "7/usr/lib/python3.14/site-packages/moddb/pages/mixins.py__annotate__ZGetGamesMixin.__annotate__"   sz     5J 5J5J 	5J
 5J 5J 5J 5J 5J 5J 5J 
5J    c               s   RRRTRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   VP                   MRR	V'       d   VP                   MRR
V'       d   VP                   MRRV	'       d   V	^ ,           RV	^,           2MR/	p
V P                  V P                   RV 2V
R7      # )a  Get a page of games for the model. Each page will yield up to 30 games.

Parameters
-----------
index : Optional[int]
    The page number to get the games for.
query : Optional[str]
    The text to look for in the game names.
status : Optional[Status]
    The status of the game (unreleased, released, early access, ect...)
genre : Optional[Genre]
    The genre of the game (fps, tower defense)
theme : Optional[Theme]
    The theme of the game (fantasy, action)
scope : Optional[Scope]
    The scope of the game (AAA, indie)
players : Optional[PlayerStyle]
    Player styles of the game (co-op, singleplayer)
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    List of game like thumbnails that can be parsed individually.
filtertkwreleasedNr   r    Zindier"   r#   r$   -z/games/page/paramsvalue_geturl)selfr'   r   r   r   r    r!   r"   r#   r$   r8      &&$$$$$$$$ r/   	get_gamesZGetGamesMixin.get_games"   s    T c%DEU[[tEU[[tEU[[tw}}TI4dtAwiqa	*

 yyDHH:\%9&yIIr1   r,   i   )__name__
__module____qualname____firstlineno____doc__r?   __static_attributes__r,   r1   r/   r   r      si    85J 	5J
 5J 5J 5J 5J  $5J  $5J !%5J 5Jr1   r   c                  sN    ] tR t^ZtRtRRRRRRRRRRRRRR	RR
R/R R llltRtR# )GetModsMixinz,Abstract class containing the get_mod methodr   Nr   r   r    r"   r#   gamer$   c               r%   )r&   r'   r(   r   r)   r   r   r   r   r    r   r"   r   r#   r   rH   zUnion[Game, Object]r$   r*   r+   r	   r,   r-   r.   r/   r0   ZGetModsMixin.__annotate__]   sz     6I 6I6I 	6I
 6I 6I 6I 6I 6I "6I 6I 
6Ir1   c               s   RRRTRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   VP                   MRR	V'       d   VP                   MRR
V'       d   VP                  MRRV	'       d   V	^ ,           RV	^,           2MR/	p
V P                  V P                   RV 2V
R7      # )a  Get a page of mods for the game. Each page will yield up to 30 mods.

Parameters
-----------
index : int
    The page number to get the mods from.
query : Optional[str]
    The text to look for in the mod names.
status : Optional[Status]
    The status of the mod (unreleased, released, early access, ect...)
genre : Optional[Genre]
    The genre of the mod (fps, tower defense)
theme : Optional[Theme]
    The theme of the mod (fantasy, action)
players : Optional[PlayerStyle]
    Player styles of the mod (co-op, singleplayer)
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
game : Union[mod, Object]
    An mod object or an object with an id attribute which represents the
    mod the mod belongs to.
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    The list of mods type thumbnails parsed from the game
r2   r3   r4   r5   Nr   r    r"   r#   rH   r$   r6   z/mods/page/r7   )r:   idr;   r<   )r=   r'   r   r   r   r    r"   r#   rH   r$   r8   r>   r/   get_modsZGetModsMixin.get_mods]   s    V c%DEU[[tEU[[tw}}TI4tDGGdtAwiqa	*

 yyDHH:[8yHHr1   r,   r@   )rA   rB   rC   rD   rE   rJ   rF   r,   r1   r/   rG   rG   Z   si    66I 	6I
 6I 6I 6I  $6I  $6I %)6I !%6I 6Ir1   rG   c                  sB    ] tR t^tRtRRRRRRRRRRR/R R	 llltR
tR# )GetEnginesMixinz0Abstract class containing the get_engines methodr   Nr   licencer#   r$   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r&   r'   r(   r   r)   r   r   rL   r   r#   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   ZGetEnginesMixin.__annotate__   sY     (L (L(L 	(L
 (L (L (L (L 
(Lr1   c                  RRRTRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   V^ ,           R	V^,           2MR/pV P                  V P                   R
V 2VR7      # )a  Get a page of engines for the game. Each page will yield up to 30 engines.

Parameters
-----------
index : int
    The page number to get the engines from.
query : Optional[str]
    The text to look for in the engine names.
status : Optional[Status]
    The status of the game (unreleased, released, early access, ect...)
licence : Optional[Licence]
    The licence of the engine (open source, proprietary, ect...)
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results
Returns
--------
ResultList[Thumbnail]
    The list of engine type thumbnails parsed from the game
r2   r3   r4   r5   NrL   r#   r$   r6   z/engines/page/r7   r9   )r=   r'   r   r   rL   r#   r$   r8      &&$$$$$ r/   get_enginesZGetEnginesMixin.get_engines   s}    @ c%Dw}}TI4dtAwiqa	*
 yyDHH:^E7;FyKKr1   r,   r@   )rA   rB   rC   rD   rE   rP   rF   r,   r1   r/   rK   rK      sH    :(L 	(L
 (L  (L  $(L !%(L (Lr1   rK   c                  s    ] tR t^tRtRRRRRRR/R R llltRRRRRR	RRR/R
 R llltRRRRRRRR	RRR/R R llltR R ltR R lt	RRRRRRRRR/R R lllt
RtR# )SharedMethodsMixinzfAbstract class that implements a certain amount of top level methods shared between Pages
and Hardwarer   Nratingr$   c          
     s,    V ^8  d   QhRRRRRRRRRR	/# )
r&   r'   r(   r   r)   rR   r$   r*   r+   r	   r,   r-   r.   r/   r0   SharedMethodsMixin.__annotate__   s<     /
 /
/
 	/

 /
 /
 
/
r1   c               s    ^RI HpHp RRRTRTRV'       d   V^ ,           RV^,           2MR/pV P                   R	2pV R
V 2p	\	        WR7      p
V! V
4      w  rrV! VVVVVVR7      # )a  Get a page of reviews for the page. Each page will yield up to 10 reviews.

Parameters
-----------
index : Optional[int]
    The page number to get the reviews from.
query : Optional[str]
    The string to look for in the review, optional.
rating : Optiona[int]
    A number between 1 and 10 to get the ratings
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Review]
    The list of reviews parsed from the page
)
ReviewListparse_reviewsr2   r3   r4   rR   r$   r6   Nz/reviewsz/page/r7   )resultsr<   total_resultsr8   current_pagetotal_pages)ZopinionrT   rU   r<   r   )r=   r'   r   rR   r$   rT   rU   r8   Zbase_urlr<   htmlrV   rX   rY   rW   s   &&$$$          r/   get_reviewsZSharedMethodsMixin.get_reviews   s    4 	7 c%fdtAwiqa	*	
 hhZx(
&(+<I$<O9{'%#
 	
r1   categoryr#   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r&   r'   r(   r   r)   r\   r   r#   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   rS      sN     %M %M%M 	%M
 "%M %M %M 
%Mr1   c               s    RRRTRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   V^ ,           RV^,           2MR/pV P                  V P                   R	V 2VR
7      # )az  Get a page of articles for the page. Each page will yield up to 30 articles.

Parameters
-----------
index : Optional[int]
    The page number to get the articles from.
query : Optional[str]
    The string query to search for in the article name, optional.
category : Optional[ArticleCategory]
    Type enum defining what the article is, optional
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    The list of article type thumbnails parsed from the page
r2   r3   r4   typeNr#   r$   r6   z/articles/page/r7   r9   )r=   r'   r   r\   r#   r$   r8      &&$$$$ r/   get_articlesZSharedMethodsMixin.get_articles   so    < c%hHNNDI4dtAwiqa	*
 yyDHH:_UG<VyLLr1   
addon_typec               rM   )r&   r'   r(   r   r)   r\   r   ra   r   r#   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   rS      sY     )N )N)N 	)N
 )N ")N )N )N 
)Nr1   c               rN   )a  Get a page of files for the page. Each page will yield up to 30 files.

Parameters
-----------
index : Optional[int]
    The page number to get the files from.
query : Optional[str]
    The string query to search for in the file name, optional.
category : [FileCategory]
    Type enum defining what the file is, optional
addon_type : Optional[AddonCategory]
    Type enum defining what category the file is.
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    The list of file type thumbnails parsed from the page
r2   r3   r4   r\   NZcategoryaddonr#   r$   r6   z/downloads/page/r7   r9   )r=   r'   r   r\   ra   r#   r$   r8   rO   r/   	get_filesZSharedMethodsMixin.get_files   s    B c%(Z--I4dtAwiqa	*
 yyDHH:%5eW=fyMMr1   c                   V ^8  d   QhRR/# r&   r+   zList[Thumbnail]r,   r-   r.   r/   r0   rS   K       - -O -r1   c                sX    \        V P                   R24      pV P                  ^VR7      # )a{  Get all the images a page has uploaded. Literally all of them. As thumbnails. ModDB's imagebox
caches all the urls for images on the page so this grabs them all. Lists might be long, but this
is all the images. They can be invidually parsed to get full fledged media objects from them.

Returns
--------
List[Thumbnail]
    The list of image type thumbnails parsed from the page
z/imagesrZ   r   r<   Z
_get_mediar=   rZ      & r/   
get_imagesZSharedMethodsMixin.get_imagesK  ,     488*G,-qt,,r1   c               rc   rd   r,   r-   r.   r/   r0   rS   X  re   r1   c                sX    \        V P                   R24      pV P                  ^VR7      # )a{  Get all the videos a page has uploaded. Literally all of them. As thumbnails. ModDB's imagebox
caches all the urls for videos on the page so this grabs them all. Lists might be long, but this
is all the videos. They can be invidually parsed to get full fledged media objects from them.

Returns
--------
List[Thumbnail]
    The list of video type thumbnails parsed from the page
z/videosrf   rg   rh   ri   r/   
get_videosZSharedMethodsMixin.get_videosX  rk   r1   
difficultytutorial_typec               r]   )r&   r'   r(   r   r)   rm   r   rn   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   rS   e  sN     %N %N%N 	%N
 %N (%N %N 
%Nr1   c               s    RRRTRV'       d   VP                   MRRV'       d   VP                   MRRV'       d   V^ ,           RV^,           2MR/pV P                  V P                   R	V 2VR
7      # )a  Get a page of tutorial for the page. Each page will yield up to 30 tutorials.

Parameters
-----------
index : Optional[int]
    The page number to get the tutorials from.
query : Optional[str]
    The string query to look for in the tutorial title, optional.
difficulty : Optional[Difficulty]
    Enum type representing the difficulty of the tutorial, optional.
tutorial_type : Optional[TutorialCategory]
    Enum type representing the theme/type/category of the tutorial, optional.
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    The list of article type thumbnails parsed from the page
r2   r3   r4   ZsubtypeNZmetar$   r6   z/tutorials/page/r7   r9   )r=   r'   r   rm   rn   r$   r8   r_   r/   get_tutorialsZ SharedMethodsMixin.get_tutorialse  st    < c%m}**
J$$dtAwiqa	*
 yyDHH:%5eW=fyMMr1   r,   r@   )rA   rB   rC   rD   rE   r[   r`   rb   rj   rl   ro   rF   r,   r1   r/   rQ   rQ      s    /
 	/

 /
 !%/
 /
b%M 	%M
 %)%M  $%M !%%M %MN)N 	)N
 "&)N %))N  $)N !%)N )NV--%N 	%N
 "&%N +/%N !%%N %Nr1   rQ   c                  sj    ] tR tRtRtRRRRRRRRRRR/R	 R
 llltRRRRRRRRRRR/R R llltRtR# )GetWaresMixini  z8Abstrac class implementing get_software and get_hardwarer   Nr   r\   r#   r$   c               rM   )r&   r'   r(   r   r)   r   r   r\   r   r#   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   GetWaresMixin.__annotate__  Y     )M )M)M 	)M
 )M #)M )M )M 
)Mr1   c               rN   )a  Get a page of hardware for the platform. Each page will yield up to 30 hardware.

Parameters
-----------
index : Optional[int]
    The page number to get the hardware for.
query : Optional[str]
    The text to look for in the hardware's names
status : Optional[Status]
    Status of the hardware (released, unreleased, early access...)
category : Optional[HardwareCategory]
    Category of the hardware (headset, controller, ect...)
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by

Returns
--------
ResultList[Thumbnail]
    List of hardware like thumbnails that can be parsed individually.
r2   r3   r4   r5   Nr\   r#   r$   r6   z/hardware/page/r7   r9   r=   r'   r   r   r\   r#   r$   r8   rO   r/   get_hardwareZGetWaresMixin.get_hardware  }    B c%D(I4dtAwiqa	*
 yyDHH:_UG<VyLLr1   c               rM   )r&   r'   r(   r   r)   r   r   r\   r   r#   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   rq     rr   r1   c               rN   )a  Get a page of software for the platform. Each page will yield up to 30 software.

Parameters
-----------
index : Optional[int]
    The page number to get the software for.
query : Optional[str]
    The text to look for in the hardware's names
status : Optional[Status]
    Status of the hardware (released, unreleased, early access...)
category : Optional[SoftwareCategory]
    Category of the hardware (headset, controller, ect...)
timeframe : Optional[TimeFrame]
    The time period this was released in (last 24hr, last week, last month)
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by

Returns
--------
ResultList[Thumbnail]
    List of software like thumbnails that can be parsed individually.
r2   r3   r4   r5   Nr\   r#   r$   r6   z/software/page/r7   r9   rs   rO   r/   get_softwareZGetWaresMixin.get_software  ru   r1   r,   r@   )rA   rB   rC   rD   rE   rt   rv   rF   r,   r1   r/   rp   rp     s    B)M 	)M
 )M &*)M  $)M !%)M )MV)M 	)M
 )M &*)M  $)M !%)M )Mr1   rp   c                  s"    ] tR tRtR R ltRtR# )RSSFeedMixini  c               rc   )r&   r^   r   r,   r-   r.   r/   r0   ZRSSFeedMixin.__annotate__  s     b b br1   c                sj    RV P                   P                   RV P                   RVP                   R2# )zGet the RSS feed url for the page depending on which feed type you want

Parameters
-----------
type : RSSType
    The type of feed you desire to get

Returns
--------
str
    URL for the feed type
zhttps://rss.moddb.com/Z/z/feed/rss.xml)Z_typeZnameZname_id)r=   r^   s   &&r/   rssZRSSFeedMixin.rss  s1     (

'8$,,qS`aar1   r,   N)rA   rB   rC   rD   rx   rF   r,   r1   r/   rw   rw     s    b br1   rw   c                  s>    ] tR tRtRRRRRRRRRRR/R R	 llltR
tR# )GetAddonsMixini  r   Nra   r#   rL   r$   c               rM   )r&   r'   r(   r   r)   ra   r   r#   r   rL   r   r$   r*   r+   r	   r,   r-   r.   r/   r0   ZGetAddonsMixin.__annotate__  sY     (K (K(K 	(K
 "(K (K (K (K 
(Kr1   c               rN   )a  Get a page of addons for the page. Each page will yield up to 30 addons.

Parameters
-----------
index : Optional[int]
    The page number to get the addons from.
query : Optional[str]
    The string query to search for in the addon name, optional.
addon_type : Optional[AddonCategory]
    Type enum defining what category the file is.
timeframe : Optional[TimeFrame]
    Time frame of when the file was added, optional
licence : Optional[Licence]
    The licence for the addon, optional
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    The list of addon type thumbnails parsed from the page
r2   r3   r4   r\   Nr#   rL   r$   r6   z/addons/page/r7   r9   )r=   r'   r   ra   r#   rL   r$   r8   rO   r/   
get_addonsZGetAddonsMixin.get_addons  s    B c%J
((DI4w}}TdtAwiqa	*
 yyDHH:]5':6yJJr1   r,   r@   )rA   rB   rC   rD   rz   rF   r,   r1   r/   ry   ry     sE    (K 	(K
 %)(K  $(K  (K !%(K (Kr1   ry   c                  s2    ] tR tRtRRRRR/R R llltRtR# )	GetWatchersMixini$  r   Nr$   c               s(    V ^8  d   QhRRRRRRRR/# )	r&   r'   r(   r   r)   r$   r*   r+   r	   r,   r-   r.   r/   r0   ZGetWatchersMixin.__annotate__%  s2     M MM(+M:IM	Mr1   c          	     s    RRRTRV'       d   V^ ,           RV^,           2MR/pV P                  V P                   RV 2VR7      # )	a  Get a page of watchers for the page. Each page will yield up to 30 members.

Parameters
-----------
index : Optional[int]
    The page number to get the watchers from.
query : Optional[str]
    The string query to search for in the watcher name, optional.
sort : Optional[Tuple[str, str]]
    The sorting tuple to sort by the results

Returns
--------
ResultList[Thumbnail]
    The list of member type thumbnails parsed from the page
r2   r3   r4   r$   r6   Nz/watchers/page/r7   )r;   r<   )r=   r'   r   r$   r8   s   &&$$ r/   get_watchersZGetWatchersMixin.get_watchers%  sU    * c%dtAwiqa	*
 yyDHH:_UG<VyLLr1   r,   r@   )rA   rB   rC   rD   r|   rF   r,   r1   r/   r{   r{   $  s     M.2MLPM Mr1   r{   c                  s    ] tR tRtR tRtR# )GetTagsMixiniB  c                s   RRR\        V P                  4      RV P                  /p\        \         R2VRR7      p\        VR,          \        4      '       d   . # VR,          P                  4        Uu. uF  p\        R	/ VB NK  	  up# u upi )
zPGet more tags for a page.

Returns
--------
List[Tag]
    List of returned tags
Zajaxr3   ZsiteareaZ
siteareaidz/tags/ajax/moreT)r8   ZjsonZtagsr,   )	r   r<   rI   r   r   Z
isinstanceZlistZvaluesr   )r=   r8   ZrespZtags   &   r/   get_tagsZGetTagsMixin.get_tagsC  s     #z<+A<QUQXQXY8*O4V$O d6lD))I&*6l&9&9&;<&;s
c
&;<<<s   3B
r,   N)rA   rB   rC   rD   r~   rF   r,   r1   r/   r}   r}   B  s    =r1   r}   N)+Z
__future__r    Ztypingr   r   r   r   Zboxesr   Zutilsr   r   r   r	   r
   Zenumsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rH   r   r   rG   rK   rQ   rp   rw   ry   r{   r}   r,   r1   r/   <module>r      s    " 4 4  4 4-    " 8J 8Jv9I 9Ix+L +L\FN FNRWM WMtb b")K )KXM M<= =r1   