Skip to content

Commit bdd73e7

Browse files
mshaileshr@gmail.commshaileshr@gmail.com
authored andcommitted
readme updated
1 parent acd92e0 commit bdd73e7

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

contentstack-python-docs-0.1.0.zip

-6.5 MB
Binary file not shown.

contentstack/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def region(self, region=ContentstackRegion.US):
5353
region {ContentstackRegion} -- region refers to the location of the data centers where your organization's
5454
data resides. (default: {ContentstackRegion.US})
5555
56-
For more details: https://www.contentstack.com/docs/guide/contentstack-regions
56+
For more details: https://www.contentstack.com/docs/developers/contentstack-regions
5757
5858
==============================
5959
@@ -143,7 +143,7 @@ def endpoint(self):
143143
"""It returns endpoint url of the API
144144
The base URL for Content Delivery API for the US region is cdn.contentstack.io. and
145145
for the European region it is eu-cdn.contentstack.com
146-
For more details: https://www.contentstack.com/docs/apis/content-delivery-api/#base-url
146+
For more details: https://www.contentstack.com/docs/developers/apis/content-delivery-api/#base-url
147147
148148
Returns:
149149
str -- endpoint url of the API

contentstack/errors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
contentstack.error
88
~~~~~~~~~~~~~~~~~~
99
10-
API Reference: https://www.contentstack.com/docs/apis/content-delivery-api/#error
10+
API Reference: https://www.contentstack.com/docs/developers/apis/content-delivery-api/#errors
1111
1212
"""
1313

@@ -17,7 +17,7 @@ class Error:
1717
"""
1818
This module implements the Error class.
1919
20-
API Reference: https://www.contentstack.com/docs/apis/content-delivery-api/#error
20+
API Reference: https://www.contentstack.com/docs/developers/apis/content-delivery-api/#errors
2121
2222
"""
2323

@@ -27,7 +27,7 @@ def __init__(self):
2727
self.__error_code = str
2828
self.__msg = str
2929

30-
def _config(self, result: dict):
30+
def _config(self, result):
3131

3232
# _instance is the protected member of the asset, So outsiders can not access this file.
3333
if result is not None and len(result) > 0:
@@ -96,7 +96,7 @@ def error(self):
9696
return self.__msg
9797

9898
@property
99-
def error_info(self) -> dict:
99+
def error_info(self):
100100

101101
"""error information
102102

contentstack/http_connection.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88

99
import logging
1010
import requests
11-
from urllib.parse import urlencode
11+
# from urllib.parse import urlencode
12+
try:
13+
from urllib.parse import urlencode
14+
except ImportError:
15+
from urlparse import urlparse
1216
from contentstack import Error
13-
from json import JSONDecodeError
17+
#from json import JSONDecodeError
1418
from requests.exceptions import Timeout, HTTPError
1519

1620

@@ -29,7 +33,7 @@ def __init__(self, url, query, stack_headers):
2933
environment = self.__headers['environment']
3034
self.__query_params['environment'] = environment
3135

32-
def get_result(self, url: str, query: dict, headers: dict):
36+
def get_result(self, url, query, headers):
3337

3438
if None not in (url, query, headers):
3539
if len(url) > 0 and len(self.__headers) > 0:
@@ -140,7 +144,7 @@ def __parse_assets(result, asset_count):
140144
return assets
141145

142146
@staticmethod
143-
def __user_agents() -> dict:
147+
def __user_agents():
144148

145149
import contentstack
146150
import platform

0 commit comments

Comments
 (0)