fastcomments 1.2.0__tar.gz → 2.0.0__tar.gz

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 (25) hide show
  1. {fastcomments-1.2.0 → fastcomments-2.0.0}/PKG-INFO +24 -3
  2. {fastcomments-1.2.0 → fastcomments-2.0.0}/README.md +23 -2
  3. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/__init__.py +119 -94
  4. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/api_client.py +1 -1
  5. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/configuration.py +1 -1
  6. {fastcomments-1.2.0 → fastcomments-2.0.0}/fastcomments.egg-info/PKG-INFO +24 -3
  7. {fastcomments-1.2.0 → fastcomments-2.0.0}/pyproject.toml +1 -1
  8. {fastcomments-1.2.0 → fastcomments-2.0.0}/LICENSE +0 -0
  9. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/api_response.py +0 -0
  10. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/exceptions.py +0 -0
  11. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/py.typed +0 -0
  12. {fastcomments-1.2.0 → fastcomments-2.0.0}/client/rest.py +0 -0
  13. {fastcomments-1.2.0 → fastcomments-2.0.0}/fastcomments.egg-info/SOURCES.txt +0 -0
  14. {fastcomments-1.2.0 → fastcomments-2.0.0}/fastcomments.egg-info/dependency_links.txt +0 -0
  15. {fastcomments-1.2.0 → fastcomments-2.0.0}/fastcomments.egg-info/requires.txt +0 -0
  16. {fastcomments-1.2.0 → fastcomments-2.0.0}/fastcomments.egg-info/top_level.txt +0 -0
  17. {fastcomments-1.2.0 → fastcomments-2.0.0}/setup.cfg +0 -0
  18. {fastcomments-1.2.0 → fastcomments-2.0.0}/sso/__init__.py +0 -0
  19. {fastcomments-1.2.0 → fastcomments-2.0.0}/sso/fastcomments_sso.py +0 -0
  20. {fastcomments-1.2.0 → fastcomments-2.0.0}/sso/helpers.py +0 -0
  21. {fastcomments-1.2.0 → fastcomments-2.0.0}/sso/secure_sso_payload.py +0 -0
  22. {fastcomments-1.2.0 → fastcomments-2.0.0}/sso/secure_sso_user_data.py +0 -0
  23. {fastcomments-1.2.0 → fastcomments-2.0.0}/sso/simple_sso_user_data.py +0 -0
  24. {fastcomments-1.2.0 → fastcomments-2.0.0}/tests/test_sso.py +0 -0
  25. {fastcomments-1.2.0 → fastcomments-2.0.0}/tests/test_sso_integration.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastcomments
3
- Version: 1.2.0
3
+ Version: 2.0.0
4
4
  Summary: FastComments Python SDK - A SDK for interacting with the FastComments API
5
5
  Author-email: FastComments <support@fastcomments.com>
6
6
  License-Expression: MIT
@@ -52,7 +52,7 @@ This library contains two modules: the generated API client and the core Python
52
52
 
53
53
  ### Public vs Secured APIs
54
54
 
55
- For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains API calls that can be made directly from a browser/mobile device/etc without authentication.
55
+ For the API client, there are three classes, `DefaultApi`, `PublicApi`, and `ModerationApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains methods that can be made directly from a browser/mobile device/etc without authentication. The `ModerationApi` powers the moderator dashboard and contains methods for moderating comments (list, count, search, logs, export), moderation actions (remove/restore, flag, set review/spam/approval status, votes, reopen/close thread), bans (ban from comment, undo, pre-ban summaries, ban status/preferences, banned-user counts), and badges & trust (award/remove badge, manual badges, get/set trust factor, user internal profile). Every `ModerationApi` method accepts an `sso` parameter so it can be called on behalf of an SSO-authenticated moderator.
56
56
 
57
57
  ## Quick Start
58
58
 
@@ -120,6 +120,27 @@ except Exception as e:
120
120
  print(f"Error: {e}")
121
121
  ```
122
122
 
123
+ ### Using the Moderation Dashboard (ModerationApi)
124
+
125
+ The `ModerationApi` powers the moderator dashboard. Methods are called on behalf of a moderator by passing an `sso` token:
126
+
127
+ ```python
128
+ from client import ApiClient, Configuration, ModerationApi
129
+
130
+ config = Configuration()
131
+ config.host = "https://fastcomments.com/api"
132
+
133
+ api_client = ApiClient(configuration=config)
134
+ moderation_api = ModerationApi(api_client)
135
+
136
+ try:
137
+ # Count the comments awaiting moderation
138
+ response = moderation_api.get_count(sso="SSO_TOKEN")
139
+ print(response)
140
+ except Exception as e:
141
+ print(f"Error: {e}")
142
+ ```
143
+
123
144
  ### Using SSO (Single Sign-On)
124
145
 
125
146
  The SDK includes utilities for generating secure SSO tokens:
@@ -165,7 +186,7 @@ sso_token = sso.create_token()
165
186
  ### Common Issues
166
187
 
167
188
  1. **401 "missing-api-key" error**: Make sure you set `config.api_key = {"ApiKeyAuth": "YOUR_KEY"}` before creating the DefaultApi instance.
168
- 2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests.
189
+ 2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests, and `ModerationApi` for moderator dashboard requests.
169
190
  3. **Import errors**: Make sure you're importing from the correct module:
170
191
  - API client: `from client import ...`
171
192
  - SSO utilities: `from sso import ...`
@@ -18,7 +18,7 @@ This library contains two modules: the generated API client and the core Python
18
18
 
19
19
  ### Public vs Secured APIs
20
20
 
21
- For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains API calls that can be made directly from a browser/mobile device/etc without authentication.
21
+ For the API client, there are three classes, `DefaultApi`, `PublicApi`, and `ModerationApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains methods that can be made directly from a browser/mobile device/etc without authentication. The `ModerationApi` powers the moderator dashboard and contains methods for moderating comments (list, count, search, logs, export), moderation actions (remove/restore, flag, set review/spam/approval status, votes, reopen/close thread), bans (ban from comment, undo, pre-ban summaries, ban status/preferences, banned-user counts), and badges & trust (award/remove badge, manual badges, get/set trust factor, user internal profile). Every `ModerationApi` method accepts an `sso` parameter so it can be called on behalf of an SSO-authenticated moderator.
22
22
 
23
23
  ## Quick Start
24
24
 
@@ -86,6 +86,27 @@ except Exception as e:
86
86
  print(f"Error: {e}")
87
87
  ```
88
88
 
89
+ ### Using the Moderation Dashboard (ModerationApi)
90
+
91
+ The `ModerationApi` powers the moderator dashboard. Methods are called on behalf of a moderator by passing an `sso` token:
92
+
93
+ ```python
94
+ from client import ApiClient, Configuration, ModerationApi
95
+
96
+ config = Configuration()
97
+ config.host = "https://fastcomments.com/api"
98
+
99
+ api_client = ApiClient(configuration=config)
100
+ moderation_api = ModerationApi(api_client)
101
+
102
+ try:
103
+ # Count the comments awaiting moderation
104
+ response = moderation_api.get_count(sso="SSO_TOKEN")
105
+ print(response)
106
+ except Exception as e:
107
+ print(f"Error: {e}")
108
+ ```
109
+
89
110
  ### Using SSO (Single Sign-On)
90
111
 
91
112
  The SDK includes utilities for generating secure SSO tokens:
@@ -131,7 +152,7 @@ sso_token = sso.create_token()
131
152
  ### Common Issues
132
153
 
133
154
  1. **401 "missing-api-key" error**: Make sure you set `config.api_key = {"ApiKeyAuth": "YOUR_KEY"}` before creating the DefaultApi instance.
134
- 2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests.
155
+ 2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests, and `ModerationApi` for moderator dashboard requests.
135
156
  3. **Import errors**: Make sure you're importing from the correct module:
136
157
  - API client: `from client import ...`
137
158
  - SSO utilities: `from sso import ...`
@@ -14,9 +14,10 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.2.0"
17
+ __version__ = "1.2.1"
18
18
 
19
19
  # import apis into sdk package
20
+ from client.api.moderation_api import ModerationApi
20
21
  from client.api.public_api import PublicApi
21
22
  from client.api.default_api import DefaultApi
22
23
 
@@ -33,8 +34,14 @@ from client.exceptions import ApiException
33
34
 
34
35
  # import models into sdk package
35
36
  from client.models.api_audit_log import APIAuditLog
37
+ from client.models.api_ban_user_change_log import APIBanUserChangeLog
38
+ from client.models.api_ban_user_changed_values import APIBanUserChangedValues
39
+ from client.models.api_banned_user import APIBannedUser
40
+ from client.models.api_banned_user_with_multi_match_info import APIBannedUserWithMultiMatchInfo
36
41
  from client.models.api_comment import APIComment
37
42
  from client.models.api_comment_base import APICommentBase
43
+ from client.models.api_comment_base_meta import APICommentBaseMeta
44
+ from client.models.api_comment_common_banned_user import APICommentCommonBannedUser
38
45
  from client.models.api_create_user_badge_response import APICreateUserBadgeResponse
39
46
  from client.models.api_domain_configuration import APIDomainConfiguration
40
47
  from client.models.api_empty_response import APIEmptyResponse
@@ -46,22 +53,29 @@ from client.models.api_get_user_badge_progress_list_response import APIGetUserBa
46
53
  from client.models.api_get_user_badge_progress_response import APIGetUserBadgeProgressResponse
47
54
  from client.models.api_get_user_badge_response import APIGetUserBadgeResponse
48
55
  from client.models.api_get_user_badges_response import APIGetUserBadgesResponse
56
+ from client.models.api_moderate_get_user_ban_preferences_response import APIModerateGetUserBanPreferencesResponse
57
+ from client.models.api_moderate_user_ban_preferences import APIModerateUserBanPreferences
49
58
  from client.models.api_page import APIPage
50
59
  from client.models.apisso_user import APISSOUser
60
+ from client.models.api_save_comment_response import APISaveCommentResponse
51
61
  from client.models.api_status import APIStatus
52
62
  from client.models.api_tenant import APITenant
53
63
  from client.models.api_tenant_daily_usage import APITenantDailyUsage
64
+ from client.models.api_ticket import APITicket
65
+ from client.models.api_ticket_detail import APITicketDetail
66
+ from client.models.api_ticket_file import APITicketFile
54
67
  from client.models.api_user_subscription import APIUserSubscription
55
- from client.models.add_domain_config200_response import AddDomainConfig200Response
56
- from client.models.add_domain_config200_response_any_of import AddDomainConfig200ResponseAnyOf
57
68
  from client.models.add_domain_config_params import AddDomainConfigParams
58
- from client.models.add_hash_tag200_response import AddHashTag200Response
59
- from client.models.add_hash_tags_bulk200_response import AddHashTagsBulk200Response
69
+ from client.models.add_domain_config_response import AddDomainConfigResponse
70
+ from client.models.add_domain_config_response_any_of import AddDomainConfigResponseAnyOf
60
71
  from client.models.add_page_api_response import AddPageAPIResponse
61
72
  from client.models.add_sso_user_api_response import AddSSOUserAPIResponse
62
- from client.models.aggregate_question_results200_response import AggregateQuestionResults200Response
73
+ from client.models.adjust_comment_votes_params import AdjustCommentVotesParams
74
+ from client.models.adjust_votes_response import AdjustVotesResponse
63
75
  from client.models.aggregate_question_results_response import AggregateQuestionResultsResponse
76
+ from client.models.aggregate_response import AggregateResponse
64
77
  from client.models.aggregate_time_bucket import AggregateTimeBucket
78
+ from client.models.aggregation_api_error import AggregationAPIError
65
79
  from client.models.aggregation_item import AggregationItem
66
80
  from client.models.aggregation_op_type import AggregationOpType
67
81
  from client.models.aggregation_operation import AggregationOperation
@@ -70,21 +84,30 @@ from client.models.aggregation_request_sort import AggregationRequestSort
70
84
  from client.models.aggregation_response import AggregationResponse
71
85
  from client.models.aggregation_response_stats import AggregationResponseStats
72
86
  from client.models.aggregation_value import AggregationValue
87
+ from client.models.award_user_badge_response import AwardUserBadgeResponse
88
+ from client.models.ban_user_from_comment_result import BanUserFromCommentResult
89
+ from client.models.ban_user_undo_params import BanUserUndoParams
90
+ from client.models.banned_user_match import BannedUserMatch
91
+ from client.models.banned_user_match_matched_on_value import BannedUserMatchMatchedOnValue
92
+ from client.models.banned_user_match_type import BannedUserMatchType
73
93
  from client.models.billing_info import BillingInfo
74
94
  from client.models.block_from_comment_params import BlockFromCommentParams
75
- from client.models.block_from_comment_public200_response import BlockFromCommentPublic200Response
76
95
  from client.models.block_success import BlockSuccess
96
+ from client.models.build_moderation_filter_params import BuildModerationFilterParams
97
+ from client.models.build_moderation_filter_response import BuildModerationFilterResponse
77
98
  from client.models.bulk_aggregate_question_item import BulkAggregateQuestionItem
78
- from client.models.bulk_aggregate_question_results200_response import BulkAggregateQuestionResults200Response
79
99
  from client.models.bulk_aggregate_question_results_request import BulkAggregateQuestionResultsRequest
80
100
  from client.models.bulk_aggregate_question_results_response import BulkAggregateQuestionResultsResponse
81
101
  from client.models.bulk_create_hash_tags_body import BulkCreateHashTagsBody
82
102
  from client.models.bulk_create_hash_tags_body_tags_inner import BulkCreateHashTagsBodyTagsInner
83
103
  from client.models.bulk_create_hash_tags_response import BulkCreateHashTagsResponse
104
+ from client.models.bulk_create_hash_tags_response_results_inner import BulkCreateHashTagsResponseResultsInner
105
+ from client.models.bulk_pre_ban_params import BulkPreBanParams
106
+ from client.models.bulk_pre_ban_summary import BulkPreBanSummary
84
107
  from client.models.change_comment_pin_status_response import ChangeCommentPinStatusResponse
108
+ from client.models.change_ticket_state_body import ChangeTicketStateBody
109
+ from client.models.change_ticket_state_response import ChangeTicketStateResponse
85
110
  from client.models.check_blocked_comments_response import CheckBlockedCommentsResponse
86
- from client.models.checked_comments_for_blocked200_response import CheckedCommentsForBlocked200Response
87
- from client.models.combine_comments_with_question_results200_response import CombineCommentsWithQuestionResults200Response
88
111
  from client.models.combine_question_results_with_comments_response import CombineQuestionResultsWithCommentsResponse
89
112
  from client.models.comment_data import CommentData
90
113
  from client.models.comment_html_rendering_mode import CommentHTMLRenderingMode
@@ -99,53 +122,42 @@ from client.models.comment_user_badge_info import CommentUserBadgeInfo
99
122
  from client.models.comment_user_hash_tag_info import CommentUserHashTagInfo
100
123
  from client.models.comment_user_mention_info import CommentUserMentionInfo
101
124
  from client.models.commenter_name_formats import CommenterNameFormats
125
+ from client.models.comments_by_ids_params import CommentsByIdsParams
102
126
  from client.models.create_api_page_data import CreateAPIPageData
103
127
  from client.models.create_apisso_user_data import CreateAPISSOUserData
104
128
  from client.models.create_api_user_subscription_data import CreateAPIUserSubscriptionData
105
129
  from client.models.create_comment_params import CreateCommentParams
106
- from client.models.create_comment_public200_response import CreateCommentPublic200Response
107
- from client.models.create_email_template200_response import CreateEmailTemplate200Response
108
130
  from client.models.create_email_template_body import CreateEmailTemplateBody
109
131
  from client.models.create_email_template_response import CreateEmailTemplateResponse
110
- from client.models.create_feed_post200_response import CreateFeedPost200Response
111
132
  from client.models.create_feed_post_params import CreateFeedPostParams
112
- from client.models.create_feed_post_public200_response import CreateFeedPostPublic200Response
113
133
  from client.models.create_feed_post_response import CreateFeedPostResponse
114
134
  from client.models.create_feed_posts_response import CreateFeedPostsResponse
115
135
  from client.models.create_hash_tag_body import CreateHashTagBody
116
136
  from client.models.create_hash_tag_response import CreateHashTagResponse
117
- from client.models.create_moderator200_response import CreateModerator200Response
118
137
  from client.models.create_moderator_body import CreateModeratorBody
119
138
  from client.models.create_moderator_response import CreateModeratorResponse
120
- from client.models.create_question_config200_response import CreateQuestionConfig200Response
121
139
  from client.models.create_question_config_body import CreateQuestionConfigBody
122
140
  from client.models.create_question_config_response import CreateQuestionConfigResponse
123
- from client.models.create_question_result200_response import CreateQuestionResult200Response
124
141
  from client.models.create_question_result_body import CreateQuestionResultBody
125
142
  from client.models.create_question_result_response import CreateQuestionResultResponse
126
143
  from client.models.create_subscription_api_response import CreateSubscriptionAPIResponse
127
- from client.models.create_tenant200_response import CreateTenant200Response
128
144
  from client.models.create_tenant_body import CreateTenantBody
129
- from client.models.create_tenant_package200_response import CreateTenantPackage200Response
130
145
  from client.models.create_tenant_package_body import CreateTenantPackageBody
131
146
  from client.models.create_tenant_package_response import CreateTenantPackageResponse
132
147
  from client.models.create_tenant_response import CreateTenantResponse
133
- from client.models.create_tenant_user200_response import CreateTenantUser200Response
134
148
  from client.models.create_tenant_user_body import CreateTenantUserBody
135
149
  from client.models.create_tenant_user_response import CreateTenantUserResponse
136
- from client.models.create_user_badge200_response import CreateUserBadge200Response
150
+ from client.models.create_ticket_body import CreateTicketBody
151
+ from client.models.create_ticket_response import CreateTicketResponse
137
152
  from client.models.create_user_badge_params import CreateUserBadgeParams
153
+ from client.models.create_v1_page_react import CreateV1PageReact
138
154
  from client.models.custom_config_parameters import CustomConfigParameters
139
155
  from client.models.custom_email_template import CustomEmailTemplate
140
- from client.models.delete_comment200_response import DeleteComment200Response
141
156
  from client.models.delete_comment_action import DeleteCommentAction
142
- from client.models.delete_comment_public200_response import DeleteCommentPublic200Response
143
157
  from client.models.delete_comment_result import DeleteCommentResult
144
- from client.models.delete_comment_vote200_response import DeleteCommentVote200Response
145
- from client.models.delete_domain_config200_response import DeleteDomainConfig200Response
146
- from client.models.delete_feed_post_public200_response import DeleteFeedPostPublic200Response
147
- from client.models.delete_feed_post_public200_response_any_of import DeleteFeedPostPublic200ResponseAnyOf
148
- from client.models.delete_hash_tag_request import DeleteHashTagRequest
158
+ from client.models.delete_domain_config_response import DeleteDomainConfigResponse
159
+ from client.models.delete_feed_post_public_response import DeleteFeedPostPublicResponse
160
+ from client.models.delete_hash_tag_request_body import DeleteHashTagRequestBody
149
161
  from client.models.delete_page_api_response import DeletePageAPIResponse
150
162
  from client.models.delete_sso_user_api_response import DeleteSSOUserAPIResponse
151
163
  from client.models.delete_subscription_api_response import DeleteSubscriptionAPIResponse
@@ -164,120 +176,124 @@ from client.models.feed_post_stats import FeedPostStats
164
176
  from client.models.feed_posts_stats_response import FeedPostsStatsResponse
165
177
  from client.models.find_comments_by_range_item import FindCommentsByRangeItem
166
178
  from client.models.find_comments_by_range_response import FindCommentsByRangeResponse
167
- from client.models.flag_comment200_response import FlagComment200Response
168
- from client.models.flag_comment_public200_response import FlagCommentPublic200Response
169
179
  from client.models.flag_comment_response import FlagCommentResponse
170
- from client.models.get_audit_logs200_response import GetAuditLogs200Response
171
180
  from client.models.get_audit_logs_response import GetAuditLogsResponse
172
- from client.models.get_cached_notification_count200_response import GetCachedNotificationCount200Response
181
+ from client.models.get_banned_users_count_response import GetBannedUsersCountResponse
182
+ from client.models.get_banned_users_from_comment_response import GetBannedUsersFromCommentResponse
173
183
  from client.models.get_cached_notification_count_response import GetCachedNotificationCountResponse
174
- from client.models.get_comment200_response import GetComment200Response
175
- from client.models.get_comment_text200_response import GetCommentText200Response
176
- from client.models.get_comment_vote_user_names200_response import GetCommentVoteUserNames200Response
184
+ from client.models.get_comment_ban_status_response import GetCommentBanStatusResponse
185
+ from client.models.get_comment_text_response import GetCommentTextResponse
177
186
  from client.models.get_comment_vote_user_names_success_response import GetCommentVoteUserNamesSuccessResponse
178
- from client.models.get_comments200_response import GetComments200Response
179
- from client.models.get_comments_public200_response import GetCommentsPublic200Response
187
+ from client.models.get_comments_for_user_response import GetCommentsForUserResponse
180
188
  from client.models.get_comments_response_public_comment import GetCommentsResponsePublicComment
181
189
  from client.models.get_comments_response_with_presence_public_comment import GetCommentsResponseWithPresencePublicComment
182
- from client.models.get_domain_config200_response import GetDomainConfig200Response
183
- from client.models.get_domain_configs200_response import GetDomainConfigs200Response
184
- from client.models.get_domain_configs200_response_any_of import GetDomainConfigs200ResponseAnyOf
185
- from client.models.get_domain_configs200_response_any_of1 import GetDomainConfigs200ResponseAnyOf1
186
- from client.models.get_email_template200_response import GetEmailTemplate200Response
187
- from client.models.get_email_template_definitions200_response import GetEmailTemplateDefinitions200Response
190
+ from client.models.get_domain_config_response import GetDomainConfigResponse
191
+ from client.models.get_domain_configs_response import GetDomainConfigsResponse
192
+ from client.models.get_domain_configs_response_any_of import GetDomainConfigsResponseAnyOf
193
+ from client.models.get_domain_configs_response_any_of1 import GetDomainConfigsResponseAnyOf1
188
194
  from client.models.get_email_template_definitions_response import GetEmailTemplateDefinitionsResponse
189
- from client.models.get_email_template_render_errors200_response import GetEmailTemplateRenderErrors200Response
190
195
  from client.models.get_email_template_render_errors_response import GetEmailTemplateRenderErrorsResponse
191
196
  from client.models.get_email_template_response import GetEmailTemplateResponse
192
- from client.models.get_email_templates200_response import GetEmailTemplates200Response
193
197
  from client.models.get_email_templates_response import GetEmailTemplatesResponse
194
- from client.models.get_event_log200_response import GetEventLog200Response
195
198
  from client.models.get_event_log_response import GetEventLogResponse
196
- from client.models.get_feed_posts200_response import GetFeedPosts200Response
197
- from client.models.get_feed_posts_public200_response import GetFeedPostsPublic200Response
198
199
  from client.models.get_feed_posts_response import GetFeedPostsResponse
199
- from client.models.get_feed_posts_stats200_response import GetFeedPostsStats200Response
200
- from client.models.get_hash_tags200_response import GetHashTags200Response
200
+ from client.models.get_gifs_search_response import GetGifsSearchResponse
201
+ from client.models.get_gifs_trending_response import GetGifsTrendingResponse
201
202
  from client.models.get_hash_tags_response import GetHashTagsResponse
202
- from client.models.get_moderator200_response import GetModerator200Response
203
203
  from client.models.get_moderator_response import GetModeratorResponse
204
- from client.models.get_moderators200_response import GetModerators200Response
205
204
  from client.models.get_moderators_response import GetModeratorsResponse
206
205
  from client.models.get_my_notifications_response import GetMyNotificationsResponse
207
- from client.models.get_notification_count200_response import GetNotificationCount200Response
208
206
  from client.models.get_notification_count_response import GetNotificationCountResponse
209
- from client.models.get_notifications200_response import GetNotifications200Response
210
207
  from client.models.get_notifications_response import GetNotificationsResponse
211
208
  from client.models.get_page_by_urlid_api_response import GetPageByURLIdAPIResponse
212
209
  from client.models.get_pages_api_response import GetPagesAPIResponse
213
- from client.models.get_pending_webhook_event_count200_response import GetPendingWebhookEventCount200Response
214
210
  from client.models.get_pending_webhook_event_count_response import GetPendingWebhookEventCountResponse
215
- from client.models.get_pending_webhook_events200_response import GetPendingWebhookEvents200Response
216
211
  from client.models.get_pending_webhook_events_response import GetPendingWebhookEventsResponse
217
212
  from client.models.get_public_feed_posts_response import GetPublicFeedPostsResponse
218
- from client.models.get_question_config200_response import GetQuestionConfig200Response
213
+ from client.models.get_public_pages_response import GetPublicPagesResponse
219
214
  from client.models.get_question_config_response import GetQuestionConfigResponse
220
- from client.models.get_question_configs200_response import GetQuestionConfigs200Response
221
215
  from client.models.get_question_configs_response import GetQuestionConfigsResponse
222
- from client.models.get_question_result200_response import GetQuestionResult200Response
223
216
  from client.models.get_question_result_response import GetQuestionResultResponse
224
- from client.models.get_question_results200_response import GetQuestionResults200Response
225
217
  from client.models.get_question_results_response import GetQuestionResultsResponse
226
218
  from client.models.get_sso_user_by_email_api_response import GetSSOUserByEmailAPIResponse
227
219
  from client.models.get_sso_user_by_id_api_response import GetSSOUserByIdAPIResponse
228
- from client.models.get_sso_users200_response import GetSSOUsers200Response
220
+ from client.models.get_sso_users_response import GetSSOUsersResponse
229
221
  from client.models.get_subscriptions_api_response import GetSubscriptionsAPIResponse
230
- from client.models.get_tenant200_response import GetTenant200Response
231
- from client.models.get_tenant_daily_usages200_response import GetTenantDailyUsages200Response
232
222
  from client.models.get_tenant_daily_usages_response import GetTenantDailyUsagesResponse
233
- from client.models.get_tenant_package200_response import GetTenantPackage200Response
223
+ from client.models.get_tenant_manual_badges_response import GetTenantManualBadgesResponse
234
224
  from client.models.get_tenant_package_response import GetTenantPackageResponse
235
- from client.models.get_tenant_packages200_response import GetTenantPackages200Response
236
225
  from client.models.get_tenant_packages_response import GetTenantPackagesResponse
237
226
  from client.models.get_tenant_response import GetTenantResponse
238
- from client.models.get_tenant_user200_response import GetTenantUser200Response
239
227
  from client.models.get_tenant_user_response import GetTenantUserResponse
240
- from client.models.get_tenant_users200_response import GetTenantUsers200Response
241
228
  from client.models.get_tenant_users_response import GetTenantUsersResponse
242
- from client.models.get_tenants200_response import GetTenants200Response
243
229
  from client.models.get_tenants_response import GetTenantsResponse
244
- from client.models.get_user200_response import GetUser200Response
245
- from client.models.get_user_badge200_response import GetUserBadge200Response
246
- from client.models.get_user_badge_progress_by_id200_response import GetUserBadgeProgressById200Response
247
- from client.models.get_user_badge_progress_list200_response import GetUserBadgeProgressList200Response
248
- from client.models.get_user_badges200_response import GetUserBadges200Response
249
- from client.models.get_user_notification_count200_response import GetUserNotificationCount200Response
230
+ from client.models.get_ticket_response import GetTicketResponse
231
+ from client.models.get_tickets_response import GetTicketsResponse
232
+ from client.models.get_translations_response import GetTranslationsResponse
233
+ from client.models.get_user_internal_profile_response import GetUserInternalProfileResponse
234
+ from client.models.get_user_internal_profile_response_profile import GetUserInternalProfileResponseProfile
235
+ from client.models.get_user_manual_badges_response import GetUserManualBadgesResponse
250
236
  from client.models.get_user_notification_count_response import GetUserNotificationCountResponse
251
- from client.models.get_user_notifications200_response import GetUserNotifications200Response
252
- from client.models.get_user_presence_statuses200_response import GetUserPresenceStatuses200Response
253
237
  from client.models.get_user_presence_statuses_response import GetUserPresenceStatusesResponse
254
- from client.models.get_user_reacts_public200_response import GetUserReactsPublic200Response
255
238
  from client.models.get_user_response import GetUserResponse
256
- from client.models.get_votes200_response import GetVotes200Response
257
- from client.models.get_votes_for_user200_response import GetVotesForUser200Response
239
+ from client.models.get_user_trust_factor_response import GetUserTrustFactorResponse
240
+ from client.models.get_v1_page_likes import GetV1PageLikes
241
+ from client.models.get_v2_page_react_users_response import GetV2PageReactUsersResponse
242
+ from client.models.get_v2_page_reacts import GetV2PageReacts
258
243
  from client.models.get_votes_for_user_response import GetVotesForUserResponse
259
244
  from client.models.get_votes_response import GetVotesResponse
245
+ from client.models.gif_get_large_response import GifGetLargeResponse
260
246
  from client.models.gif_rating import GifRating
247
+ from client.models.gif_search_internal_error import GifSearchInternalError
248
+ from client.models.gif_search_response import GifSearchResponse
249
+ from client.models.gif_search_response_images_inner_inner import GifSearchResponseImagesInnerInner
250
+ from client.models.header_account_notification import HeaderAccountNotification
261
251
  from client.models.header_state import HeaderState
262
252
  from client.models.ignored_response import IgnoredResponse
263
253
  from client.models.image_content_profanity_level import ImageContentProfanityLevel
254
+ from client.models.imported_agent_approval_notification_frequency import ImportedAgentApprovalNotificationFrequency
264
255
  from client.models.imported_site_type import ImportedSiteType
265
256
  from client.models.live_event import LiveEvent
266
257
  from client.models.live_event_extra_info import LiveEventExtraInfo
267
258
  from client.models.live_event_type import LiveEventType
268
- from client.models.lock_comment200_response import LockComment200Response
269
259
  from client.models.media_asset import MediaAsset
260
+ from client.models.mention_auto_complete_mode import MentionAutoCompleteMode
270
261
  from client.models.meta_item import MetaItem
262
+ from client.models.moderation_api_child_comments_response import ModerationAPIChildCommentsResponse
263
+ from client.models.moderation_api_comment import ModerationAPIComment
264
+ from client.models.moderation_api_comment_log import ModerationAPICommentLog
265
+ from client.models.moderation_api_comment_response import ModerationAPICommentResponse
266
+ from client.models.moderation_api_count_comments_response import ModerationAPICountCommentsResponse
267
+ from client.models.moderation_api_get_comment_ids_response import ModerationAPIGetCommentIdsResponse
268
+ from client.models.moderation_api_get_comments_response import ModerationAPIGetCommentsResponse
269
+ from client.models.moderation_api_get_logs_response import ModerationAPIGetLogsResponse
270
+ from client.models.moderation_comment_search_response import ModerationCommentSearchResponse
271
+ from client.models.moderation_export_response import ModerationExportResponse
272
+ from client.models.moderation_export_status_response import ModerationExportStatusResponse
273
+ from client.models.moderation_filter import ModerationFilter
274
+ from client.models.moderation_page_search_projected import ModerationPageSearchProjected
275
+ from client.models.moderation_page_search_response import ModerationPageSearchResponse
276
+ from client.models.moderation_site_search_projected import ModerationSiteSearchProjected
277
+ from client.models.moderation_site_search_response import ModerationSiteSearchResponse
278
+ from client.models.moderation_suggest_response import ModerationSuggestResponse
279
+ from client.models.moderation_user_search_projected import ModerationUserSearchProjected
280
+ from client.models.moderation_user_search_response import ModerationUserSearchResponse
271
281
  from client.models.moderator import Moderator
272
282
  from client.models.notification_and_count import NotificationAndCount
273
283
  from client.models.notification_object_type import NotificationObjectType
274
284
  from client.models.notification_type import NotificationType
285
+ from client.models.page_user_entry import PageUserEntry
286
+ from client.models.page_users_info_response import PageUsersInfoResponse
287
+ from client.models.page_users_offline_response import PageUsersOfflineResponse
288
+ from client.models.page_users_online_response import PageUsersOnlineResponse
289
+ from client.models.pages_sort_by import PagesSortBy
275
290
  from client.models.patch_domain_config_params import PatchDomainConfigParams
276
- from client.models.patch_hash_tag200_response import PatchHashTag200Response
291
+ from client.models.patch_domain_config_response import PatchDomainConfigResponse
277
292
  from client.models.patch_page_api_response import PatchPageAPIResponse
278
293
  from client.models.patch_sso_user_api_response import PatchSSOUserAPIResponse
279
294
  from client.models.pending_comment_to_sync_outbound import PendingCommentToSyncOutbound
280
- from client.models.pin_comment200_response import PinComment200Response
295
+ from client.models.post_remove_comment_response import PostRemoveCommentResponse
296
+ from client.models.pre_ban_summary import PreBanSummary
281
297
  from client.models.pub_sub_comment import PubSubComment
282
298
  from client.models.pub_sub_comment_base import PubSubCommentBase
283
299
  from client.models.pub_sub_vote import PubSubVote
@@ -288,7 +304,9 @@ from client.models.public_block_from_comment_params import PublicBlockFromCommen
288
304
  from client.models.public_comment import PublicComment
289
305
  from client.models.public_comment_base import PublicCommentBase
290
306
  from client.models.public_feed_posts_response import PublicFeedPostsResponse
307
+ from client.models.public_page import PublicPage
291
308
  from client.models.public_vote import PublicVote
309
+ from client.models.put_domain_config_response import PutDomainConfigResponse
292
310
  from client.models.put_sso_user_api_response import PutSSOUserAPIResponse
293
311
  from client.models.query_predicate import QueryPredicate
294
312
  from client.models.query_predicate_value import QueryPredicateValue
@@ -301,11 +319,10 @@ from client.models.question_result_aggregation_overall import QuestionResultAggr
301
319
  from client.models.question_sub_question_visibility import QuestionSubQuestionVisibility
302
320
  from client.models.question_when_save import QuestionWhenSave
303
321
  from client.models.react_body_params import ReactBodyParams
304
- from client.models.react_feed_post_public200_response import ReactFeedPostPublic200Response
305
322
  from client.models.react_feed_post_response import ReactFeedPostResponse
306
323
  from client.models.record_string_before_string_or_null_after_string_or_null_value import RecordStringBeforeStringOrNullAfterStringOrNullValue
307
- from client.models.record_string_string_or_number_value import RecordStringStringOrNumberValue
308
- from client.models.render_email_template200_response import RenderEmailTemplate200Response
324
+ from client.models.remove_comment_action_response import RemoveCommentActionResponse
325
+ from client.models.remove_user_badge_response import RemoveUserBadgeResponse
309
326
  from client.models.render_email_template_body import RenderEmailTemplateBody
310
327
  from client.models.render_email_template_response import RenderEmailTemplateResponse
311
328
  from client.models.renderable_user_notification import RenderableUserNotification
@@ -313,29 +330,33 @@ from client.models.repeat_comment_check_ignored_reason import RepeatCommentCheck
313
330
  from client.models.repeat_comment_handling_action import RepeatCommentHandlingAction
314
331
  from client.models.replace_tenant_package_body import ReplaceTenantPackageBody
315
332
  from client.models.replace_tenant_user_body import ReplaceTenantUserBody
316
- from client.models.reset_user_notifications200_response import ResetUserNotifications200Response
317
333
  from client.models.reset_user_notifications_response import ResetUserNotificationsResponse
318
334
  from client.models.sortdir import SORTDIR
319
335
  from client.models.sso_security_level import SSOSecurityLevel
320
- from client.models.save_comment200_response import SaveComment200Response
321
- from client.models.save_comment_response import SaveCommentResponse
322
336
  from client.models.save_comment_response_optimized import SaveCommentResponseOptimized
337
+ from client.models.save_comments_bulk_response import SaveCommentsBulkResponse
323
338
  from client.models.save_comments_response_with_presence import SaveCommentsResponseWithPresence
324
- from client.models.search_users200_response import SearchUsers200Response
325
339
  from client.models.search_users_response import SearchUsersResponse
326
- from client.models.set_comment_text200_response import SetCommentText200Response
340
+ from client.models.search_users_result import SearchUsersResult
341
+ from client.models.search_users_sectioned_response import SearchUsersSectionedResponse
342
+ from client.models.set_comment_approved_response import SetCommentApprovedResponse
343
+ from client.models.set_comment_text_params import SetCommentTextParams
344
+ from client.models.set_comment_text_response import SetCommentTextResponse
327
345
  from client.models.set_comment_text_result import SetCommentTextResult
346
+ from client.models.set_user_trust_factor_response import SetUserTrustFactorResponse
328
347
  from client.models.size_preset import SizePreset
329
348
  from client.models.sort_directions import SortDirections
330
349
  from client.models.spam_rule import SpamRule
350
+ from client.models.tos_config import TOSConfig
351
+ from client.models.tenant_badge import TenantBadge
331
352
  from client.models.tenant_hash_tag import TenantHashTag
332
353
  from client.models.tenant_package import TenantPackage
333
- from client.models.un_block_comment_public200_response import UnBlockCommentPublic200Response
334
354
  from client.models.un_block_from_comment_params import UnBlockFromCommentParams
335
355
  from client.models.unblock_success import UnblockSuccess
336
356
  from client.models.updatable_comment_params import UpdatableCommentParams
337
357
  from client.models.update_api_page_data import UpdateAPIPageData
338
358
  from client.models.update_apisso_user_data import UpdateAPISSOUserData
359
+ from client.models.update_api_user_subscription_data import UpdateAPIUserSubscriptionData
339
360
  from client.models.update_domain_config_params import UpdateDomainConfigParams
340
361
  from client.models.update_email_template_body import UpdateEmailTemplateBody
341
362
  from client.models.update_feed_post_params import UpdateFeedPostParams
@@ -345,12 +366,14 @@ from client.models.update_moderator_body import UpdateModeratorBody
345
366
  from client.models.update_notification_body import UpdateNotificationBody
346
367
  from client.models.update_question_config_body import UpdateQuestionConfigBody
347
368
  from client.models.update_question_result_body import UpdateQuestionResultBody
369
+ from client.models.update_subscription_api_response import UpdateSubscriptionAPIResponse
348
370
  from client.models.update_tenant_body import UpdateTenantBody
349
371
  from client.models.update_tenant_package_body import UpdateTenantPackageBody
350
372
  from client.models.update_tenant_user_body import UpdateTenantUserBody
351
- from client.models.update_user_badge200_response import UpdateUserBadge200Response
352
373
  from client.models.update_user_badge_params import UpdateUserBadgeParams
353
- from client.models.update_user_notification_status200_response import UpdateUserNotificationStatus200Response
374
+ from client.models.update_user_notification_comment_subscription_status_response import UpdateUserNotificationCommentSubscriptionStatusResponse
375
+ from client.models.update_user_notification_page_subscription_status_response import UpdateUserNotificationPageSubscriptionStatusResponse
376
+ from client.models.update_user_notification_status_response import UpdateUserNotificationStatusResponse
354
377
  from client.models.upload_image_response import UploadImageResponse
355
378
  from client.models.user import User
356
379
  from client.models.user_badge import UserBadge
@@ -361,9 +384,11 @@ from client.models.user_notification_write_response import UserNotificationWrite
361
384
  from client.models.user_presence_data import UserPresenceData
362
385
  from client.models.user_reacts_response import UserReactsResponse
363
386
  from client.models.user_search_result import UserSearchResult
387
+ from client.models.user_search_section import UserSearchSection
388
+ from client.models.user_search_section_result import UserSearchSectionResult
364
389
  from client.models.user_session_info import UserSessionInfo
390
+ from client.models.users_list_location import UsersListLocation
365
391
  from client.models.vote_body_params import VoteBodyParams
366
- from client.models.vote_comment200_response import VoteComment200Response
367
392
  from client.models.vote_delete_response import VoteDeleteResponse
368
393
  from client.models.vote_response import VoteResponse
369
394
  from client.models.vote_response_status import VoteResponseStatus
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/1.2.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.2.1/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
@@ -524,7 +524,7 @@ conf = client.Configuration(
524
524
  "OS: {env}\n"\
525
525
  "Python Version: {pyversion}\n"\
526
526
  "Version of the API: 0.0.0\n"\
527
- "SDK Package Version: 1.2.0".\
527
+ "SDK Package Version: 1.2.1".\
528
528
  format(env=sys.platform, pyversion=sys.version)
529
529
 
530
530
  def get_host_settings(self) -> List[HostSetting]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastcomments
3
- Version: 1.2.0
3
+ Version: 2.0.0
4
4
  Summary: FastComments Python SDK - A SDK for interacting with the FastComments API
5
5
  Author-email: FastComments <support@fastcomments.com>
6
6
  License-Expression: MIT
@@ -52,7 +52,7 @@ This library contains two modules: the generated API client and the core Python
52
52
 
53
53
  ### Public vs Secured APIs
54
54
 
55
- For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains API calls that can be made directly from a browser/mobile device/etc without authentication.
55
+ For the API client, there are three classes, `DefaultApi`, `PublicApi`, and `ModerationApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains methods that can be made directly from a browser/mobile device/etc without authentication. The `ModerationApi` powers the moderator dashboard and contains methods for moderating comments (list, count, search, logs, export), moderation actions (remove/restore, flag, set review/spam/approval status, votes, reopen/close thread), bans (ban from comment, undo, pre-ban summaries, ban status/preferences, banned-user counts), and badges & trust (award/remove badge, manual badges, get/set trust factor, user internal profile). Every `ModerationApi` method accepts an `sso` parameter so it can be called on behalf of an SSO-authenticated moderator.
56
56
 
57
57
  ## Quick Start
58
58
 
@@ -120,6 +120,27 @@ except Exception as e:
120
120
  print(f"Error: {e}")
121
121
  ```
122
122
 
123
+ ### Using the Moderation Dashboard (ModerationApi)
124
+
125
+ The `ModerationApi` powers the moderator dashboard. Methods are called on behalf of a moderator by passing an `sso` token:
126
+
127
+ ```python
128
+ from client import ApiClient, Configuration, ModerationApi
129
+
130
+ config = Configuration()
131
+ config.host = "https://fastcomments.com/api"
132
+
133
+ api_client = ApiClient(configuration=config)
134
+ moderation_api = ModerationApi(api_client)
135
+
136
+ try:
137
+ # Count the comments awaiting moderation
138
+ response = moderation_api.get_count(sso="SSO_TOKEN")
139
+ print(response)
140
+ except Exception as e:
141
+ print(f"Error: {e}")
142
+ ```
143
+
123
144
  ### Using SSO (Single Sign-On)
124
145
 
125
146
  The SDK includes utilities for generating secure SSO tokens:
@@ -165,7 +186,7 @@ sso_token = sso.create_token()
165
186
  ### Common Issues
166
187
 
167
188
  1. **401 "missing-api-key" error**: Make sure you set `config.api_key = {"ApiKeyAuth": "YOUR_KEY"}` before creating the DefaultApi instance.
168
- 2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests.
189
+ 2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests, and `ModerationApi` for moderator dashboard requests.
169
190
  3. **Import errors**: Make sure you're importing from the correct module:
170
191
  - API client: `from client import ...`
171
192
  - SSO utilities: `from sso import ...`
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fastcomments"
7
- version = "1.2.0"
7
+ version = "2.0.0"
8
8
  description = "FastComments Python SDK - A SDK for interacting with the FastComments API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
File without changes
File without changes