Skip to content

Commit 068c76a

Browse files
entry functions added
1 parent 768e54d commit 068c76a

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

.DS_Store

0 Bytes
Binary file not shown.

contentstack/HTTPConnection.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
2-
import requests
3-
from requests.auth import HTTPDigestAuth
2+
#import requests
3+
#from requests.auth import HTTPDigestAuth
44
import json
55
import config
66
import urllib.parse
@@ -41,9 +41,8 @@ def __http_request(self):
4141
encoded_query = urllib.parse.urlencode(self.__query)
4242
self.__local_headers.update({'Content-Type': 'application/json',
4343
'X-User-Agent': __config.SDK_VERSION })
44-
response = requests.post(
45-
__config.get_host(), encoded_query, self.__local_headers)
44+
#response = requests.post(__config.get_host(), encoded_query, self.__local_headers)
4645

47-
print(response.json)
46+
#print(response.json)
4847

4948

contentstack/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@
2727

2828
class Config(object):
2929

30-
3130
def __init__(self):
3231
self.host_url = 'cdn.contentstack.io'
3332
self.api_version = 'v3'
3433
self.environment = None
35-
self.SDK_VERSION = 0.0.1
34+
self.SDK_VERSION = "0.0.1"
3635
self.SDK_NAME = 'contentstack-python'
3736

3837

contentstack/entry_model.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
class EntryModel:
3+
4+
def __init__(self, result):
5+
self.result = result
6+
self.entry_uid = None
7+
self.owner_email_id = None
8+
self.owner_uid = None
9+
self.title = None
10+
self.url = None
11+
self.tags = []
12+
self.owner_map = dict
13+
self._metadata = dict
14+
self.tags = dict
15+
16+
17+
def get_uid(self):
18+
if self.result != None :
19+
if 'uid' in self.result :
20+
self.result['uid'] = 'uid'
21+

0 commit comments

Comments
 (0)