|
2 | 2 | from datetime import datetime |
3 | 3 |
|
4 | 4 | from hvpy.core import execute_api_call |
| 5 | +from hvpy.datasource import DataSource |
5 | 6 | from hvpy.parameters import * |
6 | 7 | from hvpy.utils import _add_shared_docstring |
7 | 8 |
|
|
28 | 29 | @_add_shared_docstring(getJP2ImageInputParameters) |
29 | 30 | def getJP2Image( |
30 | 31 | date: datetime, |
31 | | - sourceId: int, |
| 32 | + sourceId: Union[int, DataSource], |
32 | 33 | jpip: bool = False, |
33 | 34 | json: bool = False, |
34 | 35 | ) -> Union[bytes, str, Dict[str, Any]]: |
@@ -75,7 +76,7 @@ def getJP2Header( |
75 | 76 | def getJPXClosestToMidPoint( |
76 | 77 | startTimes: List[datetime], |
77 | 78 | endTimes: List[datetime], |
78 | | - sourceId: int, |
| 79 | + sourceId: Union[int, DataSource], |
79 | 80 | linked: bool = True, |
80 | 81 | verbose: bool = False, |
81 | 82 | jpip: bool = False, |
@@ -115,7 +116,7 @@ def getJPXClosestToMidPoint( |
115 | 116 | def getJPX( |
116 | 117 | startTime: List[datetime], |
117 | 118 | endTime: List[datetime], |
118 | | - sourceId: int, |
| 119 | + sourceId: Union[int, DataSource], |
119 | 120 | linked: bool = True, |
120 | 121 | verbose: bool = False, |
121 | 122 | jpip: bool = False, |
@@ -175,7 +176,7 @@ def getStatus() -> Union[bytes, str, Dict[str, Any]]: |
175 | 176 | @_add_shared_docstring(getClosestImageInputParameters) |
176 | 177 | def getClosestImage( |
177 | 178 | date: datetime, |
178 | | - sourceId: int, |
| 179 | + sourceId: Union[int, DataSource], |
179 | 180 | callback: Optional[str] = None, |
180 | 181 | ) -> Union[bytes, str, Dict[str, Any]]: |
181 | 182 | """ |
@@ -424,7 +425,7 @@ def reQueueMovie( |
424 | 425 |
|
425 | 426 | @_add_shared_docstring(getMovieStatusInputParameters) |
426 | 427 | def getMovieStatus( |
427 | | - id: str, |
| 428 | + id: Union[int, DataSource], |
428 | 429 | format: str, |
429 | 430 | verbose: bool = False, |
430 | 431 | callback: Optional[str] = None, |
@@ -454,7 +455,7 @@ def getMovieStatus( |
454 | 455 |
|
455 | 456 | @_add_shared_docstring(downloadMovieInputParameters) |
456 | 457 | def downloadMovie( |
457 | | - id: str, |
| 458 | + id: Union[int, DataSource], |
458 | 459 | format: str, |
459 | 460 | hq: bool = False, |
460 | 461 | ) -> Union[bytes, str, Dict[str, Any]]: |
@@ -527,7 +528,7 @@ def shortenURL( |
527 | 528 |
|
528 | 529 | @_add_shared_docstring(getTileInputParameters) |
529 | 530 | def getTile( |
530 | | - id: int, |
| 531 | + id: Union[int, DataSource], |
531 | 532 | x: int, |
532 | 533 | y: int, |
533 | 534 | imageScale: int, |
|
0 commit comments