-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
111 lines (103 loc) · 3.27 KB
/
Copy path__init__.py
File metadata and controls
111 lines (103 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
"""The __init__.py file that contains modules that need to import"""
from .organizations.organization import Organization
from .stack.stack import Stack
from .user_session.user_session import UserSession
from .users.user import User
from .aliases.aliases import Alias
from .assets.assets import Assets
from .branches.branches import Branch
from .content_types.content_type import ContentType
from .global_fields.global_fields import GlobalFields
from .webhooks.webhook import Webhook
from .workflows.workflows import Workflows
from .metadata.metadata import Metadata
from .roles.roles import Roles
from .auditlogs.auditlog import Auditlog
from .environments.environment import Environment
from .entries.entry import Entry
from .entry_variants.entry_variants import EntryVariants
from .contentstack import Client, Region
from .endpoint import Endpoint
from ._api_client import _APIClient
from .common import Parameter
from ._errors import ArgumentException
from .locale.locale import Locale
from .taxonomies.taxonomy import Taxonomy
from .labels.label import Label
from .terms.terms import Terms
from .bulk_operations.bulk_operation import BulkOperation
from .releases.release import Releases
from .release_items.release_item import ReleaseItems
from .delivery_token.delivery_token import DeliveryToken
from .management_token.management_token import ManagementToken
from .publish_queue.publish_queue import PublishQueue
from .extensions.extension import Extension
from .variant_group.variant_group import VariantGroup
from .variants.variants import Variants
from .oauth.oauth_handler import OAuthHandler
from .oauth.oauth_interceptor import OAuthInterceptor
from .region_refresh import refresh_regions
__all__ = (
"Client",
"Region",
"Endpoint",
"_APIClient",
"Parameter",
"ArgumentException",
"Organization",
"Stack",
"UserSession",
"User",
"Alias",
"Assets",
"Branch",
"ContentType",
"GlobalFields",
"Webhook",
"Workflows",
"Metadata",
"Roles",
"Auditlog",
"Environment",
"Entry",
"EntryVariants",
"Locale",
"Taxonomy",
"Label",
"Terms",
"BulkOperation",
"Releases",
"ReleaseItems",
"DeliveryToken",
"ManagementToken",
"PublishQueue",
"Extension",
"VariantGroup",
"Variants",
"OAuthHandler",
"OAuthInterceptor",
"refresh_regions",
)
def get_contentstack_endpoint(region='us', service='', omit_https=False):
"""
Resolve a Contentstack service endpoint URL for a given region.
Proxy to :class:`Endpoint.get_contentstack_endpoint` for convenience —
mirrors ``Contentstack::getContentstackEndpoint()`` in the PHP SDK.
:param region: Region ID or alias ('us', 'eu', 'azure-na', 'gcp-eu', ...).
:param service: Service key ('contentDelivery', 'contentManagement', ...).
When empty, returns a dict of all endpoints for the region.
:param omit_https: When True, strips 'https://' from the returned URL(s).
:returns: str when service is provided, dict[str,str] otherwise.
"""
return Endpoint.get_contentstack_endpoint(region, service, omit_https)
__title__ = 'contentstack-management-python'
__author__ = 'dev-ex'
__status__ = 'debug'
__region__ = 'na'
__version__ = '1.10.0'
__host__ = 'api.contentstack.io'
__protocol__ = 'https://'
__api_version__ = 'v3'
__endpoint__ = 'https://api.contentstack.io/v3/'
__email__ = 'mobile@contentstack.com'
__issues__ = 'support@contentstack.com'