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.
Files changed (68) hide show
  1. getanyapi/__init__.py +76 -0
  2. getanyapi/_account.py +132 -0
  3. getanyapi/_async_client.py +215 -0
  4. getanyapi/_client.py +274 -0
  5. getanyapi/_errors.py +115 -0
  6. getanyapi/_pagination.py +295 -0
  7. getanyapi/_transport.py +239 -0
  8. getanyapi/platforms/__init__.py +89 -0
  9. getanyapi/platforms/ahrefs.py +384 -0
  10. getanyapi/platforms/airbnb.py +120 -0
  11. getanyapi/platforms/alibaba.py +95 -0
  12. getanyapi/platforms/amazon.py +442 -0
  13. getanyapi/platforms/appstore.py +95 -0
  14. getanyapi/platforms/bluesky.py +215 -0
  15. getanyapi/platforms/booking.py +128 -0
  16. getanyapi/platforms/coinmarketcap.py +113 -0
  17. getanyapi/platforms/congress.py +106 -0
  18. getanyapi/platforms/dexscreener.py +104 -0
  19. getanyapi/platforms/ebay.py +215 -0
  20. getanyapi/platforms/email.py +166 -0
  21. getanyapi/platforms/facebook.py +2324 -0
  22. getanyapi/platforms/fiverr.py +122 -0
  23. getanyapi/platforms/github.py +954 -0
  24. getanyapi/platforms/glassdoor.py +93 -0
  25. getanyapi/platforms/google.py +232 -0
  26. getanyapi/platforms/google_ads.py +380 -0
  27. getanyapi/platforms/google_finance.py +170 -0
  28. getanyapi/platforms/google_shopping.py +103 -0
  29. getanyapi/platforms/hackernews.py +276 -0
  30. getanyapi/platforms/indeed.py +114 -0
  31. getanyapi/platforms/instagram.py +1868 -0
  32. getanyapi/platforms/linkedin.py +1064 -0
  33. getanyapi/platforms/maps.py +412 -0
  34. getanyapi/platforms/pandaexpress.py +262 -0
  35. getanyapi/platforms/person.py +96 -0
  36. getanyapi/platforms/pinterest.py +96 -0
  37. getanyapi/platforms/playstore.py +99 -0
  38. getanyapi/platforms/polymarket.py +109 -0
  39. getanyapi/platforms/realtor.py +104 -0
  40. getanyapi/platforms/reddit.py +582 -0
  41. getanyapi/platforms/redfin.py +95 -0
  42. getanyapi/platforms/rednote.py +807 -0
  43. getanyapi/platforms/sec.py +118 -0
  44. getanyapi/platforms/semrush.py +358 -0
  45. getanyapi/platforms/snapchat.py +146 -0
  46. getanyapi/platforms/social.py +105 -0
  47. getanyapi/platforms/spotify.py +588 -0
  48. getanyapi/platforms/substack.py +142 -0
  49. getanyapi/platforms/threads.py +358 -0
  50. getanyapi/platforms/tiktok.py +1827 -0
  51. getanyapi/platforms/tiktok_shop.py +536 -0
  52. getanyapi/platforms/tripadvisor.py +180 -0
  53. getanyapi/platforms/trustpilot.py +114 -0
  54. getanyapi/platforms/truthsocial.py +226 -0
  55. getanyapi/platforms/twitter.py +798 -0
  56. getanyapi/platforms/upwork.py +119 -0
  57. getanyapi/platforms/walmart.py +93 -0
  58. getanyapi/platforms/web.py +264 -0
  59. getanyapi/platforms/whatsapp.py +91 -0
  60. getanyapi/platforms/yahoo_finance.py +95 -0
  61. getanyapi/platforms/yelp.py +141 -0
  62. getanyapi/platforms/youtube.py +1452 -0
  63. getanyapi/platforms/zillow.py +218 -0
  64. getanyapi/py.typed +0 -0
  65. getanyapi/types.py +170 -0
  66. getanyapi-0.1.0.dist-info/METADATA +155 -0
  67. getanyapi-0.1.0.dist-info/RECORD +68 -0
  68. getanyapi-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,954 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the github platform."""
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Literal, 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
+ from .._pagination import (
13
+ AsyncPaginator,
14
+ Paginator,
15
+ apaginate,
16
+ paginate,
17
+ )
18
+
19
+ if TYPE_CHECKING:
20
+ from .._async_client import AsyncAnyAPI
21
+ from .._client import AnyAPI
22
+
23
+
24
+ class GithubRepositoryInput(TypedDict, total=False):
25
+ """Input for GitHub Repository."""
26
+
27
+ url: Required[str]
28
+ """GitHub repository URL (e.g. https://github.com/facebook/react)."""
29
+
30
+
31
+ class GithubTrendingDevelopersInput(TypedDict, total=False):
32
+ """Input for GitHub Trending Developers."""
33
+
34
+ language: NotRequired[str]
35
+ """Programming language to filter trending developers (e.g. javascript, python, go)."""
36
+ since: NotRequired[str]
37
+ """Trending range: daily, weekly, or monthly (defaults to daily)."""
38
+
39
+
40
+ class GithubTrendingRepositoriesInput(TypedDict, total=False):
41
+ """Input for GitHub Trending Repositories."""
42
+
43
+ language: NotRequired[str]
44
+ """Filter by programming language (e.g. "go", "typescript"). Omit for all languages."""
45
+ since: NotRequired[Literal["daily", "weekly", "monthly"]]
46
+ """Trending window. Default: daily."""
47
+
48
+
49
+ class GithubUserInput(TypedDict, total=False):
50
+ """Input for GitHub User."""
51
+
52
+ handle: Required[str]
53
+ """GitHub username."""
54
+
55
+
56
+ class GithubUserActivityInput(TypedDict, total=False):
57
+ """Input for GitHub User Activity."""
58
+
59
+ cursor: NotRequired[str]
60
+ """Pagination cursor from a previous response (pages backward by month)."""
61
+ handle: Required[str]
62
+ """GitHub username."""
63
+ year: NotRequired[str]
64
+ """Year of contribution activity to return (defaults to the current year)."""
65
+
66
+
67
+ class GithubUserContributionsInput(TypedDict, total=False):
68
+ """Input for GitHub User Contributions."""
69
+
70
+ handle: Required[str]
71
+ """GitHub username."""
72
+ year: NotRequired[int]
73
+ """Calendar year of the contribution graph. Defaults to the current year."""
74
+
75
+
76
+ class GithubUserFollowersInput(TypedDict, total=False):
77
+ """Input for GitHub User Followers."""
78
+
79
+ cursor: NotRequired[str]
80
+ """Pagination cursor from a previous response (page number, defaults to 1)."""
81
+ handle: Required[str]
82
+ """GitHub username."""
83
+
84
+
85
+ class GithubUserFollowingInput(TypedDict, total=False):
86
+ """Input for GitHub User Following."""
87
+
88
+ cursor: NotRequired[str]
89
+ """Pagination cursor from a previous response (page number, defaults to 1)."""
90
+ handle: Required[str]
91
+ """GitHub username."""
92
+
93
+
94
+ class GithubUserPullRequestsInput(TypedDict, total=False):
95
+ """Input for GitHub User Pull Requests."""
96
+
97
+ cursor: NotRequired[str]
98
+ """Pagination cursor from a previous response (page number, defaults to 1)."""
99
+ handle: Required[str]
100
+ """GitHub username."""
101
+ since: NotRequired[str]
102
+ """Only include pull requests created on or after this date (YYYY-MM-DD)."""
103
+ until: NotRequired[str]
104
+ """Only include pull requests created on or before this date (YYYY-MM-DD)."""
105
+
106
+
107
+ class GithubUserRepositoriesInput(TypedDict, total=False):
108
+ """Input for GitHub User Repositories."""
109
+
110
+ cursor: NotRequired[int]
111
+ """1-based results page. Use the output's nextCursor to paginate. Minimum: 1. Default: 1."""
112
+ handle: Required[str]
113
+ """GitHub username."""
114
+ sort: NotRequired[Literal["created", "updated", "pushed", "full_name"]]
115
+ """Repository ordering. Default: updated."""
116
+
117
+
118
+ class GithubRepositoryData(BaseModel):
119
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
120
+
121
+ archived: bool | None = None
122
+ created_at: str | None = Field(
123
+ default=None,
124
+ alias="createdAt",
125
+ description="Present whenever the upstream returns this record.",
126
+ )
127
+ default_branch: str | None = Field(
128
+ default=None,
129
+ alias="defaultBranch",
130
+ description="Present whenever the upstream returns this record.",
131
+ )
132
+ description: str | None = None
133
+ fork: bool | None = None
134
+ forks: int | None = None
135
+ full_name: str = Field(alias="fullName")
136
+ homepage: str | None = None
137
+ language: str | None = None
138
+ license: str | None = None
139
+ name: str
140
+ open_issues: int | None = Field(default=None, alias="openIssues")
141
+ owner: str | None = Field(
142
+ default=None, description="Present whenever the upstream returns this record."
143
+ )
144
+ pushed_at: str | None = Field(
145
+ default=None,
146
+ alias="pushedAt",
147
+ description="Present whenever the upstream returns this record.",
148
+ )
149
+ stars: int | None = None
150
+ topics: list[str] | None = None
151
+ updated_at: str | None = Field(
152
+ default=None,
153
+ alias="updatedAt",
154
+ description="Present whenever the upstream returns this record.",
155
+ )
156
+ url: str
157
+ watchers: int | None = None
158
+
159
+
160
+ class GithubTrendingDevelopersData(BaseModel):
161
+ developers: list[GithubTrendingDevelopersDeveloper]
162
+ language: str
163
+ since: str
164
+
165
+
166
+ class GithubTrendingDevelopersDeveloper(BaseModel):
167
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
168
+
169
+ avatar_url: str = Field(alias="avatarUrl")
170
+ name: str
171
+ popular_repo: str = Field(alias="popularRepo")
172
+ popular_repo_description: str = Field(alias="popularRepoDescription")
173
+ popular_repo_url: str = Field(alias="popularRepoUrl")
174
+ rank: int
175
+ url: str
176
+ username: str
177
+
178
+
179
+ class GithubTrendingRepositoriesData(BaseModel):
180
+ repos: list[GithubTrendingRepositoriesRepo]
181
+
182
+
183
+ class GithubTrendingRepositoriesRepo(BaseModel):
184
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
185
+
186
+ description: str
187
+ forks: int
188
+ full_name: str = Field(alias="fullName")
189
+ language: str
190
+ rank: int
191
+ stars: int
192
+ stars_today: int = Field(alias="starsToday")
193
+ url: str
194
+
195
+
196
+ class GithubUserData(BaseModel):
197
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
198
+
199
+ avatar_url: str = Field(alias="avatarUrl")
200
+ bio: str
201
+ blog: str | None = None
202
+ company: str | None = None
203
+ created_at: str | None = Field(
204
+ default=None,
205
+ alias="createdAt",
206
+ description="Present whenever the upstream returns this record.",
207
+ )
208
+ followers: int
209
+ following: int
210
+ location: str | None = None
211
+ login: str
212
+ name: str
213
+ public_gists: int | None = Field(default=None, alias="publicGists")
214
+ public_repos: int = Field(alias="publicRepos")
215
+ twitter_username: str | None = Field(default=None, alias="twitterUsername")
216
+ type_: str | None = Field(
217
+ default=None, alias="type", description='"User" or "Organization".'
218
+ )
219
+
220
+
221
+ class GithubUserActivityData(BaseModel):
222
+ model_config = ConfigDict(populate_by_name=True)
223
+
224
+ activity: list[GithubUserActivityActivity]
225
+ month: str
226
+ next_cursor: str = Field(alias="nextCursor")
227
+ no_activity: bool = Field(alias="noActivity")
228
+ username: str
229
+ year: int
230
+
231
+
232
+ class GithubUserActivityActivity(BaseModel):
233
+ model_config = ConfigDict(extra="allow")
234
+
235
+ summary: str
236
+
237
+
238
+ class GithubUserContributionsData(BaseModel):
239
+ days: list[GithubUserContributionsDay]
240
+ total: int
241
+ username: str
242
+ year: int
243
+
244
+
245
+ class GithubUserContributionsDay(BaseModel):
246
+ model_config = ConfigDict(extra="allow")
247
+
248
+ count: int
249
+ date: str = Field(description="YYYY-MM-DD.")
250
+ intensity: int = Field(description="Heatmap level 0-4.")
251
+
252
+
253
+ class GithubUserFollowersData(BaseModel):
254
+ model_config = ConfigDict(populate_by_name=True)
255
+
256
+ followers: list[GithubUserFollowersFollower]
257
+ next_cursor: str = Field(alias="nextCursor")
258
+
259
+
260
+ class GithubUserFollowersFollower(BaseModel):
261
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
262
+
263
+ avatar_url: str = Field(alias="avatarUrl")
264
+ id: int
265
+ login: str
266
+ site_admin: bool = Field(alias="siteAdmin")
267
+ type_: str = Field(alias="type")
268
+ url: str
269
+
270
+
271
+ class GithubUserFollowingData(BaseModel):
272
+ model_config = ConfigDict(populate_by_name=True)
273
+
274
+ following: list[GithubUserFollowingFollowing]
275
+ next_cursor: str = Field(alias="nextCursor")
276
+
277
+
278
+ class GithubUserFollowingFollowing(BaseModel):
279
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
280
+
281
+ avatar_url: str = Field(alias="avatarUrl")
282
+ id: int
283
+ login: str
284
+ site_admin: bool = Field(alias="siteAdmin")
285
+ type_: str = Field(alias="type")
286
+ url: str
287
+
288
+
289
+ class GithubUserPullRequestsData(BaseModel):
290
+ model_config = ConfigDict(populate_by_name=True)
291
+
292
+ has_more: bool = Field(alias="hasMore")
293
+ next_cursor: str = Field(alias="nextCursor")
294
+ pull_requests: list[GithubUserPullRequestsPullRequest] = Field(alias="pullRequests")
295
+
296
+
297
+ class GithubUserPullRequestsPullRequest(BaseModel):
298
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
299
+
300
+ created_at: str = Field(alias="createdAt")
301
+ repo: str
302
+ state: str
303
+ title: str
304
+ url: str
305
+
306
+
307
+ class GithubUserRepositoriesData(BaseModel):
308
+ model_config = ConfigDict(populate_by_name=True)
309
+
310
+ has_more: bool = Field(alias="hasMore")
311
+ next_cursor: int = Field(alias="nextCursor")
312
+ repos: list[GithubUserRepositoriesRepo]
313
+
314
+
315
+ class GithubUserRepositoriesRepo(BaseModel):
316
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
317
+
318
+ archived: bool
319
+ description: str
320
+ fork: bool
321
+ forks: int
322
+ full_name: str = Field(alias="fullName")
323
+ language: str
324
+ name: str
325
+ pushed_at: str = Field(alias="pushedAt")
326
+ stars: int
327
+ updated_at: str = Field(alias="updatedAt")
328
+ url: str
329
+
330
+
331
+ class GithubNamespace:
332
+ """Typed methods for this platform. Attached lazily to the client."""
333
+
334
+ def __init__(self, client: "AnyAPI") -> None:
335
+ self._client = client
336
+
337
+ def repository(
338
+ self,
339
+ *,
340
+ options: RequestOptions | None = None,
341
+ **input: Unpack[GithubRepositoryInput],
342
+ ) -> RunResult[GithubRepositoryData]:
343
+ """GitHub Repository
344
+
345
+ Fetch a GitHub repository's metadata by URL - stars, forks, language,
346
+ topics, license, and timestamps - normalized across providers with
347
+ transparent failover.
348
+
349
+ Price: $0.002 per request.
350
+
351
+ Example:
352
+ res = client.github.repository(url="https://github.com/facebook/react")
353
+ """
354
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
355
+ "github.repository", dict(input), options
356
+ )
357
+ return RunResult[GithubRepositoryData].model_validate(raw)
358
+
359
+ def trending_developers(
360
+ self,
361
+ *,
362
+ options: RequestOptions | None = None,
363
+ **input: Unpack[GithubTrendingDevelopersInput],
364
+ ) -> RunResult[GithubTrendingDevelopersData]:
365
+ """GitHub Trending Developers
366
+
367
+ List trending GitHub developers - rank, username, name, avatar, and their
368
+ most popular repository - optionally filtered by programming language and
369
+ time range.
370
+
371
+ Price: $0.002 per request.
372
+
373
+ Example:
374
+ res = client.github.trending_developers(language="go", since="weekly")
375
+ """
376
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
377
+ "github.trending_developers", dict(input), options
378
+ )
379
+ return RunResult[GithubTrendingDevelopersData].model_validate(raw)
380
+
381
+ def trending_repositories(
382
+ self,
383
+ *,
384
+ options: RequestOptions | None = None,
385
+ **input: Unpack[GithubTrendingRepositoriesInput],
386
+ ) -> RunResult[GithubTrendingRepositoriesData]:
387
+ """GitHub Trending Repositories
388
+
389
+ List GitHub Trending repositories - rank, stars, stars gained today,
390
+ language, and description - filterable by language and time window,
391
+ normalized across providers.
392
+
393
+ Price: $0.002 per request.
394
+
395
+ Example:
396
+ res = client.github.trending_repositories(language="python", since="daily")
397
+ """
398
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
399
+ "github.trending_repositories", dict(input), options
400
+ )
401
+ return RunResult[GithubTrendingRepositoriesData].model_validate(raw)
402
+
403
+ def user(
404
+ self, *, options: RequestOptions | None = None, **input: Unpack[GithubUserInput]
405
+ ) -> RunResult[GithubUserData]:
406
+ """GitHub User
407
+
408
+ Fetch a GitHub user's public profile by handle - name, bio, company,
409
+ location, followers, and repo counts - normalized across providers with
410
+ transparent failover.
411
+
412
+ Price: $0.002 per request.
413
+
414
+ Example:
415
+ res = client.github.user(handle="torvalds")
416
+ """
417
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
418
+ "github.user", dict(input), options
419
+ )
420
+ return RunResult[GithubUserData].model_validate(raw)
421
+
422
+ def user_activity(
423
+ self,
424
+ *,
425
+ options: RequestOptions | None = None,
426
+ **input: Unpack[GithubUserActivityInput],
427
+ ) -> RunResult[GithubUserActivityData]:
428
+ """GitHub User Activity
429
+
430
+ List a GitHub user's public contribution activity by handle - grouped
431
+ monthly summaries of commits, pull requests, and issues with repository
432
+ links - for a given year.
433
+
434
+ Price: $0.002 per request.
435
+
436
+ Example:
437
+ res = client.github.user_activity(handle="kentcdodds")
438
+ """
439
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
440
+ "github.user_activity", dict(input), options
441
+ )
442
+ return RunResult[GithubUserActivityData].model_validate(raw)
443
+
444
+ def iter_user_activity(
445
+ self,
446
+ *,
447
+ options: RequestOptions | None = None,
448
+ **input: Unpack[GithubUserActivityInput],
449
+ ) -> Paginator[GithubUserActivityActivity, GithubUserActivityData]:
450
+ """Iterate GitHub User Activity results, following pagination cursors.
451
+
452
+ Yields validated `GithubUserActivityActivity` items from the `activity` field of
453
+ each page. Use `.pages()` on the returned paginator to walk whole
454
+ `RunResult` pages.
455
+ """
456
+ return paginate(
457
+ self._client,
458
+ "github.user_activity",
459
+ dict(input),
460
+ "activity",
461
+ item_model=GithubUserActivityActivity,
462
+ data_model=GithubUserActivityData,
463
+ bare=False,
464
+ options=options,
465
+ )
466
+
467
+ def user_contributions(
468
+ self,
469
+ *,
470
+ options: RequestOptions | None = None,
471
+ **input: Unpack[GithubUserContributionsInput],
472
+ ) -> RunResult[GithubUserContributionsData]:
473
+ """GitHub User Contributions
474
+
475
+ Fetch a GitHub user's contribution graph for a year - total contributions
476
+ plus per-day counts and heatmap intensity - normalized across providers with
477
+ transparent failover.
478
+
479
+ Price: $0.002 per request.
480
+
481
+ Example:
482
+ res = client.github.user_contributions(handle="torvalds", year=2024)
483
+ """
484
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
485
+ "github.user_contributions", dict(input), options
486
+ )
487
+ return RunResult[GithubUserContributionsData].model_validate(raw)
488
+
489
+ def user_followers(
490
+ self,
491
+ *,
492
+ options: RequestOptions | None = None,
493
+ **input: Unpack[GithubUserFollowersInput],
494
+ ) -> RunResult[GithubUserFollowersData]:
495
+ """GitHub User Followers
496
+
497
+ List a GitHub user's followers by handle - each follower's login, type,
498
+ avatar, and profile URL - with pagination.
499
+
500
+ Price: $0.002 per request.
501
+
502
+ Example:
503
+ res = client.github.user_followers(handle="torvalds")
504
+ """
505
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
506
+ "github.user_followers", dict(input), options
507
+ )
508
+ return RunResult[GithubUserFollowersData].model_validate(raw)
509
+
510
+ def iter_user_followers(
511
+ self,
512
+ *,
513
+ options: RequestOptions | None = None,
514
+ **input: Unpack[GithubUserFollowersInput],
515
+ ) -> Paginator[GithubUserFollowersFollower, GithubUserFollowersData]:
516
+ """Iterate GitHub User Followers results, following pagination cursors.
517
+
518
+ Yields validated `GithubUserFollowersFollower` items from the `followers` field of
519
+ each page. Use `.pages()` on the returned paginator to walk whole
520
+ `RunResult` pages.
521
+ """
522
+ return paginate(
523
+ self._client,
524
+ "github.user_followers",
525
+ dict(input),
526
+ "followers",
527
+ item_model=GithubUserFollowersFollower,
528
+ data_model=GithubUserFollowersData,
529
+ bare=False,
530
+ options=options,
531
+ )
532
+
533
+ def user_following(
534
+ self,
535
+ *,
536
+ options: RequestOptions | None = None,
537
+ **input: Unpack[GithubUserFollowingInput],
538
+ ) -> RunResult[GithubUserFollowingData]:
539
+ """GitHub User Following
540
+
541
+ List the GitHub users a given user follows by handle - each account's login,
542
+ type, avatar, and profile URL - with pagination.
543
+
544
+ Price: $0.002 per request.
545
+
546
+ Example:
547
+ res = client.github.user_following(handle="kentcdodds")
548
+ """
549
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
550
+ "github.user_following", dict(input), options
551
+ )
552
+ return RunResult[GithubUserFollowingData].model_validate(raw)
553
+
554
+ def iter_user_following(
555
+ self,
556
+ *,
557
+ options: RequestOptions | None = None,
558
+ **input: Unpack[GithubUserFollowingInput],
559
+ ) -> Paginator[GithubUserFollowingFollowing, GithubUserFollowingData]:
560
+ """Iterate GitHub User Following results, following pagination cursors.
561
+
562
+ Yields validated `GithubUserFollowingFollowing` items from the `following` field of
563
+ each page. Use `.pages()` on the returned paginator to walk whole
564
+ `RunResult` pages.
565
+ """
566
+ return paginate(
567
+ self._client,
568
+ "github.user_following",
569
+ dict(input),
570
+ "following",
571
+ item_model=GithubUserFollowingFollowing,
572
+ data_model=GithubUserFollowingData,
573
+ bare=False,
574
+ options=options,
575
+ )
576
+
577
+ def user_pull_requests(
578
+ self,
579
+ *,
580
+ options: RequestOptions | None = None,
581
+ **input: Unpack[GithubUserPullRequestsInput],
582
+ ) -> RunResult[GithubUserPullRequestsData]:
583
+ """GitHub User Pull Requests
584
+
585
+ List a GitHub user's public pull requests by handle - title, repository,
586
+ state, creation date, and URL - with optional date filtering and pagination.
587
+
588
+ Price: $0.002 per request.
589
+
590
+ Example:
591
+ res = client.github.user_pull_requests(handle="torvalds")
592
+ """
593
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
594
+ "github.user_pull_requests", dict(input), options
595
+ )
596
+ return RunResult[GithubUserPullRequestsData].model_validate(raw)
597
+
598
+ def iter_user_pull_requests(
599
+ self,
600
+ *,
601
+ options: RequestOptions | None = None,
602
+ **input: Unpack[GithubUserPullRequestsInput],
603
+ ) -> Paginator[GithubUserPullRequestsPullRequest, GithubUserPullRequestsData]:
604
+ """Iterate GitHub User Pull Requests results, following pagination cursors.
605
+
606
+ Yields validated `GithubUserPullRequestsPullRequest` items from the `pullRequests` field of
607
+ each page. Use `.pages()` on the returned paginator to walk whole
608
+ `RunResult` pages.
609
+ """
610
+ return paginate(
611
+ self._client,
612
+ "github.user_pull_requests",
613
+ dict(input),
614
+ "pullRequests",
615
+ item_model=GithubUserPullRequestsPullRequest,
616
+ data_model=GithubUserPullRequestsData,
617
+ bare=False,
618
+ options=options,
619
+ )
620
+
621
+ def user_repositories(
622
+ self,
623
+ *,
624
+ options: RequestOptions | None = None,
625
+ **input: Unpack[GithubUserRepositoriesInput],
626
+ ) -> RunResult[GithubUserRepositoriesData]:
627
+ """GitHub User Repositories
628
+
629
+ List a GitHub user's public repositories - name, description, language,
630
+ stars, and forks - with sorting and cursor pagination, normalized across
631
+ providers.
632
+
633
+ Price: $0.002 per request.
634
+
635
+ Example:
636
+ res = client.github.user_repositories(handle="torvalds")
637
+ """
638
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
639
+ "github.user_repositories", dict(input), options
640
+ )
641
+ return RunResult[GithubUserRepositoriesData].model_validate(raw)
642
+
643
+
644
+ class AsyncGithubNamespace:
645
+ """Typed methods for this platform. Attached lazily to the client."""
646
+
647
+ def __init__(self, client: "AsyncAnyAPI") -> None:
648
+ self._client = client
649
+
650
+ async def repository(
651
+ self,
652
+ *,
653
+ options: RequestOptions | None = None,
654
+ **input: Unpack[GithubRepositoryInput],
655
+ ) -> RunResult[GithubRepositoryData]:
656
+ """GitHub Repository
657
+
658
+ Fetch a GitHub repository's metadata by URL - stars, forks, language,
659
+ topics, license, and timestamps - normalized across providers with
660
+ transparent failover.
661
+
662
+ Price: $0.002 per request.
663
+
664
+ Example:
665
+ res = client.github.repository(url="https://github.com/facebook/react")
666
+ """
667
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
668
+ "github.repository", dict(input), options
669
+ )
670
+ return RunResult[GithubRepositoryData].model_validate(raw)
671
+
672
+ async def trending_developers(
673
+ self,
674
+ *,
675
+ options: RequestOptions | None = None,
676
+ **input: Unpack[GithubTrendingDevelopersInput],
677
+ ) -> RunResult[GithubTrendingDevelopersData]:
678
+ """GitHub Trending Developers
679
+
680
+ List trending GitHub developers - rank, username, name, avatar, and their
681
+ most popular repository - optionally filtered by programming language and
682
+ time range.
683
+
684
+ Price: $0.002 per request.
685
+
686
+ Example:
687
+ res = client.github.trending_developers(language="go", since="weekly")
688
+ """
689
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
690
+ "github.trending_developers", dict(input), options
691
+ )
692
+ return RunResult[GithubTrendingDevelopersData].model_validate(raw)
693
+
694
+ async def trending_repositories(
695
+ self,
696
+ *,
697
+ options: RequestOptions | None = None,
698
+ **input: Unpack[GithubTrendingRepositoriesInput],
699
+ ) -> RunResult[GithubTrendingRepositoriesData]:
700
+ """GitHub Trending Repositories
701
+
702
+ List GitHub Trending repositories - rank, stars, stars gained today,
703
+ language, and description - filterable by language and time window,
704
+ normalized across providers.
705
+
706
+ Price: $0.002 per request.
707
+
708
+ Example:
709
+ res = client.github.trending_repositories(language="python", since="daily")
710
+ """
711
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
712
+ "github.trending_repositories", dict(input), options
713
+ )
714
+ return RunResult[GithubTrendingRepositoriesData].model_validate(raw)
715
+
716
+ async def user(
717
+ self, *, options: RequestOptions | None = None, **input: Unpack[GithubUserInput]
718
+ ) -> RunResult[GithubUserData]:
719
+ """GitHub User
720
+
721
+ Fetch a GitHub user's public profile by handle - name, bio, company,
722
+ location, followers, and repo counts - normalized across providers with
723
+ transparent failover.
724
+
725
+ Price: $0.002 per request.
726
+
727
+ Example:
728
+ res = client.github.user(handle="torvalds")
729
+ """
730
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
731
+ "github.user", dict(input), options
732
+ )
733
+ return RunResult[GithubUserData].model_validate(raw)
734
+
735
+ async def user_activity(
736
+ self,
737
+ *,
738
+ options: RequestOptions | None = None,
739
+ **input: Unpack[GithubUserActivityInput],
740
+ ) -> RunResult[GithubUserActivityData]:
741
+ """GitHub User Activity
742
+
743
+ List a GitHub user's public contribution activity by handle - grouped
744
+ monthly summaries of commits, pull requests, and issues with repository
745
+ links - for a given year.
746
+
747
+ Price: $0.002 per request.
748
+
749
+ Example:
750
+ res = client.github.user_activity(handle="kentcdodds")
751
+ """
752
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
753
+ "github.user_activity", dict(input), options
754
+ )
755
+ return RunResult[GithubUserActivityData].model_validate(raw)
756
+
757
+ def iter_user_activity(
758
+ self,
759
+ *,
760
+ options: RequestOptions | None = None,
761
+ **input: Unpack[GithubUserActivityInput],
762
+ ) -> AsyncPaginator[GithubUserActivityActivity, GithubUserActivityData]:
763
+ """Iterate GitHub User Activity results, following pagination cursors.
764
+
765
+ Yields validated `GithubUserActivityActivity` items from the `activity` field of
766
+ each page. Use `.pages()` on the returned paginator to walk whole
767
+ `RunResult` pages.
768
+ """
769
+ return apaginate(
770
+ self._client,
771
+ "github.user_activity",
772
+ dict(input),
773
+ "activity",
774
+ item_model=GithubUserActivityActivity,
775
+ data_model=GithubUserActivityData,
776
+ bare=False,
777
+ options=options,
778
+ )
779
+
780
+ async def user_contributions(
781
+ self,
782
+ *,
783
+ options: RequestOptions | None = None,
784
+ **input: Unpack[GithubUserContributionsInput],
785
+ ) -> RunResult[GithubUserContributionsData]:
786
+ """GitHub User Contributions
787
+
788
+ Fetch a GitHub user's contribution graph for a year - total contributions
789
+ plus per-day counts and heatmap intensity - normalized across providers with
790
+ transparent failover.
791
+
792
+ Price: $0.002 per request.
793
+
794
+ Example:
795
+ res = client.github.user_contributions(handle="torvalds", year=2024)
796
+ """
797
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
798
+ "github.user_contributions", dict(input), options
799
+ )
800
+ return RunResult[GithubUserContributionsData].model_validate(raw)
801
+
802
+ async def user_followers(
803
+ self,
804
+ *,
805
+ options: RequestOptions | None = None,
806
+ **input: Unpack[GithubUserFollowersInput],
807
+ ) -> RunResult[GithubUserFollowersData]:
808
+ """GitHub User Followers
809
+
810
+ List a GitHub user's followers by handle - each follower's login, type,
811
+ avatar, and profile URL - with pagination.
812
+
813
+ Price: $0.002 per request.
814
+
815
+ Example:
816
+ res = client.github.user_followers(handle="torvalds")
817
+ """
818
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
819
+ "github.user_followers", dict(input), options
820
+ )
821
+ return RunResult[GithubUserFollowersData].model_validate(raw)
822
+
823
+ def iter_user_followers(
824
+ self,
825
+ *,
826
+ options: RequestOptions | None = None,
827
+ **input: Unpack[GithubUserFollowersInput],
828
+ ) -> AsyncPaginator[GithubUserFollowersFollower, GithubUserFollowersData]:
829
+ """Iterate GitHub User Followers results, following pagination cursors.
830
+
831
+ Yields validated `GithubUserFollowersFollower` items from the `followers` field of
832
+ each page. Use `.pages()` on the returned paginator to walk whole
833
+ `RunResult` pages.
834
+ """
835
+ return apaginate(
836
+ self._client,
837
+ "github.user_followers",
838
+ dict(input),
839
+ "followers",
840
+ item_model=GithubUserFollowersFollower,
841
+ data_model=GithubUserFollowersData,
842
+ bare=False,
843
+ options=options,
844
+ )
845
+
846
+ async def user_following(
847
+ self,
848
+ *,
849
+ options: RequestOptions | None = None,
850
+ **input: Unpack[GithubUserFollowingInput],
851
+ ) -> RunResult[GithubUserFollowingData]:
852
+ """GitHub User Following
853
+
854
+ List the GitHub users a given user follows by handle - each account's login,
855
+ type, avatar, and profile URL - with pagination.
856
+
857
+ Price: $0.002 per request.
858
+
859
+ Example:
860
+ res = client.github.user_following(handle="kentcdodds")
861
+ """
862
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
863
+ "github.user_following", dict(input), options
864
+ )
865
+ return RunResult[GithubUserFollowingData].model_validate(raw)
866
+
867
+ def iter_user_following(
868
+ self,
869
+ *,
870
+ options: RequestOptions | None = None,
871
+ **input: Unpack[GithubUserFollowingInput],
872
+ ) -> AsyncPaginator[GithubUserFollowingFollowing, GithubUserFollowingData]:
873
+ """Iterate GitHub User Following results, following pagination cursors.
874
+
875
+ Yields validated `GithubUserFollowingFollowing` items from the `following` field of
876
+ each page. Use `.pages()` on the returned paginator to walk whole
877
+ `RunResult` pages.
878
+ """
879
+ return apaginate(
880
+ self._client,
881
+ "github.user_following",
882
+ dict(input),
883
+ "following",
884
+ item_model=GithubUserFollowingFollowing,
885
+ data_model=GithubUserFollowingData,
886
+ bare=False,
887
+ options=options,
888
+ )
889
+
890
+ async def user_pull_requests(
891
+ self,
892
+ *,
893
+ options: RequestOptions | None = None,
894
+ **input: Unpack[GithubUserPullRequestsInput],
895
+ ) -> RunResult[GithubUserPullRequestsData]:
896
+ """GitHub User Pull Requests
897
+
898
+ List a GitHub user's public pull requests by handle - title, repository,
899
+ state, creation date, and URL - with optional date filtering and pagination.
900
+
901
+ Price: $0.002 per request.
902
+
903
+ Example:
904
+ res = client.github.user_pull_requests(handle="torvalds")
905
+ """
906
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
907
+ "github.user_pull_requests", dict(input), options
908
+ )
909
+ return RunResult[GithubUserPullRequestsData].model_validate(raw)
910
+
911
+ def iter_user_pull_requests(
912
+ self,
913
+ *,
914
+ options: RequestOptions | None = None,
915
+ **input: Unpack[GithubUserPullRequestsInput],
916
+ ) -> AsyncPaginator[GithubUserPullRequestsPullRequest, GithubUserPullRequestsData]:
917
+ """Iterate GitHub User Pull Requests results, following pagination cursors.
918
+
919
+ Yields validated `GithubUserPullRequestsPullRequest` items from the `pullRequests` field of
920
+ each page. Use `.pages()` on the returned paginator to walk whole
921
+ `RunResult` pages.
922
+ """
923
+ return apaginate(
924
+ self._client,
925
+ "github.user_pull_requests",
926
+ dict(input),
927
+ "pullRequests",
928
+ item_model=GithubUserPullRequestsPullRequest,
929
+ data_model=GithubUserPullRequestsData,
930
+ bare=False,
931
+ options=options,
932
+ )
933
+
934
+ async def user_repositories(
935
+ self,
936
+ *,
937
+ options: RequestOptions | None = None,
938
+ **input: Unpack[GithubUserRepositoriesInput],
939
+ ) -> RunResult[GithubUserRepositoriesData]:
940
+ """GitHub User Repositories
941
+
942
+ List a GitHub user's public repositories - name, description, language,
943
+ stars, and forks - with sorting and cursor pagination, normalized across
944
+ providers.
945
+
946
+ Price: $0.002 per request.
947
+
948
+ Example:
949
+ res = client.github.user_repositories(handle="torvalds")
950
+ """
951
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
952
+ "github.user_repositories", dict(input), options
953
+ )
954
+ return RunResult[GithubUserRepositoriesData].model_validate(raw)