Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,19 @@ fileignoreconfig:
- filename: tests/mock/extensions/test_extension_mock.py
checksum: 88bf3b97761c880dc360e358018150e198117a2acef812d1f9ff4653708f8b5c
version: ""

fileignoreconfig:
- filename: contentstack_management/environments/environment.py
checksum: f689b0564c0f35929d3a6f086d31baa6ea37c9a7fea3f6dec8988fcfc3a245e3
- filename: tests/api/environments/test_environments_api.py
checksum: 72490f48a6f3346db6a00d80ce78c2dbc55219999270c75dd80d6ab66a8ffb40
- filename: tests/mock/environments/test_environments_mock.py
checksum: b6a2c104b7296034064318c7c9c826bfe81aa84c511fffe8199393a4787f8306
- filename: tests/unit/environments/test_environment_unit.py
checksum: 3a8efa44ba5bfaf4e599d76a0da933cbe883df5a13c3b0edce9d383b50ea4bfe
- filename: contentstack_management/aliases/aliases.py
checksum: 96ebf3aa2256234997d5a50fa78310683b3eb8182f3904d95fa4b155ce0b6f94
- filename: contentstack_management/branches/branches.py
checksum: a02a5821d8dbf0a2e364bbae87ca25d182c6edf56fdceb2e8e7c68874c15f0e4
- filename: contentstack_management/content_types/content_type.py
checksum: 0a00803d139fef0b91ba6f2a38af41bd02e6a8a3390e74f9c8c2b85bf6162d9a
version: ""
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

---

## v0.0.1
## v1.0.0

#### Date: December-23
#### Date: October-23

### Initial Release

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ pip install contentstack_management
```
To import the SDK, use the following command:
```python
from contentstack_management import contentstack
import contentstack_management

client = contentstack.ContentstackClient()
client = contentstack_management.Client(authtoken='your_authtoken')
```

### Authentication
Expand All @@ -32,7 +32,7 @@ To use this SDK, you need to authenticate your users by using the Authtoken, cre

An **Authtoken** is a read-write token used to make authorized CMA requests, and it is a **user-specific** token.
```python
client = contentstack.ContentstackClient(authtoken= 'authtoken')
client = contentstack_management.Client(authtoken= 'your_authtoken')
```
### Login
To Login to Contentstack by using credentials, you can use the following lines of code:
Expand All @@ -54,9 +54,9 @@ print(result)
To use the Python CMA SDK, you need to first initialize it. To do this, use the following code:

```python
from contentstack_management import contentstack
import contentstack_management

client = contentstack.ContentstackClient(authtoken= 'authtoken')
client = contentstack_management.Client(authtoken= 'your_authtoken')
```
#### Fetch Stack Detail
Use the following lines of code to fetch your stack detail using this SDK:
Expand Down
6 changes: 3 additions & 3 deletions contentstack_management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .auditlogs.auditlog import Auditlog
from .environments.environment import Environment
from .entries.entry import Entry
from .contentstack import ContentstackClient, Region
from .contentstack import Client, Region
from ._api_client import _APIClient
from .common import Parameter
from ._errors import ArgumentException
Expand All @@ -34,7 +34,7 @@


__all__ = (
"ContentstackClient",
"Client",
"Region",
"_APIClient",
"Parameter",
Expand Down Expand Up @@ -72,7 +72,7 @@
__author__ = 'ishaileshmishra'
__status__ = 'debug'
__region__ = 'na'
__version__ = '0.0.1'
__version__ = '1.0.0'
__host__ = 'api.contentstack.io'
__protocol__ = 'https://'
__api_version__ = 'v3'
Expand Down
2 changes: 1 addition & 1 deletion contentstack_management/aliases/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from contentstack_management import contentstack
import contentstack_management
14 changes: 7 additions & 7 deletions contentstack_management/aliases/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def find(self):
:return: Returns all the aliases
--------------------------------
[Example:]
>>> from contentstack_management import contentstack
>>> alias = contentstack.ContentstackClient().stack(api_key='api_key').alias()
>>> import contentstack_management
>>> alias = contentstack_management.Client(authtoken='your_authtoken').stack(api_key='api_key').alias()
>>> response = alias.find()
--------------------------------
"""
Expand All @@ -41,8 +41,8 @@ def fetch(self):
--------------------------------

[Example:]
>>> from contentstack_management import contentstack
>>> alias = contentstack.ContentstackClient().stack(api_key='api_key').alias('alias_uid')
>>> import contentstack_management
>>> alias = contentstack_management.Client(authtoken='your_authtoken').stack(api_key='api_key').alias('alias_uid')
>>> response = alias.fetch()
--------------------------------
"""
Expand All @@ -67,7 +67,7 @@ def assign(self, data):
>>> "target_branch": "test"
>>> }
>>> }
>>> alias = contentstack.ContentstackClient().stack(api_key='api_key').alias("alias_uid")
>>> alias = contentstack_management.Client(authtoken='your_authtoken').stack(api_key='api_key').alias("alias_uid")
>>> response = alias.assign(data)
--------------------------------
"""
Expand All @@ -82,8 +82,8 @@ def delete(self):
:return: Returns status code and message
--------------------------------
[Example:]
>>> from contentstack_management import contentstack
>>> alias = contentstack.ContentstackClient().stack(api_key='api_key').alias(alias_uid="alias_uid")
>>> import contentstack_management
>>> alias = contentstack_management.Client(authtoken='your_authtoken').stack(api_key='api_key').alias(alias_uid="alias_uid")
>>> response = alias.delete()
--------------------------------
"""
Expand Down
2 changes: 1 addition & 1 deletion contentstack_management/assets/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from contentstack_management import contentstack
import contentstack_management
Loading