Skip to content

Commit

Permalink
Update section on collection variables
Browse files Browse the repository at this point in the history
  • Loading branch information
vdespa committed Oct 21, 2019
1 parent f23a53a commit 0a04bf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions docs/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,23 @@ Remove ALL global variables (rather unusual) ::
Collection variables
--------------------

They can be mostly used for storing some constants that do not change during the execution of the collection.

**When to use:**

- for constants that do not change during the execution
- good alternative to global variables or environment variables
- for URLs / authentication credentials if only one environment exists

**Setting**
**Setting** ::

Collection variables are tied to a specific collection and new variables can be defined or altered only by using the Postman GUI.
pm.collectionVariables.set('myVariable', MY_VALUE);

**Getting**
**Getting** ::

Depending on the closest scope: ::
pm.collectionVariables.get('myVariable');

pm.variables.get('myVariable');
**Removing** ::

**Removing**
pm.collectionVariables.unset('myVariable');

Collection variables can only be removed from the Postman GUI.

Environment variables
---------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u'Version 1.3.3 - September 2019'
release = u'Version 1.4.0 - October 2019'


# -- General configuration ---------------------------------------------------
Expand Down

0 comments on commit 0a04bf5

Please sign in to comment.