Skip to content

Commit

Permalink
Merge pull request #136 from wri/gtc-2775-planet-page
Browse files Browse the repository at this point in the history
GTC-2775: Add `_page_size` Query Param to Planet.com Request
  • Loading branch information
gtempus authored May 1, 2024
2 parents a6c9337 + 055394a commit db8de7d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/routes/planet/raster_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class PlanetImageMode(str, Enum):


class PlanetDateRange(str, Enum):
"""Available date ranges of Planet Mosaics"""
"""Available date ranges of Planet Mosaics."""


def get_planet_date_ranges() -> List[str]:
url = f"https://api.planet.com/basemaps/v1/mosaics?api_key={GLOBALS.planet_api_key}"
url = f"https://api.planet.com/basemaps/v1/mosaics?api_key={GLOBALS.planet_api_key}&_page_size=1000"
resp = httpx.get(url)
return [mosaic["name"][34:-7] for mosaic in resp.json()["mosaics"]]

Expand Down Expand Up @@ -50,9 +50,7 @@ async def planet_raster_tile(
),
is_valid_apikey: bool = Depends(is_valid_apikey),
) -> Response:
"""
A proxy for Planet Mosaic Tiles
"""
"""A proxy for Planet Mosaic Tiles."""
x, y, z = xyz

async with httpx.AsyncClient() as client:
Expand Down

0 comments on commit db8de7d

Please sign in to comment.