getanyapi 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- getanyapi/__init__.py +76 -0
- getanyapi/_account.py +132 -0
- getanyapi/_async_client.py +215 -0
- getanyapi/_client.py +274 -0
- getanyapi/_errors.py +115 -0
- getanyapi/_pagination.py +295 -0
- getanyapi/_transport.py +239 -0
- getanyapi/platforms/__init__.py +89 -0
- getanyapi/platforms/ahrefs.py +384 -0
- getanyapi/platforms/airbnb.py +120 -0
- getanyapi/platforms/alibaba.py +95 -0
- getanyapi/platforms/amazon.py +442 -0
- getanyapi/platforms/appstore.py +95 -0
- getanyapi/platforms/bluesky.py +215 -0
- getanyapi/platforms/booking.py +128 -0
- getanyapi/platforms/coinmarketcap.py +113 -0
- getanyapi/platforms/congress.py +106 -0
- getanyapi/platforms/dexscreener.py +104 -0
- getanyapi/platforms/ebay.py +215 -0
- getanyapi/platforms/email.py +166 -0
- getanyapi/platforms/facebook.py +2324 -0
- getanyapi/platforms/fiverr.py +122 -0
- getanyapi/platforms/github.py +954 -0
- getanyapi/platforms/glassdoor.py +93 -0
- getanyapi/platforms/google.py +232 -0
- getanyapi/platforms/google_ads.py +380 -0
- getanyapi/platforms/google_finance.py +170 -0
- getanyapi/platforms/google_shopping.py +103 -0
- getanyapi/platforms/hackernews.py +276 -0
- getanyapi/platforms/indeed.py +114 -0
- getanyapi/platforms/instagram.py +1868 -0
- getanyapi/platforms/linkedin.py +1064 -0
- getanyapi/platforms/maps.py +412 -0
- getanyapi/platforms/pandaexpress.py +262 -0
- getanyapi/platforms/person.py +96 -0
- getanyapi/platforms/pinterest.py +96 -0
- getanyapi/platforms/playstore.py +99 -0
- getanyapi/platforms/polymarket.py +109 -0
- getanyapi/platforms/realtor.py +104 -0
- getanyapi/platforms/reddit.py +582 -0
- getanyapi/platforms/redfin.py +95 -0
- getanyapi/platforms/rednote.py +807 -0
- getanyapi/platforms/sec.py +118 -0
- getanyapi/platforms/semrush.py +358 -0
- getanyapi/platforms/snapchat.py +146 -0
- getanyapi/platforms/social.py +105 -0
- getanyapi/platforms/spotify.py +588 -0
- getanyapi/platforms/substack.py +142 -0
- getanyapi/platforms/threads.py +358 -0
- getanyapi/platforms/tiktok.py +1827 -0
- getanyapi/platforms/tiktok_shop.py +536 -0
- getanyapi/platforms/tripadvisor.py +180 -0
- getanyapi/platforms/trustpilot.py +114 -0
- getanyapi/platforms/truthsocial.py +226 -0
- getanyapi/platforms/twitter.py +798 -0
- getanyapi/platforms/upwork.py +119 -0
- getanyapi/platforms/walmart.py +93 -0
- getanyapi/platforms/web.py +264 -0
- getanyapi/platforms/whatsapp.py +91 -0
- getanyapi/platforms/yahoo_finance.py +95 -0
- getanyapi/platforms/yelp.py +141 -0
- getanyapi/platforms/youtube.py +1452 -0
- getanyapi/platforms/zillow.py +218 -0
- getanyapi/py.typed +0 -0
- getanyapi/types.py +170 -0
- getanyapi-0.1.0.dist-info/METADATA +155 -0
- getanyapi-0.1.0.dist-info/RECORD +68 -0
- getanyapi-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the yelp platform."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
9
|
+
from typing_extensions import NotRequired, Required, TypedDict, Unpack
|
|
10
|
+
|
|
11
|
+
from ..types import RequestOptions, RunResult
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from .._async_client import AsyncAnyAPI
|
|
15
|
+
from .._client import AnyAPI
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class YelpSearchInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Yelp Search."""
|
|
20
|
+
|
|
21
|
+
limit: NotRequired[int]
|
|
22
|
+
"""Maximum number of results to return (1 to 20, default 20). Range: 1 to 20."""
|
|
23
|
+
location: Required[str]
|
|
24
|
+
"""City and state defining the search area (e.g. San Francisco, CA)."""
|
|
25
|
+
query: Required[str]
|
|
26
|
+
"""Search term or category to look for (e.g. sushi)."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class YelpSearchData(BaseModel):
|
|
30
|
+
items: list[YelpSearchItem] = Field(
|
|
31
|
+
description="Business listing records: name, categories, rating, review count, address, and core business info."
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class YelpSearchItem(BaseModel):
|
|
36
|
+
model_config = ConfigDict(extra="allow")
|
|
37
|
+
|
|
38
|
+
address1: str | None = Field(
|
|
39
|
+
default=None, description="Primary street address line."
|
|
40
|
+
)
|
|
41
|
+
address2: str | None = Field(default=None, description="Secondary address line.")
|
|
42
|
+
address3: str | None = Field(default=None, description="Tertiary address line.")
|
|
43
|
+
alias: str = Field(description="URL slug for the business.")
|
|
44
|
+
avg_rating: float | None = Field(
|
|
45
|
+
default=None, description="Rounded average star rating."
|
|
46
|
+
)
|
|
47
|
+
categories: list[YelpSearchCategorie] | None = Field(
|
|
48
|
+
default=None, description="Business category tags."
|
|
49
|
+
)
|
|
50
|
+
city: str | None = Field(default=None, description="City name.")
|
|
51
|
+
country: str | None = Field(default=None, description="ISO country code.")
|
|
52
|
+
dialable_phone: str | None = Field(
|
|
53
|
+
default=None, description="Dialable phone number."
|
|
54
|
+
)
|
|
55
|
+
id: str = Field(description="Stable Yelp business identifier.")
|
|
56
|
+
is_closed: bool | None = Field(
|
|
57
|
+
default=None, description="Whether the business is permanently closed."
|
|
58
|
+
)
|
|
59
|
+
latitude: float | None = Field(
|
|
60
|
+
default=None, description="Latitude of the business."
|
|
61
|
+
)
|
|
62
|
+
localized_phone: str | None = Field(
|
|
63
|
+
default=None, description="Formatted local phone number."
|
|
64
|
+
)
|
|
65
|
+
localized_price: str | None = Field(
|
|
66
|
+
default=None, description="Localized price tier (e.g. $$)."
|
|
67
|
+
)
|
|
68
|
+
longitude: float | None = Field(
|
|
69
|
+
default=None, description="Longitude of the business."
|
|
70
|
+
)
|
|
71
|
+
name: str = Field(description="Business display name.")
|
|
72
|
+
neighborhoods: list[str] | None = Field(
|
|
73
|
+
default=None, description="Neighborhood labels for the location."
|
|
74
|
+
)
|
|
75
|
+
phone: str | None = Field(default=None, description="Raw phone number.")
|
|
76
|
+
photo_count: int | None = Field(default=None, description="Total photo count.")
|
|
77
|
+
photo_url: str | None = Field(
|
|
78
|
+
default=None,
|
|
79
|
+
description="Primary photo URL. Present whenever the upstream returns this record.",
|
|
80
|
+
)
|
|
81
|
+
price: int | None = Field(default=None, description="Numeric price tier.")
|
|
82
|
+
review_count: int | None = Field(default=None, description="Number of reviews.")
|
|
83
|
+
state: str | None = Field(default=None, description="State or region code.")
|
|
84
|
+
unrounded_avg_rating: float | None = Field(
|
|
85
|
+
default=None, description="Unrounded average star rating."
|
|
86
|
+
)
|
|
87
|
+
zip: str | None = Field(default=None, description="Postal code.")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class YelpSearchCategorie(BaseModel):
|
|
91
|
+
model_config = ConfigDict(extra="allow")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class YelpNamespace:
|
|
95
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
96
|
+
|
|
97
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
98
|
+
self._client = client
|
|
99
|
+
|
|
100
|
+
def search(
|
|
101
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[YelpSearchInput]
|
|
102
|
+
) -> RunResult[YelpSearchData]:
|
|
103
|
+
"""Yelp Search
|
|
104
|
+
|
|
105
|
+
Search Yelp for businesses by keyword and location: up to 20 listings with
|
|
106
|
+
ratings, categories, and core business info per flat-priced request.
|
|
107
|
+
|
|
108
|
+
Price: $0.04 per request plus $0.00075 per result.
|
|
109
|
+
|
|
110
|
+
Example:
|
|
111
|
+
res = client.yelp.search(limit=5, location="Chicago, IL", query="pizza")
|
|
112
|
+
"""
|
|
113
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
114
|
+
"yelp.search", dict(input), options
|
|
115
|
+
)
|
|
116
|
+
return RunResult[YelpSearchData].model_validate(raw)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class AsyncYelpNamespace:
|
|
120
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
121
|
+
|
|
122
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
123
|
+
self._client = client
|
|
124
|
+
|
|
125
|
+
async def search(
|
|
126
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[YelpSearchInput]
|
|
127
|
+
) -> RunResult[YelpSearchData]:
|
|
128
|
+
"""Yelp Search
|
|
129
|
+
|
|
130
|
+
Search Yelp for businesses by keyword and location: up to 20 listings with
|
|
131
|
+
ratings, categories, and core business info per flat-priced request.
|
|
132
|
+
|
|
133
|
+
Price: $0.04 per request plus $0.00075 per result.
|
|
134
|
+
|
|
135
|
+
Example:
|
|
136
|
+
res = client.yelp.search(limit=5, location="Chicago, IL", query="pizza")
|
|
137
|
+
"""
|
|
138
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
139
|
+
"yelp.search", dict(input), options
|
|
140
|
+
)
|
|
141
|
+
return RunResult[YelpSearchData].model_validate(raw)
|