egain-api-python 0.1.1__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.
- egain_api_python/__init__.py +17 -0
- egain_api_python/_hooks/__init__.py +5 -0
- egain_api_python/_hooks/registration.py +13 -0
- egain_api_python/_hooks/sdkhooks.py +76 -0
- egain_api_python/_hooks/types.py +112 -0
- egain_api_python/_version.py +15 -0
- egain_api_python/aiservices.py +23 -0
- egain_api_python/answers.py +281 -0
- egain_api_python/articlelists.py +469 -0
- egain_api_python/basesdk.py +368 -0
- egain_api_python/connectorssearchevents.py +537 -0
- egain_api_python/content.py +23 -0
- egain_api_python/errors/__init__.py +78 -0
- egain_api_python/errors/egaindefaulterror.py +40 -0
- egain_api_python/errors/egainerror.py +30 -0
- egain_api_python/errors/gethealthop.py +74 -0
- egain_api_python/errors/no_response_error.py +17 -0
- egain_api_python/errors/responsevalidationerror.py +27 -0
- egain_api_python/errors/schemas_wserrorcommon.py +51 -0
- egain_api_python/errors/wserrorcommon.py +49 -0
- egain_api_python/escalation.py +955 -0
- egain_api_python/export.py +487 -0
- egain_api_python/federatedsearchevent.py +287 -0
- egain_api_python/general.py +925 -0
- egain_api_python/guidedhelp.py +3373 -0
- egain_api_python/health.py +253 -0
- egain_api_python/httpclient.py +125 -0
- egain_api_python/import_.py +1161 -0
- egain_api_python/models/__init__.py +2136 -0
- egain_api_python/models/acceptghsolutionop.py +52 -0
- egain_api_python/models/acceptlanguage.py +23 -0
- egain_api_python/models/accessibleportal.py +37 -0
- egain_api_python/models/action.py +56 -0
- egain_api_python/models/actionsearch.py +92 -0
- egain_api_python/models/addasreferenceop.py +52 -0
- egain_api_python/models/addbookmarkop.py +43 -0
- egain_api_python/models/additionalsnippets.py +57 -0
- egain_api_python/models/addtoreplyop.py +52 -0
- egain_api_python/models/aisearchop.py +131 -0
- egain_api_python/models/aisearchresponse.py +67 -0
- egain_api_python/models/allaccessibleportals.py +28 -0
- egain_api_python/models/answer.py +21 -0
- egain_api_python/models/answeredquestion.py +125 -0
- egain_api_python/models/answerrange.py +41 -0
- egain_api_python/models/answersrequest.py +78 -0
- egain_api_python/models/answersresponse.py +93 -0
- egain_api_python/models/article.py +241 -0
- egain_api_python/models/articleactivitylink.py +62 -0
- egain_api_python/models/articleadditionalattributes.py +23 -0
- egain_api_python/models/articleaisearchresult.py +254 -0
- egain_api_python/models/articleattachment.py +44 -0
- egain_api_python/models/articlelist.py +48 -0
- egain_api_python/models/articlelistresult.py +38 -0
- egain_api_python/models/articlelistsresult.py +22 -0
- egain_api_python/models/articlepermissions.py +25 -0
- egain_api_python/models/articlepermissionsresult.py +27 -0
- egain_api_python/models/articlerating.py +51 -0
- egain_api_python/models/articleratingsresponse.py +28 -0
- egain_api_python/models/articleresult.py +159 -0
- egain_api_python/models/articleresultadditionalattributes.py +22 -0
- egain_api_python/models/articleresults.py +32 -0
- egain_api_python/models/articlesearchresult.py +243 -0
- egain_api_python/models/articlesearchresults.py +32 -0
- egain_api_python/models/articlesort.py +11 -0
- egain_api_python/models/articlesortorder.py +11 -0
- egain_api_python/models/articletype.py +56 -0
- egain_api_python/models/articlewitheditions.py +227 -0
- egain_api_python/models/attachment.py +31 -0
- egain_api_python/models/attachmentadditionalattributes.py +10 -0
- egain_api_python/models/attachmentcontent.py +57 -0
- egain_api_python/models/attachmentcontentresult.py +22 -0
- egain_api_python/models/attachmentforcreatesuggestion.py +25 -0
- egain_api_python/models/attachments.py +35 -0
- egain_api_python/models/attachmentsummary.py +37 -0
- egain_api_python/models/attachmentupload.py +20 -0
- egain_api_python/models/avertcustomerescalationop.py +44 -0
- egain_api_python/models/bookmark.py +57 -0
- egain_api_python/models/bookmarkresult.py +26 -0
- egain_api_python/models/bookmarkstatus.py +34 -0
- egain_api_python/models/case.py +158 -0
- egain_api_python/models/caseadditionalattributes.py +11 -0
- egain_api_python/models/caseanswer.py +21 -0
- egain_api_python/models/casebase.py +67 -0
- egain_api_python/models/casebaseresult.py +28 -0
- egain_api_python/models/casebasesearchsettings.py +26 -0
- egain_api_python/models/caselistresult.py +74 -0
- egain_api_python/models/caselistresults.py +28 -0
- egain_api_python/models/casequestion.py +16 -0
- egain_api_python/models/casequestiondetail.py +29 -0
- egain_api_python/models/casesearch.py +80 -0
- egain_api_python/models/clusterid.py +16 -0
- egain_api_python/models/clusterresult.py +37 -0
- egain_api_python/models/clusterresults.py +28 -0
- egain_api_python/models/comment.py +33 -0
- egain_api_python/models/comments.py +26 -0
- egain_api_python/models/completecustomerescalationop.py +44 -0
- egain_api_python/models/compliancearticleresult.py +166 -0
- egain_api_python/models/compliancearticleresultadditionalattributes.py +22 -0
- egain_api_python/models/compliancearticleresults.py +35 -0
- egain_api_python/models/complianceforarticle.py +59 -0
- egain_api_python/models/complyarticleop.py +40 -0
- egain_api_python/models/components_schemas_tag.py +25 -0
- egain_api_python/models/components_schemas_tagcategory.py +39 -0
- egain_api_python/models/components_schemas_taggroup.py +25 -0
- egain_api_python/models/configurableattribute.py +25 -0
- egain_api_python/models/configurableattributes.py +15 -0
- egain_api_python/models/contactperson.py +43 -0
- egain_api_python/models/contacts.py +21 -0
- egain_api_python/models/createbookmark.py +64 -0
- egain_api_python/models/createdby.py +37 -0
- egain_api_python/models/createfederatedsearchevent.py +85 -0
- egain_api_python/models/createfederatedsearchresulteventop.py +46 -0
- egain_api_python/models/createimportop.py +20 -0
- egain_api_python/models/createimportvalidationop.py +20 -0
- egain_api_python/models/createquickpick.py +34 -0
- egain_api_python/models/createquickpickop.py +55 -0
- egain_api_python/models/createsearchresulteventforconnectors.py +71 -0
- egain_api_python/models/createsearchresulteventforconnectorsop.py +48 -0
- egain_api_python/models/createsignedurlop.py +29 -0
- egain_api_python/models/createsuggestion.py +126 -0
- egain_api_python/models/createviewedsearchresulteventforconnectors.py +76 -0
- egain_api_python/models/createviewedsearchresultseventforconnectorsop.py +48 -0
- egain_api_python/models/customattribute.py +35 -0
- egain_api_python/models/deletebookmarkop.py +40 -0
- egain_api_python/models/deletesuggestionop.py +40 -0
- egain_api_python/models/department.py +21 -0
- egain_api_python/models/detailfield.py +32 -0
- egain_api_python/models/displayfield.py +27 -0
- egain_api_python/models/dynamiccluster.py +21 -0
- egain_api_python/models/dynamicsearch.py +40 -0
- egain_api_python/models/edition.py +79 -0
- egain_api_python/models/editionwithcontent.py +68 -0
- egain_api_python/models/email.py +21 -0
- egain_api_python/models/exportcontentop.py +14 -0
- egain_api_python/models/exportstatus.py +106 -0
- egain_api_python/models/exportstatusop.py +31 -0
- egain_api_python/models/feedbackarticleforsuggestion.py +34 -0
- egain_api_python/models/folderbreadcrumb.py +24 -0
- egain_api_python/models/foldersummary.py +29 -0
- egain_api_python/models/getacknowledgedcompliancearticlesop.py +119 -0
- egain_api_python/models/getallarticlelistsop.py +47 -0
- egain_api_python/models/getallcasebasesreleasesop.py +65 -0
- egain_api_python/models/getallcasesop.py +83 -0
- egain_api_python/models/getallportalsop.py +60 -0
- egain_api_python/models/getallprofilesinportalop.py +64 -0
- egain_api_python/models/getallquickpicksop.py +83 -0
- egain_api_python/models/getalltopicsop.py +132 -0
- egain_api_python/models/getalluserprofilesop.py +47 -0
- egain_api_python/models/getancestortopicsop.py +133 -0
- egain_api_python/models/getannouncementarticlesop.py +134 -0
- egain_api_python/models/getarticleattachmentbyidop.py +31 -0
- egain_api_python/models/getarticlebyidop.py +257 -0
- egain_api_python/models/getarticlebyidwitheditionsop.py +46 -0
- egain_api_python/models/getarticleeditiondetailsop.py +55 -0
- egain_api_python/models/getarticlelistdetailsop.py +115 -0
- egain_api_python/models/getarticlepermissionsbyidop.py +40 -0
- egain_api_python/models/getarticlepersonalizationop.py +73 -0
- egain_api_python/models/getarticleratingsop.py +74 -0
- egain_api_python/models/getarticlesintopicop.py +172 -0
- egain_api_python/models/getattachmentbyidinportalop.py +56 -0
- egain_api_python/models/getbookmarkop.py +31 -0
- egain_api_python/models/getcasebasereleasebyidop.py +64 -0
- egain_api_python/models/getcasebyidop.py +75 -0
- egain_api_python/models/getchildtopicsop.py +150 -0
- egain_api_python/models/getclusterbycasebasereleaseidop.py +74 -0
- egain_api_python/models/gethealthop.py +130 -0
- egain_api_python/models/getimportcontentop.py +46 -0
- egain_api_python/models/getmyportalsop.py +97 -0
- egain_api_python/models/getmysubscriptionop.py +115 -0
- egain_api_python/models/getpendingcompliancearticlesop.py +119 -0
- egain_api_python/models/getpopulararticlesop.py +133 -0
- egain_api_python/models/getportaldetailsbyidop.py +47 -0
- egain_api_python/models/getrelatedarticlesforsuggestionop.py +96 -0
- egain_api_python/models/getrelatedarticlesop.py +143 -0
- egain_api_python/models/getsuggestionattachmentbyidop.py +76 -0
- egain_api_python/models/getsuggestionattachmentsop.py +40 -0
- egain_api_python/models/getsuggestioncommentsop.py +40 -0
- egain_api_python/models/getsuggestionop.py +107 -0
- egain_api_python/models/gettagcategoriesforinterestforportalop.py +46 -0
- egain_api_python/models/gettopicbreadcrumbforarticleop.py +55 -0
- egain_api_python/models/getuserdetailsop.py +22 -0
- egain_api_python/models/getusermilestonesop.py +22 -0
- egain_api_python/models/ghsearchrequest.py +67 -0
- egain_api_python/models/ghsearchresult.py +75 -0
- egain_api_python/models/ghstepsearchrequest.py +64 -0
- egain_api_python/models/image.py +17 -0
- egain_api_python/models/importcontent.py +79 -0
- egain_api_python/models/importstatus.py +29 -0
- egain_api_python/models/kblanguage.py +63 -0
- egain_api_python/models/kblanguagecode.py +48 -0
- egain_api_python/models/kblanguages.py +22 -0
- egain_api_python/models/knowledgeexport.py +237 -0
- egain_api_python/models/l10nstring.py +22 -0
- egain_api_python/models/languagecode.py +39 -0
- egain_api_python/models/languagecode_parameter.py +39 -0
- egain_api_python/models/languagequeryparameter.py +39 -0
- egain_api_python/models/link.py +25 -0
- egain_api_python/models/makesuggestionop.py +44 -0
- egain_api_python/models/mandatorylanguagequeryparameter.py +38 -0
- egain_api_python/models/metadata.py +29 -0
- egain_api_python/models/milestone.py +21 -0
- egain_api_python/models/milestonename.py +26 -0
- egain_api_python/models/milestones.py +21 -0
- egain_api_python/models/modifiedby.py +37 -0
- egain_api_python/models/modifysuggestion.py +78 -0
- egain_api_python/models/modifysuggestionsop.py +44 -0
- egain_api_python/models/optionalarticleattributes.py +20 -0
- egain_api_python/models/order.py +10 -0
- egain_api_python/models/ownedby.py +37 -0
- egain_api_python/models/paginationinfo.py +32 -0
- egain_api_python/models/patchimportcontentvalidationop.py +46 -0
- egain_api_python/models/personalization.py +67 -0
- egain_api_python/models/phone.py +21 -0
- egain_api_python/models/portal.py +102 -0
- egain_api_python/models/portalresult.py +28 -0
- egain_api_python/models/portalsettings.py +398 -0
- egain_api_python/models/post_portalid_answersop.py +88 -0
- egain_api_python/models/post_portalid_retrieveop.py +88 -0
- egain_api_python/models/profile.py +26 -0
- egain_api_python/models/profileresult.py +24 -0
- egain_api_python/models/publishprofile.py +30 -0
- egain_api_python/models/publishview.py +38 -0
- egain_api_python/models/question.py +101 -0
- egain_api_python/models/questionandanswer.py +26 -0
- egain_api_python/models/quickpickrating.py +32 -0
- egain_api_python/models/quickpickresult.py +38 -0
- egain_api_python/models/quickpickresults.py +28 -0
- egain_api_python/models/ratearticleop.py +71 -0
- egain_api_python/models/referenceresponse.py +80 -0
- egain_api_python/models/rejectghsolutionop.py +52 -0
- egain_api_python/models/relatedquestions.py +28 -0
- egain_api_python/models/resourcetype_parameter.py +10 -0
- egain_api_python/models/restorequickpickop.py +63 -0
- egain_api_python/models/retrieverequest.py +47 -0
- egain_api_python/models/retrieveresponse.py +96 -0
- egain_api_python/models/role.py +26 -0
- egain_api_python/models/roletemplate.py +25 -0
- egain_api_python/models/schemas_answer.py +94 -0
- egain_api_python/models/schemas_customattribute.py +35 -0
- egain_api_python/models/schemas_link.py +27 -0
- egain_api_python/models/schemas_tag.py +21 -0
- egain_api_python/models/schemas_tagcategory.py +75 -0
- egain_api_python/models/schemas_taggroup.py +31 -0
- egain_api_python/models/schemas_tags.py +19 -0
- egain_api_python/models/schemas_wserrorcommon.py +17 -0
- egain_api_python/models/searchfilterattribute.py +61 -0
- egain_api_python/models/searchpriortoescalationop.py +108 -0
- egain_api_python/models/searchresult.py +101 -0
- egain_api_python/models/searchsuggestionop.py +93 -0
- egain_api_python/models/security.py +25 -0
- egain_api_python/models/selectuserprofileop.py +44 -0
- egain_api_python/models/sessioncontextvariable.py +17 -0
- egain_api_python/models/shorturl.py +32 -0
- egain_api_python/models/sortidname.py +10 -0
- egain_api_python/models/sortidnamedepartment.py +11 -0
- egain_api_python/models/stage.py +26 -0
- egain_api_python/models/startcustomerescalationop.py +66 -0
- egain_api_python/models/startescalationrequest.py +94 -0
- egain_api_python/models/startghsearchop.py +74 -0
- egain_api_python/models/startquestionandanswer.py +26 -0
- egain_api_python/models/stepghsearchop.py +62 -0
- egain_api_python/models/stringattributevalue.py +30 -0
- egain_api_python/models/structuredauthoringfields.py +33 -0
- egain_api_python/models/subscribearticleop.py +40 -0
- egain_api_python/models/suggestion.py +190 -0
- egain_api_python/models/suggestionadditionalattributes.py +11 -0
- egain_api_python/models/suggestionattachment.py +46 -0
- egain_api_python/models/suggestions.py +28 -0
- egain_api_python/models/tag.py +17 -0
- egain_api_python/models/tagcategoriesforinterest.py +22 -0
- egain_api_python/models/tagcategory.py +34 -0
- egain_api_python/models/taggroup.py +17 -0
- egain_api_python/models/taggroups.py +20 -0
- egain_api_python/models/tags.py +17 -0
- egain_api_python/models/topic.py +113 -0
- egain_api_python/models/topicadditionalattributes.py +20 -0
- egain_api_python/models/topicaisearchresult.py +67 -0
- egain_api_python/models/topicbreadcrumb.py +24 -0
- egain_api_python/models/topicresult.py +26 -0
- egain_api_python/models/topicsummary.py +31 -0
- egain_api_python/models/topictreenode.py +27 -0
- egain_api_python/models/topictreeresult.py +28 -0
- egain_api_python/models/unsubscribearticleop.py +55 -0
- egain_api_python/models/uploadattachmentop.py +36 -0
- egain_api_python/models/userdetails.py +44 -0
- egain_api_python/models/userprofile.py +33 -0
- egain_api_python/models/userprofiles.py +21 -0
- egain_api_python/models/userview.py +33 -0
- egain_api_python/models/validateimportcontent.py +58 -0
- egain_api_python/models/virtualcase.py +52 -0
- egain_api_python/models/workflow.py +21 -0
- egain_api_python/models/workflowmilestone.py +11 -0
- egain_api_python/models/wserrorcommon.py +17 -0
- egain_api_python/populararticles.py +287 -0
- egain_api_python/portal_article.py +4935 -0
- egain_api_python/portal_attachment.py +494 -0
- egain_api_python/portal_bookmark.py +707 -0
- egain_api_python/portal_sdk.py +88 -0
- egain_api_python/portal_suggestion.py +2283 -0
- egain_api_python/portal_topic.py +975 -0
- egain_api_python/portal_userdetails.py +211 -0
- egain_api_python/portal_userprofile.py +431 -0
- egain_api_python/py.typed +1 -0
- egain_api_python/retrieve.py +265 -0
- egain_api_python/sdk.py +216 -0
- egain_api_python/sdkconfiguration.py +50 -0
- egain_api_python/search.py +251 -0
- egain_api_python/types/__init__.py +21 -0
- egain_api_python/types/basemodel.py +39 -0
- egain_api_python/usermilestones.py +219 -0
- egain_api_python/utils/__init__.py +200 -0
- egain_api_python/utils/annotations.py +79 -0
- egain_api_python/utils/datetimes.py +23 -0
- egain_api_python/utils/enums.py +74 -0
- egain_api_python/utils/eventstreaming.py +248 -0
- egain_api_python/utils/forms.py +223 -0
- egain_api_python/utils/headers.py +136 -0
- egain_api_python/utils/logger.py +27 -0
- egain_api_python/utils/metadata.py +118 -0
- egain_api_python/utils/queryparams.py +205 -0
- egain_api_python/utils/requestbodies.py +66 -0
- egain_api_python/utils/retries.py +217 -0
- egain_api_python/utils/security.py +192 -0
- egain_api_python/utils/serializers.py +249 -0
- egain_api_python/utils/unmarshal_json_response.py +24 -0
- egain_api_python/utils/url.py +155 -0
- egain_api_python/utils/values.py +137 -0
- egain_api_python-0.1.1.dist-info/METADATA +827 -0
- egain_api_python-0.1.1.dist-info/RECORD +332 -0
- egain_api_python-0.1.1.dist-info/WHEEL +5 -0
- egain_api_python-0.1.1.dist-info/licenses/LICENSE +21 -0
- egain_api_python-0.1.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,925 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from .basesdk import BaseSDK
|
4
|
+
from egain_api_python import errors, models, utils
|
5
|
+
from egain_api_python._hooks import HookContext
|
6
|
+
from egain_api_python.types import OptionalNullable, UNSET
|
7
|
+
from egain_api_python.utils import get_security_from_env
|
8
|
+
from egain_api_python.utils.unmarshal_json_response import unmarshal_json_response
|
9
|
+
from typing import Any, Mapping, Optional
|
10
|
+
|
11
|
+
|
12
|
+
class General(BaseSDK):
|
13
|
+
def get_all_portals(
|
14
|
+
self,
|
15
|
+
*,
|
16
|
+
accept_language: models.AcceptLanguage,
|
17
|
+
department_id: Optional[str] = None,
|
18
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
19
|
+
pagenum: Optional[int] = 1,
|
20
|
+
pagesize: Optional[int] = 10,
|
21
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
22
|
+
server_url: Optional[str] = None,
|
23
|
+
timeout_ms: Optional[int] = None,
|
24
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
25
|
+
) -> Optional[models.PortalResult]:
|
26
|
+
r"""Get All Portals
|
27
|
+
|
28
|
+
## Overview
|
29
|
+
The Get All Portals API returns all portals in a partition or department.
|
30
|
+
|
31
|
+
|
32
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
33
|
+
:param department_id: The ID of the department.
|
34
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
35
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
36
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
37
|
+
:param retries: Override the default retry configuration for this method
|
38
|
+
:param server_url: Override the default server URL for this method
|
39
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
40
|
+
:param http_headers: Additional headers to set or replace on requests.
|
41
|
+
"""
|
42
|
+
base_url = None
|
43
|
+
url_variables = None
|
44
|
+
if timeout_ms is None:
|
45
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
46
|
+
|
47
|
+
if server_url is not None:
|
48
|
+
base_url = server_url
|
49
|
+
else:
|
50
|
+
base_url = self._get_url(base_url, url_variables)
|
51
|
+
|
52
|
+
request = models.GetAllPortalsRequest(
|
53
|
+
accept_language=accept_language,
|
54
|
+
department_id=department_id,
|
55
|
+
language=language,
|
56
|
+
pagenum=pagenum,
|
57
|
+
pagesize=pagesize,
|
58
|
+
)
|
59
|
+
|
60
|
+
req = self._build_request(
|
61
|
+
method="GET",
|
62
|
+
path="/portals",
|
63
|
+
base_url=base_url,
|
64
|
+
url_variables=url_variables,
|
65
|
+
request=request,
|
66
|
+
request_body_required=False,
|
67
|
+
request_has_path_params=False,
|
68
|
+
request_has_query_params=True,
|
69
|
+
user_agent_header="user-agent",
|
70
|
+
accept_header_value="application/json",
|
71
|
+
http_headers=http_headers,
|
72
|
+
security=self.sdk_configuration.security,
|
73
|
+
timeout_ms=timeout_ms,
|
74
|
+
)
|
75
|
+
|
76
|
+
if retries == UNSET:
|
77
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
78
|
+
retries = self.sdk_configuration.retry_config
|
79
|
+
|
80
|
+
retry_config = None
|
81
|
+
if isinstance(retries, utils.RetryConfig):
|
82
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
83
|
+
|
84
|
+
http_res = self.do_request(
|
85
|
+
hook_ctx=HookContext(
|
86
|
+
config=self.sdk_configuration,
|
87
|
+
base_url=base_url or "",
|
88
|
+
operation_id="getAllPortals",
|
89
|
+
oauth2_scopes=[],
|
90
|
+
security_source=get_security_from_env(
|
91
|
+
self.sdk_configuration.security, models.Security
|
92
|
+
),
|
93
|
+
),
|
94
|
+
request=req,
|
95
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
96
|
+
retry_config=retry_config,
|
97
|
+
)
|
98
|
+
|
99
|
+
response_data: Any = None
|
100
|
+
if utils.match_response(http_res, "200", "application/json"):
|
101
|
+
return unmarshal_json_response(models.PortalResult, http_res)
|
102
|
+
if utils.match_response(http_res, "204", "*"):
|
103
|
+
return None
|
104
|
+
if utils.match_response(
|
105
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
106
|
+
):
|
107
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
108
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
109
|
+
if utils.match_response(http_res, "500", "application/json"):
|
110
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
111
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
112
|
+
if utils.match_response(http_res, "4XX", "*"):
|
113
|
+
http_res_text = utils.stream_to_text(http_res)
|
114
|
+
raise errors.EgainDefaultError(
|
115
|
+
"API error occurred", http_res, http_res_text
|
116
|
+
)
|
117
|
+
if utils.match_response(http_res, "5XX", "*"):
|
118
|
+
http_res_text = utils.stream_to_text(http_res)
|
119
|
+
raise errors.EgainDefaultError(
|
120
|
+
"API error occurred", http_res, http_res_text
|
121
|
+
)
|
122
|
+
|
123
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
124
|
+
|
125
|
+
async def get_all_portals_async(
|
126
|
+
self,
|
127
|
+
*,
|
128
|
+
accept_language: models.AcceptLanguage,
|
129
|
+
department_id: Optional[str] = None,
|
130
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
131
|
+
pagenum: Optional[int] = 1,
|
132
|
+
pagesize: Optional[int] = 10,
|
133
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
134
|
+
server_url: Optional[str] = None,
|
135
|
+
timeout_ms: Optional[int] = None,
|
136
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
137
|
+
) -> Optional[models.PortalResult]:
|
138
|
+
r"""Get All Portals
|
139
|
+
|
140
|
+
## Overview
|
141
|
+
The Get All Portals API returns all portals in a partition or department.
|
142
|
+
|
143
|
+
|
144
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
145
|
+
:param department_id: The ID of the department.
|
146
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
147
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
148
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
149
|
+
:param retries: Override the default retry configuration for this method
|
150
|
+
:param server_url: Override the default server URL for this method
|
151
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
152
|
+
:param http_headers: Additional headers to set or replace on requests.
|
153
|
+
"""
|
154
|
+
base_url = None
|
155
|
+
url_variables = None
|
156
|
+
if timeout_ms is None:
|
157
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
158
|
+
|
159
|
+
if server_url is not None:
|
160
|
+
base_url = server_url
|
161
|
+
else:
|
162
|
+
base_url = self._get_url(base_url, url_variables)
|
163
|
+
|
164
|
+
request = models.GetAllPortalsRequest(
|
165
|
+
accept_language=accept_language,
|
166
|
+
department_id=department_id,
|
167
|
+
language=language,
|
168
|
+
pagenum=pagenum,
|
169
|
+
pagesize=pagesize,
|
170
|
+
)
|
171
|
+
|
172
|
+
req = self._build_request_async(
|
173
|
+
method="GET",
|
174
|
+
path="/portals",
|
175
|
+
base_url=base_url,
|
176
|
+
url_variables=url_variables,
|
177
|
+
request=request,
|
178
|
+
request_body_required=False,
|
179
|
+
request_has_path_params=False,
|
180
|
+
request_has_query_params=True,
|
181
|
+
user_agent_header="user-agent",
|
182
|
+
accept_header_value="application/json",
|
183
|
+
http_headers=http_headers,
|
184
|
+
security=self.sdk_configuration.security,
|
185
|
+
timeout_ms=timeout_ms,
|
186
|
+
)
|
187
|
+
|
188
|
+
if retries == UNSET:
|
189
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
190
|
+
retries = self.sdk_configuration.retry_config
|
191
|
+
|
192
|
+
retry_config = None
|
193
|
+
if isinstance(retries, utils.RetryConfig):
|
194
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
195
|
+
|
196
|
+
http_res = await self.do_request_async(
|
197
|
+
hook_ctx=HookContext(
|
198
|
+
config=self.sdk_configuration,
|
199
|
+
base_url=base_url or "",
|
200
|
+
operation_id="getAllPortals",
|
201
|
+
oauth2_scopes=[],
|
202
|
+
security_source=get_security_from_env(
|
203
|
+
self.sdk_configuration.security, models.Security
|
204
|
+
),
|
205
|
+
),
|
206
|
+
request=req,
|
207
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
208
|
+
retry_config=retry_config,
|
209
|
+
)
|
210
|
+
|
211
|
+
response_data: Any = None
|
212
|
+
if utils.match_response(http_res, "200", "application/json"):
|
213
|
+
return unmarshal_json_response(models.PortalResult, http_res)
|
214
|
+
if utils.match_response(http_res, "204", "*"):
|
215
|
+
return None
|
216
|
+
if utils.match_response(
|
217
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
218
|
+
):
|
219
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
220
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
221
|
+
if utils.match_response(http_res, "500", "application/json"):
|
222
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
223
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
224
|
+
if utils.match_response(http_res, "4XX", "*"):
|
225
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
226
|
+
raise errors.EgainDefaultError(
|
227
|
+
"API error occurred", http_res, http_res_text
|
228
|
+
)
|
229
|
+
if utils.match_response(http_res, "5XX", "*"):
|
230
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
231
|
+
raise errors.EgainDefaultError(
|
232
|
+
"API error occurred", http_res, http_res_text
|
233
|
+
)
|
234
|
+
|
235
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
236
|
+
|
237
|
+
def get_my_portals(
|
238
|
+
self,
|
239
|
+
*,
|
240
|
+
accept_language: models.AcceptLanguage,
|
241
|
+
language: models.MandatoryLanguageQueryParameter,
|
242
|
+
department: Optional[str] = None,
|
243
|
+
filter_text: Optional[str] = None,
|
244
|
+
short_url_template: Optional[str] = None,
|
245
|
+
sort: Optional[models.SortIDNameDepartment] = None,
|
246
|
+
order: Optional[models.Order] = None,
|
247
|
+
pagenum: Optional[int] = 1,
|
248
|
+
pagesize: Optional[int] = 25,
|
249
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
250
|
+
server_url: Optional[str] = None,
|
251
|
+
timeout_ms: Optional[int] = None,
|
252
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
253
|
+
) -> Optional[models.AllAccessiblePortals]:
|
254
|
+
r"""Get All Portals Accessible To User
|
255
|
+
|
256
|
+
## Overview
|
257
|
+
The Get All Portals Accessible to User API allows a user to fetch all portals accessible to user across all department.
|
258
|
+
* If no access tags are specified for a portal, then any user can access the portal.
|
259
|
+
* If access tags are specified for a portal, users with a user profile that allows access have access to the portal. For users with multiple user profiles, the user profile that allows access does not need to be the active user profile.
|
260
|
+
* All the global users(partition) cannot be assigned user profiles; their access is limited to portals without access restrictions.
|
261
|
+
* The only articles returned are associated to an Article type when the parameter, “Include in browse on portals” is set to \"Yes\".
|
262
|
+
* When the \"shortUrlTemplate\" query parameter is provided, the API filters accessible portals according to the specified language and template name. Portal Short URL specific to to the \"shortUrlTemplate\" query parameter value is returned in the response.
|
263
|
+
* When there is no short URL available for a specific language, the API returns a portal object with an empty \"shortURL\" field.
|
264
|
+
|
265
|
+
|
266
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
267
|
+
:param language: The language used for fetching the details of a resource. Resources available in different languages may differ from each other.
|
268
|
+
:param department: The Name of the department for which portals are to be fetched
|
269
|
+
:param filter_text: Portal name starting with a specific character are considered to filter the result.
|
270
|
+
:param short_url_template: The Name of the template used while creating Short URL.
|
271
|
+
:param sort: Objects returned in server response are sorted based on the attribute supplied under $sort. <br>_Default value_: name.
|
272
|
+
:param order: Common query parameter $order.
|
273
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
274
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.<br>Valid range of 5-75<br>_Default value_: 25
|
275
|
+
:param retries: Override the default retry configuration for this method
|
276
|
+
:param server_url: Override the default server URL for this method
|
277
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
278
|
+
:param http_headers: Additional headers to set or replace on requests.
|
279
|
+
"""
|
280
|
+
base_url = None
|
281
|
+
url_variables = None
|
282
|
+
if timeout_ms is None:
|
283
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
284
|
+
|
285
|
+
if server_url is not None:
|
286
|
+
base_url = server_url
|
287
|
+
else:
|
288
|
+
base_url = self._get_url(base_url, url_variables)
|
289
|
+
|
290
|
+
request = models.GetMyPortalsRequest(
|
291
|
+
accept_language=accept_language,
|
292
|
+
language=language,
|
293
|
+
department=department,
|
294
|
+
filter_text=filter_text,
|
295
|
+
short_url_template=short_url_template,
|
296
|
+
sort=sort,
|
297
|
+
order=order,
|
298
|
+
pagenum=pagenum,
|
299
|
+
pagesize=pagesize,
|
300
|
+
)
|
301
|
+
|
302
|
+
req = self._build_request(
|
303
|
+
method="GET",
|
304
|
+
path="/myportals",
|
305
|
+
base_url=base_url,
|
306
|
+
url_variables=url_variables,
|
307
|
+
request=request,
|
308
|
+
request_body_required=False,
|
309
|
+
request_has_path_params=False,
|
310
|
+
request_has_query_params=True,
|
311
|
+
user_agent_header="user-agent",
|
312
|
+
accept_header_value="application/json",
|
313
|
+
http_headers=http_headers,
|
314
|
+
security=self.sdk_configuration.security,
|
315
|
+
timeout_ms=timeout_ms,
|
316
|
+
)
|
317
|
+
|
318
|
+
if retries == UNSET:
|
319
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
320
|
+
retries = self.sdk_configuration.retry_config
|
321
|
+
|
322
|
+
retry_config = None
|
323
|
+
if isinstance(retries, utils.RetryConfig):
|
324
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
325
|
+
|
326
|
+
http_res = self.do_request(
|
327
|
+
hook_ctx=HookContext(
|
328
|
+
config=self.sdk_configuration,
|
329
|
+
base_url=base_url or "",
|
330
|
+
operation_id="getMyPortals",
|
331
|
+
oauth2_scopes=[],
|
332
|
+
security_source=get_security_from_env(
|
333
|
+
self.sdk_configuration.security, models.Security
|
334
|
+
),
|
335
|
+
),
|
336
|
+
request=req,
|
337
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
338
|
+
retry_config=retry_config,
|
339
|
+
)
|
340
|
+
|
341
|
+
response_data: Any = None
|
342
|
+
if utils.match_response(http_res, "200", "application/json"):
|
343
|
+
return unmarshal_json_response(models.AllAccessiblePortals, http_res)
|
344
|
+
if utils.match_response(http_res, "204", "*"):
|
345
|
+
return None
|
346
|
+
if utils.match_response(
|
347
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
348
|
+
):
|
349
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
350
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
351
|
+
if utils.match_response(http_res, "500", "application/json"):
|
352
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
353
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
354
|
+
if utils.match_response(http_res, "4XX", "*"):
|
355
|
+
http_res_text = utils.stream_to_text(http_res)
|
356
|
+
raise errors.EgainDefaultError(
|
357
|
+
"API error occurred", http_res, http_res_text
|
358
|
+
)
|
359
|
+
if utils.match_response(http_res, "5XX", "*"):
|
360
|
+
http_res_text = utils.stream_to_text(http_res)
|
361
|
+
raise errors.EgainDefaultError(
|
362
|
+
"API error occurred", http_res, http_res_text
|
363
|
+
)
|
364
|
+
|
365
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
366
|
+
|
367
|
+
async def get_my_portals_async(
|
368
|
+
self,
|
369
|
+
*,
|
370
|
+
accept_language: models.AcceptLanguage,
|
371
|
+
language: models.MandatoryLanguageQueryParameter,
|
372
|
+
department: Optional[str] = None,
|
373
|
+
filter_text: Optional[str] = None,
|
374
|
+
short_url_template: Optional[str] = None,
|
375
|
+
sort: Optional[models.SortIDNameDepartment] = None,
|
376
|
+
order: Optional[models.Order] = None,
|
377
|
+
pagenum: Optional[int] = 1,
|
378
|
+
pagesize: Optional[int] = 25,
|
379
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
380
|
+
server_url: Optional[str] = None,
|
381
|
+
timeout_ms: Optional[int] = None,
|
382
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
383
|
+
) -> Optional[models.AllAccessiblePortals]:
|
384
|
+
r"""Get All Portals Accessible To User
|
385
|
+
|
386
|
+
## Overview
|
387
|
+
The Get All Portals Accessible to User API allows a user to fetch all portals accessible to user across all department.
|
388
|
+
* If no access tags are specified for a portal, then any user can access the portal.
|
389
|
+
* If access tags are specified for a portal, users with a user profile that allows access have access to the portal. For users with multiple user profiles, the user profile that allows access does not need to be the active user profile.
|
390
|
+
* All the global users(partition) cannot be assigned user profiles; their access is limited to portals without access restrictions.
|
391
|
+
* The only articles returned are associated to an Article type when the parameter, “Include in browse on portals” is set to \"Yes\".
|
392
|
+
* When the \"shortUrlTemplate\" query parameter is provided, the API filters accessible portals according to the specified language and template name. Portal Short URL specific to to the \"shortUrlTemplate\" query parameter value is returned in the response.
|
393
|
+
* When there is no short URL available for a specific language, the API returns a portal object with an empty \"shortURL\" field.
|
394
|
+
|
395
|
+
|
396
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
397
|
+
:param language: The language used for fetching the details of a resource. Resources available in different languages may differ from each other.
|
398
|
+
:param department: The Name of the department for which portals are to be fetched
|
399
|
+
:param filter_text: Portal name starting with a specific character are considered to filter the result.
|
400
|
+
:param short_url_template: The Name of the template used while creating Short URL.
|
401
|
+
:param sort: Objects returned in server response are sorted based on the attribute supplied under $sort. <br>_Default value_: name.
|
402
|
+
:param order: Common query parameter $order.
|
403
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
404
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.<br>Valid range of 5-75<br>_Default value_: 25
|
405
|
+
:param retries: Override the default retry configuration for this method
|
406
|
+
:param server_url: Override the default server URL for this method
|
407
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
408
|
+
:param http_headers: Additional headers to set or replace on requests.
|
409
|
+
"""
|
410
|
+
base_url = None
|
411
|
+
url_variables = None
|
412
|
+
if timeout_ms is None:
|
413
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
414
|
+
|
415
|
+
if server_url is not None:
|
416
|
+
base_url = server_url
|
417
|
+
else:
|
418
|
+
base_url = self._get_url(base_url, url_variables)
|
419
|
+
|
420
|
+
request = models.GetMyPortalsRequest(
|
421
|
+
accept_language=accept_language,
|
422
|
+
language=language,
|
423
|
+
department=department,
|
424
|
+
filter_text=filter_text,
|
425
|
+
short_url_template=short_url_template,
|
426
|
+
sort=sort,
|
427
|
+
order=order,
|
428
|
+
pagenum=pagenum,
|
429
|
+
pagesize=pagesize,
|
430
|
+
)
|
431
|
+
|
432
|
+
req = self._build_request_async(
|
433
|
+
method="GET",
|
434
|
+
path="/myportals",
|
435
|
+
base_url=base_url,
|
436
|
+
url_variables=url_variables,
|
437
|
+
request=request,
|
438
|
+
request_body_required=False,
|
439
|
+
request_has_path_params=False,
|
440
|
+
request_has_query_params=True,
|
441
|
+
user_agent_header="user-agent",
|
442
|
+
accept_header_value="application/json",
|
443
|
+
http_headers=http_headers,
|
444
|
+
security=self.sdk_configuration.security,
|
445
|
+
timeout_ms=timeout_ms,
|
446
|
+
)
|
447
|
+
|
448
|
+
if retries == UNSET:
|
449
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
450
|
+
retries = self.sdk_configuration.retry_config
|
451
|
+
|
452
|
+
retry_config = None
|
453
|
+
if isinstance(retries, utils.RetryConfig):
|
454
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
455
|
+
|
456
|
+
http_res = await self.do_request_async(
|
457
|
+
hook_ctx=HookContext(
|
458
|
+
config=self.sdk_configuration,
|
459
|
+
base_url=base_url or "",
|
460
|
+
operation_id="getMyPortals",
|
461
|
+
oauth2_scopes=[],
|
462
|
+
security_source=get_security_from_env(
|
463
|
+
self.sdk_configuration.security, models.Security
|
464
|
+
),
|
465
|
+
),
|
466
|
+
request=req,
|
467
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
468
|
+
retry_config=retry_config,
|
469
|
+
)
|
470
|
+
|
471
|
+
response_data: Any = None
|
472
|
+
if utils.match_response(http_res, "200", "application/json"):
|
473
|
+
return unmarshal_json_response(models.AllAccessiblePortals, http_res)
|
474
|
+
if utils.match_response(http_res, "204", "*"):
|
475
|
+
return None
|
476
|
+
if utils.match_response(
|
477
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
478
|
+
):
|
479
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
480
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
481
|
+
if utils.match_response(http_res, "500", "application/json"):
|
482
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
483
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
484
|
+
if utils.match_response(http_res, "4XX", "*"):
|
485
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
486
|
+
raise errors.EgainDefaultError(
|
487
|
+
"API error occurred", http_res, http_res_text
|
488
|
+
)
|
489
|
+
if utils.match_response(http_res, "5XX", "*"):
|
490
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
491
|
+
raise errors.EgainDefaultError(
|
492
|
+
"API error occurred", http_res, http_res_text
|
493
|
+
)
|
494
|
+
|
495
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
496
|
+
|
497
|
+
def get_portal_details_by_id(
|
498
|
+
self,
|
499
|
+
*,
|
500
|
+
accept_language: models.AcceptLanguage,
|
501
|
+
portal_id: str,
|
502
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
503
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
504
|
+
server_url: Optional[str] = None,
|
505
|
+
timeout_ms: Optional[int] = None,
|
506
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
507
|
+
) -> Optional[models.Portal]:
|
508
|
+
r"""Get Portal Details By ID
|
509
|
+
|
510
|
+
## Overview
|
511
|
+
The Get Portal Details By ID API allows a user to fetch details of a portal by the ID.
|
512
|
+
|
513
|
+
|
514
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
515
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
516
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
517
|
+
:param retries: Override the default retry configuration for this method
|
518
|
+
:param server_url: Override the default server URL for this method
|
519
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
520
|
+
:param http_headers: Additional headers to set or replace on requests.
|
521
|
+
"""
|
522
|
+
base_url = None
|
523
|
+
url_variables = None
|
524
|
+
if timeout_ms is None:
|
525
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
526
|
+
|
527
|
+
if server_url is not None:
|
528
|
+
base_url = server_url
|
529
|
+
else:
|
530
|
+
base_url = self._get_url(base_url, url_variables)
|
531
|
+
|
532
|
+
request = models.GetPortalDetailsByIDRequest(
|
533
|
+
accept_language=accept_language,
|
534
|
+
portal_id=portal_id,
|
535
|
+
language=language,
|
536
|
+
)
|
537
|
+
|
538
|
+
req = self._build_request(
|
539
|
+
method="GET",
|
540
|
+
path="/portals/{portalID}",
|
541
|
+
base_url=base_url,
|
542
|
+
url_variables=url_variables,
|
543
|
+
request=request,
|
544
|
+
request_body_required=False,
|
545
|
+
request_has_path_params=True,
|
546
|
+
request_has_query_params=True,
|
547
|
+
user_agent_header="user-agent",
|
548
|
+
accept_header_value="application/json",
|
549
|
+
http_headers=http_headers,
|
550
|
+
security=self.sdk_configuration.security,
|
551
|
+
timeout_ms=timeout_ms,
|
552
|
+
)
|
553
|
+
|
554
|
+
if retries == UNSET:
|
555
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
556
|
+
retries = self.sdk_configuration.retry_config
|
557
|
+
|
558
|
+
retry_config = None
|
559
|
+
if isinstance(retries, utils.RetryConfig):
|
560
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
561
|
+
|
562
|
+
http_res = self.do_request(
|
563
|
+
hook_ctx=HookContext(
|
564
|
+
config=self.sdk_configuration,
|
565
|
+
base_url=base_url or "",
|
566
|
+
operation_id="getPortalDetailsById",
|
567
|
+
oauth2_scopes=[],
|
568
|
+
security_source=get_security_from_env(
|
569
|
+
self.sdk_configuration.security, models.Security
|
570
|
+
),
|
571
|
+
),
|
572
|
+
request=req,
|
573
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
574
|
+
retry_config=retry_config,
|
575
|
+
)
|
576
|
+
|
577
|
+
response_data: Any = None
|
578
|
+
if utils.match_response(http_res, "200", "application/json"):
|
579
|
+
return unmarshal_json_response(models.Portal, http_res)
|
580
|
+
if utils.match_response(http_res, "204", "*"):
|
581
|
+
return None
|
582
|
+
if utils.match_response(
|
583
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
584
|
+
):
|
585
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
586
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
587
|
+
if utils.match_response(http_res, "500", "application/json"):
|
588
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
589
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
590
|
+
if utils.match_response(http_res, "4XX", "*"):
|
591
|
+
http_res_text = utils.stream_to_text(http_res)
|
592
|
+
raise errors.EgainDefaultError(
|
593
|
+
"API error occurred", http_res, http_res_text
|
594
|
+
)
|
595
|
+
if utils.match_response(http_res, "5XX", "*"):
|
596
|
+
http_res_text = utils.stream_to_text(http_res)
|
597
|
+
raise errors.EgainDefaultError(
|
598
|
+
"API error occurred", http_res, http_res_text
|
599
|
+
)
|
600
|
+
|
601
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
602
|
+
|
603
|
+
async def get_portal_details_by_id_async(
|
604
|
+
self,
|
605
|
+
*,
|
606
|
+
accept_language: models.AcceptLanguage,
|
607
|
+
portal_id: str,
|
608
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
609
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
610
|
+
server_url: Optional[str] = None,
|
611
|
+
timeout_ms: Optional[int] = None,
|
612
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
613
|
+
) -> Optional[models.Portal]:
|
614
|
+
r"""Get Portal Details By ID
|
615
|
+
|
616
|
+
## Overview
|
617
|
+
The Get Portal Details By ID API allows a user to fetch details of a portal by the ID.
|
618
|
+
|
619
|
+
|
620
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
621
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
622
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
623
|
+
:param retries: Override the default retry configuration for this method
|
624
|
+
:param server_url: Override the default server URL for this method
|
625
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
626
|
+
:param http_headers: Additional headers to set or replace on requests.
|
627
|
+
"""
|
628
|
+
base_url = None
|
629
|
+
url_variables = None
|
630
|
+
if timeout_ms is None:
|
631
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
632
|
+
|
633
|
+
if server_url is not None:
|
634
|
+
base_url = server_url
|
635
|
+
else:
|
636
|
+
base_url = self._get_url(base_url, url_variables)
|
637
|
+
|
638
|
+
request = models.GetPortalDetailsByIDRequest(
|
639
|
+
accept_language=accept_language,
|
640
|
+
portal_id=portal_id,
|
641
|
+
language=language,
|
642
|
+
)
|
643
|
+
|
644
|
+
req = self._build_request_async(
|
645
|
+
method="GET",
|
646
|
+
path="/portals/{portalID}",
|
647
|
+
base_url=base_url,
|
648
|
+
url_variables=url_variables,
|
649
|
+
request=request,
|
650
|
+
request_body_required=False,
|
651
|
+
request_has_path_params=True,
|
652
|
+
request_has_query_params=True,
|
653
|
+
user_agent_header="user-agent",
|
654
|
+
accept_header_value="application/json",
|
655
|
+
http_headers=http_headers,
|
656
|
+
security=self.sdk_configuration.security,
|
657
|
+
timeout_ms=timeout_ms,
|
658
|
+
)
|
659
|
+
|
660
|
+
if retries == UNSET:
|
661
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
662
|
+
retries = self.sdk_configuration.retry_config
|
663
|
+
|
664
|
+
retry_config = None
|
665
|
+
if isinstance(retries, utils.RetryConfig):
|
666
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
667
|
+
|
668
|
+
http_res = await self.do_request_async(
|
669
|
+
hook_ctx=HookContext(
|
670
|
+
config=self.sdk_configuration,
|
671
|
+
base_url=base_url or "",
|
672
|
+
operation_id="getPortalDetailsById",
|
673
|
+
oauth2_scopes=[],
|
674
|
+
security_source=get_security_from_env(
|
675
|
+
self.sdk_configuration.security, models.Security
|
676
|
+
),
|
677
|
+
),
|
678
|
+
request=req,
|
679
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
680
|
+
retry_config=retry_config,
|
681
|
+
)
|
682
|
+
|
683
|
+
response_data: Any = None
|
684
|
+
if utils.match_response(http_res, "200", "application/json"):
|
685
|
+
return unmarshal_json_response(models.Portal, http_res)
|
686
|
+
if utils.match_response(http_res, "204", "*"):
|
687
|
+
return None
|
688
|
+
if utils.match_response(
|
689
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
690
|
+
):
|
691
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
692
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
693
|
+
if utils.match_response(http_res, "500", "application/json"):
|
694
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
695
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
696
|
+
if utils.match_response(http_res, "4XX", "*"):
|
697
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
698
|
+
raise errors.EgainDefaultError(
|
699
|
+
"API error occurred", http_res, http_res_text
|
700
|
+
)
|
701
|
+
if utils.match_response(http_res, "5XX", "*"):
|
702
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
703
|
+
raise errors.EgainDefaultError(
|
704
|
+
"API error occurred", http_res, http_res_text
|
705
|
+
)
|
706
|
+
|
707
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
708
|
+
|
709
|
+
def get_tag_categories_for_interest_for_portal(
|
710
|
+
self,
|
711
|
+
*,
|
712
|
+
accept_language: models.AcceptLanguage,
|
713
|
+
portal_id: str,
|
714
|
+
language: models.MandatoryLanguageQueryParameter,
|
715
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
716
|
+
server_url: Optional[str] = None,
|
717
|
+
timeout_ms: Optional[int] = None,
|
718
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
719
|
+
) -> Optional[models.TagCategoriesForInterest]:
|
720
|
+
r"""Get Tag Categories for Interest for a Portal
|
721
|
+
|
722
|
+
## Overview
|
723
|
+
The Get Tag Categories for Interest for a Portal API retrieves the Tag Categories for Interest configured for a portal.
|
724
|
+
* Tag Categories are ordered in order of their addition in the \"Tag Categories for Interest\" in the Portal configuration.
|
725
|
+
* Tags are ordered as per their order defined in their Tag Category.
|
726
|
+
* Tag Groups are sorted by their name, in ascending order.
|
727
|
+
|
728
|
+
|
729
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
730
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
731
|
+
:param language: The language used for fetching the details of a resource. Resources available in different languages may differ from each other.
|
732
|
+
:param retries: Override the default retry configuration for this method
|
733
|
+
:param server_url: Override the default server URL for this method
|
734
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
735
|
+
:param http_headers: Additional headers to set or replace on requests.
|
736
|
+
"""
|
737
|
+
base_url = None
|
738
|
+
url_variables = None
|
739
|
+
if timeout_ms is None:
|
740
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
741
|
+
|
742
|
+
if server_url is not None:
|
743
|
+
base_url = server_url
|
744
|
+
else:
|
745
|
+
base_url = self._get_url(base_url, url_variables)
|
746
|
+
|
747
|
+
request = models.GetTagCategoriesForInterestForPortalRequest(
|
748
|
+
accept_language=accept_language,
|
749
|
+
portal_id=portal_id,
|
750
|
+
language=language,
|
751
|
+
)
|
752
|
+
|
753
|
+
req = self._build_request(
|
754
|
+
method="GET",
|
755
|
+
path="/portals/{portalID}/tagcategoriesforinterest",
|
756
|
+
base_url=base_url,
|
757
|
+
url_variables=url_variables,
|
758
|
+
request=request,
|
759
|
+
request_body_required=False,
|
760
|
+
request_has_path_params=True,
|
761
|
+
request_has_query_params=True,
|
762
|
+
user_agent_header="user-agent",
|
763
|
+
accept_header_value="application/json",
|
764
|
+
http_headers=http_headers,
|
765
|
+
security=self.sdk_configuration.security,
|
766
|
+
timeout_ms=timeout_ms,
|
767
|
+
)
|
768
|
+
|
769
|
+
if retries == UNSET:
|
770
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
771
|
+
retries = self.sdk_configuration.retry_config
|
772
|
+
|
773
|
+
retry_config = None
|
774
|
+
if isinstance(retries, utils.RetryConfig):
|
775
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
776
|
+
|
777
|
+
http_res = self.do_request(
|
778
|
+
hook_ctx=HookContext(
|
779
|
+
config=self.sdk_configuration,
|
780
|
+
base_url=base_url or "",
|
781
|
+
operation_id="getTagCategoriesForInterestForPortal",
|
782
|
+
oauth2_scopes=[],
|
783
|
+
security_source=get_security_from_env(
|
784
|
+
self.sdk_configuration.security, models.Security
|
785
|
+
),
|
786
|
+
),
|
787
|
+
request=req,
|
788
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
789
|
+
retry_config=retry_config,
|
790
|
+
)
|
791
|
+
|
792
|
+
response_data: Any = None
|
793
|
+
if utils.match_response(http_res, "200", "application/json"):
|
794
|
+
return unmarshal_json_response(models.TagCategoriesForInterest, http_res)
|
795
|
+
if utils.match_response(http_res, "204", "*"):
|
796
|
+
return None
|
797
|
+
if utils.match_response(
|
798
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
799
|
+
):
|
800
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
801
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
802
|
+
if utils.match_response(http_res, "500", "application/json"):
|
803
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
804
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
805
|
+
if utils.match_response(http_res, "4XX", "*"):
|
806
|
+
http_res_text = utils.stream_to_text(http_res)
|
807
|
+
raise errors.EgainDefaultError(
|
808
|
+
"API error occurred", http_res, http_res_text
|
809
|
+
)
|
810
|
+
if utils.match_response(http_res, "5XX", "*"):
|
811
|
+
http_res_text = utils.stream_to_text(http_res)
|
812
|
+
raise errors.EgainDefaultError(
|
813
|
+
"API error occurred", http_res, http_res_text
|
814
|
+
)
|
815
|
+
|
816
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
817
|
+
|
818
|
+
async def get_tag_categories_for_interest_for_portal_async(
|
819
|
+
self,
|
820
|
+
*,
|
821
|
+
accept_language: models.AcceptLanguage,
|
822
|
+
portal_id: str,
|
823
|
+
language: models.MandatoryLanguageQueryParameter,
|
824
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
825
|
+
server_url: Optional[str] = None,
|
826
|
+
timeout_ms: Optional[int] = None,
|
827
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
828
|
+
) -> Optional[models.TagCategoriesForInterest]:
|
829
|
+
r"""Get Tag Categories for Interest for a Portal
|
830
|
+
|
831
|
+
## Overview
|
832
|
+
The Get Tag Categories for Interest for a Portal API retrieves the Tag Categories for Interest configured for a portal.
|
833
|
+
* Tag Categories are ordered in order of their addition in the \"Tag Categories for Interest\" in the Portal configuration.
|
834
|
+
* Tags are ordered as per their order defined in their Tag Category.
|
835
|
+
* Tag Groups are sorted by their name, in ascending order.
|
836
|
+
|
837
|
+
|
838
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
839
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
840
|
+
:param language: The language used for fetching the details of a resource. Resources available in different languages may differ from each other.
|
841
|
+
:param retries: Override the default retry configuration for this method
|
842
|
+
:param server_url: Override the default server URL for this method
|
843
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
844
|
+
:param http_headers: Additional headers to set or replace on requests.
|
845
|
+
"""
|
846
|
+
base_url = None
|
847
|
+
url_variables = None
|
848
|
+
if timeout_ms is None:
|
849
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
850
|
+
|
851
|
+
if server_url is not None:
|
852
|
+
base_url = server_url
|
853
|
+
else:
|
854
|
+
base_url = self._get_url(base_url, url_variables)
|
855
|
+
|
856
|
+
request = models.GetTagCategoriesForInterestForPortalRequest(
|
857
|
+
accept_language=accept_language,
|
858
|
+
portal_id=portal_id,
|
859
|
+
language=language,
|
860
|
+
)
|
861
|
+
|
862
|
+
req = self._build_request_async(
|
863
|
+
method="GET",
|
864
|
+
path="/portals/{portalID}/tagcategoriesforinterest",
|
865
|
+
base_url=base_url,
|
866
|
+
url_variables=url_variables,
|
867
|
+
request=request,
|
868
|
+
request_body_required=False,
|
869
|
+
request_has_path_params=True,
|
870
|
+
request_has_query_params=True,
|
871
|
+
user_agent_header="user-agent",
|
872
|
+
accept_header_value="application/json",
|
873
|
+
http_headers=http_headers,
|
874
|
+
security=self.sdk_configuration.security,
|
875
|
+
timeout_ms=timeout_ms,
|
876
|
+
)
|
877
|
+
|
878
|
+
if retries == UNSET:
|
879
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
880
|
+
retries = self.sdk_configuration.retry_config
|
881
|
+
|
882
|
+
retry_config = None
|
883
|
+
if isinstance(retries, utils.RetryConfig):
|
884
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
885
|
+
|
886
|
+
http_res = await self.do_request_async(
|
887
|
+
hook_ctx=HookContext(
|
888
|
+
config=self.sdk_configuration,
|
889
|
+
base_url=base_url or "",
|
890
|
+
operation_id="getTagCategoriesForInterestForPortal",
|
891
|
+
oauth2_scopes=[],
|
892
|
+
security_source=get_security_from_env(
|
893
|
+
self.sdk_configuration.security, models.Security
|
894
|
+
),
|
895
|
+
),
|
896
|
+
request=req,
|
897
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
898
|
+
retry_config=retry_config,
|
899
|
+
)
|
900
|
+
|
901
|
+
response_data: Any = None
|
902
|
+
if utils.match_response(http_res, "200", "application/json"):
|
903
|
+
return unmarshal_json_response(models.TagCategoriesForInterest, http_res)
|
904
|
+
if utils.match_response(http_res, "204", "*"):
|
905
|
+
return None
|
906
|
+
if utils.match_response(
|
907
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
908
|
+
):
|
909
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
910
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
911
|
+
if utils.match_response(http_res, "500", "application/json"):
|
912
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
913
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
914
|
+
if utils.match_response(http_res, "4XX", "*"):
|
915
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
916
|
+
raise errors.EgainDefaultError(
|
917
|
+
"API error occurred", http_res, http_res_text
|
918
|
+
)
|
919
|
+
if utils.match_response(http_res, "5XX", "*"):
|
920
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
921
|
+
raise errors.EgainDefaultError(
|
922
|
+
"API error occurred", http_res, http_res_text
|
923
|
+
)
|
924
|
+
|
925
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|