whop-sdk 0.0.2__py3-none-any.whl → 0.0.3__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.

Potentially problematic release.


This version of whop-sdk might be problematic. Click here for more details.

Files changed (86) hide show
  1. whop_sdk/_client.py +47 -2
  2. whop_sdk/_version.py +1 -1
  3. whop_sdk/resources/__init__.py +70 -0
  4. whop_sdk/resources/checkout_configurations.py +4 -0
  5. whop_sdk/resources/course_chapters.py +602 -0
  6. whop_sdk/resources/course_lessons.py +722 -0
  7. whop_sdk/resources/courses.py +713 -0
  8. whop_sdk/resources/experiences.py +107 -0
  9. whop_sdk/resources/forum_posts.py +123 -1
  10. whop_sdk/resources/members.py +8 -0
  11. whop_sdk/resources/memberships.py +16 -8
  12. whop_sdk/resources/messages.py +113 -1
  13. whop_sdk/resources/payments.py +3 -26
  14. whop_sdk/resources/plans.py +74 -2
  15. whop_sdk/resources/products.py +8 -16
  16. whop_sdk/resources/promo_codes.py +652 -0
  17. whop_sdk/resources/reviews.py +315 -0
  18. whop_sdk/types/__init__.py +39 -0
  19. whop_sdk/types/assessment_question_types.py +7 -0
  20. whop_sdk/types/billing_reasons.py +9 -0
  21. whop_sdk/types/card_brands.py +24 -0
  22. whop_sdk/types/checkout_configuration_create_params.py +65 -2
  23. whop_sdk/types/checkout_configuration_list_response.py +4 -1
  24. whop_sdk/types/course.py +109 -0
  25. whop_sdk/types/course_chapter.py +32 -0
  26. whop_sdk/types/course_chapter_create_params.py +16 -0
  27. whop_sdk/types/course_chapter_delete_response.py +7 -0
  28. whop_sdk/types/course_chapter_list_params.py +25 -0
  29. whop_sdk/types/course_chapter_list_response.py +16 -0
  30. whop_sdk/types/course_chapter_update_params.py +12 -0
  31. whop_sdk/types/course_create_params.py +41 -0
  32. whop_sdk/types/course_delete_response.py +7 -0
  33. whop_sdk/types/course_lesson_create_params.py +27 -0
  34. whop_sdk/types/course_lesson_delete_response.py +7 -0
  35. whop_sdk/types/course_lesson_list_params.py +28 -0
  36. whop_sdk/types/course_lesson_list_response.py +35 -0
  37. whop_sdk/types/course_lesson_update_params.py +144 -0
  38. whop_sdk/types/course_list_params.py +28 -0
  39. whop_sdk/types/course_list_response.py +77 -0
  40. whop_sdk/types/course_update_params.py +89 -0
  41. whop_sdk/types/experience_duplicate_params.py +13 -0
  42. whop_sdk/types/forum_post_list_response.py +7 -0
  43. whop_sdk/types/forum_post_update_params.py +41 -0
  44. whop_sdk/types/languages.py +30 -0
  45. whop_sdk/types/ledger_account_retrieve_response.py +15 -1
  46. whop_sdk/types/lesson.py +159 -0
  47. whop_sdk/types/lesson_types.py +7 -0
  48. whop_sdk/types/lesson_visibilities.py +7 -0
  49. whop_sdk/types/member_list_params.py +3 -0
  50. whop_sdk/types/membership_list_params.py +7 -4
  51. whop_sdk/types/membership_list_response.py +12 -1
  52. whop_sdk/types/message_update_params.py +35 -0
  53. whop_sdk/types/payment_list_params.py +2 -7
  54. whop_sdk/types/payment_list_response.py +23 -13
  55. whop_sdk/types/payment_method_types.py +92 -0
  56. whop_sdk/types/plan_create_params.py +19 -1
  57. whop_sdk/types/plan_list_response.py +9 -0
  58. whop_sdk/types/plan_update_params.py +18 -0
  59. whop_sdk/types/product_create_params.py +1 -24
  60. whop_sdk/types/product_update_params.py +12 -1
  61. whop_sdk/types/promo_code.py +90 -0
  62. whop_sdk/types/promo_code_create_params.py +70 -0
  63. whop_sdk/types/promo_code_delete_response.py +7 -0
  64. whop_sdk/types/promo_code_list_params.py +37 -0
  65. whop_sdk/types/promo_code_list_response.py +79 -0
  66. whop_sdk/types/promo_code_status.py +7 -0
  67. whop_sdk/types/promo_duration.py +7 -0
  68. whop_sdk/types/review_list_params.py +31 -0
  69. whop_sdk/types/review_list_response.py +78 -0
  70. whop_sdk/types/review_retrieve_response.py +103 -0
  71. whop_sdk/types/review_status.py +7 -0
  72. whop_sdk/types/shared/checkout_configuration.py +4 -1
  73. whop_sdk/types/shared/forum_post.py +7 -0
  74. whop_sdk/types/shared/invoice.py +4 -1
  75. whop_sdk/types/shared/invoice_list_item.py +4 -1
  76. whop_sdk/types/shared/membership.py +12 -1
  77. whop_sdk/types/shared/payment.py +23 -13
  78. whop_sdk/types/shared/plan.py +9 -0
  79. whop_sdk/types/shared/product.py +8 -0
  80. whop_sdk/types/shared/product_list_item.py +8 -0
  81. whop_sdk/types/shared_params/__init__.py +1 -0
  82. whop_sdk/types/shared_params/promo_type.py +9 -0
  83. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/METADATA +1 -1
  84. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/RECORD +86 -41
  85. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/WHEEL +0 -0
  86. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/licenses/LICENSE +0 -0
whop_sdk/_client.py CHANGED
@@ -26,8 +26,10 @@ from .resources import (
26
26
  plans,
27
27
  users,
28
28
  forums,
29
+ courses,
29
30
  entries,
30
31
  members,
32
+ reviews,
31
33
  invoices,
32
34
  messages,
33
35
  payments,
@@ -41,7 +43,10 @@ from .resources import (
41
43
  experiences,
42
44
  forum_posts,
43
45
  memberships,
46
+ promo_codes,
44
47
  chat_channels,
48
+ course_lessons,
49
+ course_chapters,
45
50
  ledger_accounts,
46
51
  authorized_users,
47
52
  support_channels,
@@ -85,6 +90,11 @@ class Whop(SyncAPIClient):
85
90
  reactions: reactions.ReactionsResource
86
91
  members: members.MembersResource
87
92
  forums: forums.ForumsResource
93
+ promo_codes: promo_codes.PromoCodesResource
94
+ courses: courses.CoursesResource
95
+ course_chapters: course_chapters.CourseChaptersResource
96
+ course_lessons: course_lessons.CourseLessonsResource
97
+ reviews: reviews.ReviewsResource
88
98
  with_raw_response: WhopWithRawResponse
89
99
  with_streaming_response: WhopWithStreamedResponse
90
100
 
@@ -186,13 +196,18 @@ class Whop(SyncAPIClient):
186
196
  self.reactions = reactions.ReactionsResource(self)
187
197
  self.members = members.MembersResource(self)
188
198
  self.forums = forums.ForumsResource(self)
199
+ self.promo_codes = promo_codes.PromoCodesResource(self)
200
+ self.courses = courses.CoursesResource(self)
201
+ self.course_chapters = course_chapters.CourseChaptersResource(self)
202
+ self.course_lessons = course_lessons.CourseLessonsResource(self)
203
+ self.reviews = reviews.ReviewsResource(self)
189
204
  self.with_raw_response = WhopWithRawResponse(self)
190
205
  self.with_streaming_response = WhopWithStreamedResponse(self)
191
206
 
192
207
  @property
193
208
  @override
194
209
  def qs(self) -> Querystring:
195
- return Querystring(array_format="comma")
210
+ return Querystring(array_format="brackets")
196
211
 
197
212
  @property
198
213
  @override
@@ -325,6 +340,11 @@ class AsyncWhop(AsyncAPIClient):
325
340
  reactions: reactions.AsyncReactionsResource
326
341
  members: members.AsyncMembersResource
327
342
  forums: forums.AsyncForumsResource
343
+ promo_codes: promo_codes.AsyncPromoCodesResource
344
+ courses: courses.AsyncCoursesResource
345
+ course_chapters: course_chapters.AsyncCourseChaptersResource
346
+ course_lessons: course_lessons.AsyncCourseLessonsResource
347
+ reviews: reviews.AsyncReviewsResource
328
348
  with_raw_response: AsyncWhopWithRawResponse
329
349
  with_streaming_response: AsyncWhopWithStreamedResponse
330
350
 
@@ -426,13 +446,18 @@ class AsyncWhop(AsyncAPIClient):
426
446
  self.reactions = reactions.AsyncReactionsResource(self)
427
447
  self.members = members.AsyncMembersResource(self)
428
448
  self.forums = forums.AsyncForumsResource(self)
449
+ self.promo_codes = promo_codes.AsyncPromoCodesResource(self)
450
+ self.courses = courses.AsyncCoursesResource(self)
451
+ self.course_chapters = course_chapters.AsyncCourseChaptersResource(self)
452
+ self.course_lessons = course_lessons.AsyncCourseLessonsResource(self)
453
+ self.reviews = reviews.AsyncReviewsResource(self)
429
454
  self.with_raw_response = AsyncWhopWithRawResponse(self)
430
455
  self.with_streaming_response = AsyncWhopWithStreamedResponse(self)
431
456
 
432
457
  @property
433
458
  @override
434
459
  def qs(self) -> Querystring:
435
- return Querystring(array_format="comma")
460
+ return Querystring(array_format="brackets")
436
461
 
437
462
  @property
438
463
  @override
@@ -569,6 +594,11 @@ class WhopWithRawResponse:
569
594
  self.reactions = reactions.ReactionsResourceWithRawResponse(client.reactions)
570
595
  self.members = members.MembersResourceWithRawResponse(client.members)
571
596
  self.forums = forums.ForumsResourceWithRawResponse(client.forums)
597
+ self.promo_codes = promo_codes.PromoCodesResourceWithRawResponse(client.promo_codes)
598
+ self.courses = courses.CoursesResourceWithRawResponse(client.courses)
599
+ self.course_chapters = course_chapters.CourseChaptersResourceWithRawResponse(client.course_chapters)
600
+ self.course_lessons = course_lessons.CourseLessonsResourceWithRawResponse(client.course_lessons)
601
+ self.reviews = reviews.ReviewsResourceWithRawResponse(client.reviews)
572
602
 
573
603
 
574
604
  class AsyncWhopWithRawResponse:
@@ -603,6 +633,11 @@ class AsyncWhopWithRawResponse:
603
633
  self.reactions = reactions.AsyncReactionsResourceWithRawResponse(client.reactions)
604
634
  self.members = members.AsyncMembersResourceWithRawResponse(client.members)
605
635
  self.forums = forums.AsyncForumsResourceWithRawResponse(client.forums)
636
+ self.promo_codes = promo_codes.AsyncPromoCodesResourceWithRawResponse(client.promo_codes)
637
+ self.courses = courses.AsyncCoursesResourceWithRawResponse(client.courses)
638
+ self.course_chapters = course_chapters.AsyncCourseChaptersResourceWithRawResponse(client.course_chapters)
639
+ self.course_lessons = course_lessons.AsyncCourseLessonsResourceWithRawResponse(client.course_lessons)
640
+ self.reviews = reviews.AsyncReviewsResourceWithRawResponse(client.reviews)
606
641
 
607
642
 
608
643
  class WhopWithStreamedResponse:
@@ -637,6 +672,11 @@ class WhopWithStreamedResponse:
637
672
  self.reactions = reactions.ReactionsResourceWithStreamingResponse(client.reactions)
638
673
  self.members = members.MembersResourceWithStreamingResponse(client.members)
639
674
  self.forums = forums.ForumsResourceWithStreamingResponse(client.forums)
675
+ self.promo_codes = promo_codes.PromoCodesResourceWithStreamingResponse(client.promo_codes)
676
+ self.courses = courses.CoursesResourceWithStreamingResponse(client.courses)
677
+ self.course_chapters = course_chapters.CourseChaptersResourceWithStreamingResponse(client.course_chapters)
678
+ self.course_lessons = course_lessons.CourseLessonsResourceWithStreamingResponse(client.course_lessons)
679
+ self.reviews = reviews.ReviewsResourceWithStreamingResponse(client.reviews)
640
680
 
641
681
 
642
682
  class AsyncWhopWithStreamedResponse:
@@ -675,6 +715,11 @@ class AsyncWhopWithStreamedResponse:
675
715
  self.reactions = reactions.AsyncReactionsResourceWithStreamingResponse(client.reactions)
676
716
  self.members = members.AsyncMembersResourceWithStreamingResponse(client.members)
677
717
  self.forums = forums.AsyncForumsResourceWithStreamingResponse(client.forums)
718
+ self.promo_codes = promo_codes.AsyncPromoCodesResourceWithStreamingResponse(client.promo_codes)
719
+ self.courses = courses.AsyncCoursesResourceWithStreamingResponse(client.courses)
720
+ self.course_chapters = course_chapters.AsyncCourseChaptersResourceWithStreamingResponse(client.course_chapters)
721
+ self.course_lessons = course_lessons.AsyncCourseLessonsResourceWithStreamingResponse(client.course_lessons)
722
+ self.reviews = reviews.AsyncReviewsResourceWithStreamingResponse(client.reviews)
678
723
 
679
724
 
680
725
  Client = Whop
whop_sdk/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "whop_sdk"
4
- __version__ = "0.0.2" # x-release-please-version
4
+ __version__ = "0.0.3" # x-release-please-version
@@ -32,6 +32,14 @@ from .forums import (
32
32
  ForumsResourceWithStreamingResponse,
33
33
  AsyncForumsResourceWithStreamingResponse,
34
34
  )
35
+ from .courses import (
36
+ CoursesResource,
37
+ AsyncCoursesResource,
38
+ CoursesResourceWithRawResponse,
39
+ AsyncCoursesResourceWithRawResponse,
40
+ CoursesResourceWithStreamingResponse,
41
+ AsyncCoursesResourceWithStreamingResponse,
42
+ )
35
43
  from .entries import (
36
44
  EntriesResource,
37
45
  AsyncEntriesResource,
@@ -48,6 +56,14 @@ from .members import (
48
56
  MembersResourceWithStreamingResponse,
49
57
  AsyncMembersResourceWithStreamingResponse,
50
58
  )
59
+ from .reviews import (
60
+ ReviewsResource,
61
+ AsyncReviewsResource,
62
+ ReviewsResourceWithRawResponse,
63
+ AsyncReviewsResourceWithRawResponse,
64
+ ReviewsResourceWithStreamingResponse,
65
+ AsyncReviewsResourceWithStreamingResponse,
66
+ )
51
67
  from .invoices import (
52
68
  InvoicesResource,
53
69
  AsyncInvoicesResource,
@@ -145,6 +161,14 @@ from .memberships import (
145
161
  MembershipsResourceWithStreamingResponse,
146
162
  AsyncMembershipsResourceWithStreamingResponse,
147
163
  )
164
+ from .promo_codes import (
165
+ PromoCodesResource,
166
+ AsyncPromoCodesResource,
167
+ PromoCodesResourceWithRawResponse,
168
+ AsyncPromoCodesResourceWithRawResponse,
169
+ PromoCodesResourceWithStreamingResponse,
170
+ AsyncPromoCodesResourceWithStreamingResponse,
171
+ )
148
172
  from .chat_channels import (
149
173
  ChatChannelsResource,
150
174
  AsyncChatChannelsResource,
@@ -153,6 +177,22 @@ from .chat_channels import (
153
177
  ChatChannelsResourceWithStreamingResponse,
154
178
  AsyncChatChannelsResourceWithStreamingResponse,
155
179
  )
180
+ from .course_lessons import (
181
+ CourseLessonsResource,
182
+ AsyncCourseLessonsResource,
183
+ CourseLessonsResourceWithRawResponse,
184
+ AsyncCourseLessonsResourceWithRawResponse,
185
+ CourseLessonsResourceWithStreamingResponse,
186
+ AsyncCourseLessonsResourceWithStreamingResponse,
187
+ )
188
+ from .course_chapters import (
189
+ CourseChaptersResource,
190
+ AsyncCourseChaptersResource,
191
+ CourseChaptersResourceWithRawResponse,
192
+ AsyncCourseChaptersResourceWithRawResponse,
193
+ CourseChaptersResourceWithStreamingResponse,
194
+ AsyncCourseChaptersResourceWithStreamingResponse,
195
+ )
156
196
  from .ledger_accounts import (
157
197
  LedgerAccountsResource,
158
198
  AsyncLedgerAccountsResource,
@@ -341,4 +381,34 @@ __all__ = [
341
381
  "AsyncForumsResourceWithRawResponse",
342
382
  "ForumsResourceWithStreamingResponse",
343
383
  "AsyncForumsResourceWithStreamingResponse",
384
+ "PromoCodesResource",
385
+ "AsyncPromoCodesResource",
386
+ "PromoCodesResourceWithRawResponse",
387
+ "AsyncPromoCodesResourceWithRawResponse",
388
+ "PromoCodesResourceWithStreamingResponse",
389
+ "AsyncPromoCodesResourceWithStreamingResponse",
390
+ "CoursesResource",
391
+ "AsyncCoursesResource",
392
+ "CoursesResourceWithRawResponse",
393
+ "AsyncCoursesResourceWithRawResponse",
394
+ "CoursesResourceWithStreamingResponse",
395
+ "AsyncCoursesResourceWithStreamingResponse",
396
+ "CourseChaptersResource",
397
+ "AsyncCourseChaptersResource",
398
+ "CourseChaptersResourceWithRawResponse",
399
+ "AsyncCourseChaptersResourceWithRawResponse",
400
+ "CourseChaptersResourceWithStreamingResponse",
401
+ "AsyncCourseChaptersResourceWithStreamingResponse",
402
+ "CourseLessonsResource",
403
+ "AsyncCourseLessonsResource",
404
+ "CourseLessonsResourceWithRawResponse",
405
+ "AsyncCourseLessonsResourceWithRawResponse",
406
+ "CourseLessonsResourceWithStreamingResponse",
407
+ "AsyncCourseLessonsResourceWithStreamingResponse",
408
+ "ReviewsResource",
409
+ "AsyncReviewsResource",
410
+ "ReviewsResourceWithRawResponse",
411
+ "AsyncReviewsResourceWithRawResponse",
412
+ "ReviewsResourceWithStreamingResponse",
413
+ "AsyncReviewsResourceWithStreamingResponse",
344
414
  ]
@@ -68,6 +68,8 @@ class CheckoutConfigurationsResource(SyncAPIResource):
68
68
 
69
69
  - `checkout_configuration:create`
70
70
  - `plan:create`
71
+ - `access_pass:create`
72
+ - `access_pass:update`
71
73
 
72
74
  Args:
73
75
  affiliate_code: The affiliate code to use for the checkout configuration
@@ -257,6 +259,8 @@ class AsyncCheckoutConfigurationsResource(AsyncAPIResource):
257
259
 
258
260
  - `checkout_configuration:create`
259
261
  - `plan:create`
262
+ - `access_pass:create`
263
+ - `access_pass:update`
260
264
 
261
265
  Args:
262
266
  affiliate_code: The affiliate code to use for the checkout configuration