-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlifestyle.py
More file actions
40 lines (30 loc) · 1.21 KB
/
Copy pathlifestyle.py
File metadata and controls
40 lines (30 loc) · 1.21 KB
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
"""Lifestyle endpoints (astroapi-7)."""
from typing import Any, Dict
from .client import BaseClient
HOST = "astroapi-7"
class LifestyleApi:
"""Lifestyle endpoints (gift guru, beauty, fashion)."""
def __init__(self, client: BaseClient) -> None:
self._c = client
def _post(
self, path: str,
sign: str, h_day: str, tzone: float, lan: str = "en",
) -> Dict[str, Any]:
return self._c.post(HOST, path, {
"sign": sign, "h_day": h_day, "tzone": tzone, "lan": lan,
})
def zodiac_gift_guru(
self, sign: str, h_day: str, tzone: float, lan: str = "en",
) -> Dict[str, Any]:
"""Zodiac Gift Guru."""
return self._post("/api/v1/zodiac-gift-guru", sign, h_day, tzone, lan)
def beauty_by_the_stars(
self, sign: str, h_day: str, tzone: float, lan: str = "en",
) -> Dict[str, Any]:
"""Beauty By The Stars."""
return self._post("/api/v1/beauty-by-the-stars", sign, h_day, tzone, lan)
def astro_chic_picks(
self, sign: str, h_day: str, tzone: float, lan: str = "en",
) -> Dict[str, Any]:
"""Astro Chic Picks."""
return self._post("/api/v1/astro-chic-picks", sign, h_day, tzone, lan)