-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
resource.py
41 lines (28 loc) · 968 Bytes
/
resource.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from __future__ import annotations
from typing import Any
from satori.element import Resource as RawResource
from avilla.core.resource import Resource
class SatoriResource(Resource[bytes], RawResource):
def __init__(
self, src: str, extra: dict[str, Any] | None = None, cache: bool | None = None, timeout: str | None = None
):
RawResource.__init__(self, src, extra, cache, timeout)
class SatoriImageResource(SatoriResource):
def __init__(
self,
src: str,
extra: dict[str, Any] | None = None,
cache: bool | None = None,
timeout: str | None = None,
width: int | None = None,
height: int | None = None,
):
super().__init__(src, extra, cache, timeout)
self.width = width
self.height = height
class SatoriAudioResource(SatoriResource):
pass
class SatoriVideoResource(SatoriResource):
pass
class SatoriFileResource(SatoriResource):
pass