Skip to content

Commit b3fac01

Browse files
Merge pull request #91 from pubnub/develop
Version 4.5.0
2 parents ebc5e5c + c07d394 commit b3fac01

File tree

8 files changed

+54
-3
lines changed

8 files changed

+54
-3
lines changed

.pubnub.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: python
2-
version: 4.4.0
2+
version: 4.5.0
33
schema: 1
44
scm: github.com/pubnub/python
55
changelog:
6+
- version: v4.5.0
7+
date: Feb 27, 2020
8+
changes:
9+
- type: feature
10+
text: Implemented Objects Filtering API
611
- version: v4.4.0
712
date: Feb 20, 2020
813
changes:
@@ -193,6 +198,7 @@ features:
193198
- PUSH-REMOVE-DEVICE
194199
- PUSH-TYPE-APNS
195200
- PUSH-TYPE-APNS2
201+
- PUSH-TYPE-GCM
196202
- PUSH-TYPE-FCM
197203
- PUSH-TYPE-MPNS
198204
presence:
@@ -257,6 +263,7 @@ features:
257263
- OBJECTS-ADD-MEMBERS
258264
- OBJECTS-UPDATE-MEMBERS
259265
- OBJECTS-REMOVE-MEMBERS
266+
- OBJECTS-FILTERING
260267
message-actions:
261268
- MESSAGE-ACTIONS-GET
262269
- MESSAGE-ACTIONS-ADD

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [4.5.0](https://github.com/pubnub/python/tree/v4.5.0)
2+
3+
[Full Changelog](https://github.com/pubnub/python/compare/v4.4.0...v4.5.0)
4+
5+
- 🌟 Implemented Objects Filtering API
6+
17
## [4.4.0](https://github.com/pubnub/python/tree/v4.4.0)
28

39
[Full Changelog](https://github.com/pubnub/python/compare/v4.3.0...v4.4.0)

pubnub/endpoints/membership/get_members.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, pubnub):
2020
self._count = False
2121
self._include = None
2222
self._space_id = None
23+
self._filter = None
2324

2425
def space_id(self, space_id):
2526
assert isinstance(space_id, six.string_types)
@@ -49,6 +50,11 @@ def include(self, data):
4950
self._include = data
5051
return self
5152

53+
def filter(self, _filter):
54+
assert isinstance(_filter, six.string_types)
55+
self._filter = _filter
56+
return self
57+
5258
def custom_params(self):
5359
params = {}
5460

@@ -67,6 +73,9 @@ def custom_params(self):
6773
if self._include:
6874
params['include'] = utils.join_items(self._include)
6975

76+
if self._filter:
77+
params['filter'] = utils.url_encode(self._filter)
78+
7079
return params
7180

7281
def build_path(self):

pubnub/endpoints/membership/get_space_memberships.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, pubnub):
2020
self._count = False
2121
self._include = None
2222
self._user_id = None
23+
self._filter = None
2324

2425
def user_id(self, user_id):
2526
assert isinstance(user_id, six.string_types)
@@ -49,6 +50,11 @@ def include(self, data):
4950
self._include = data
5051
return self
5152

53+
def filter(self, _filter):
54+
assert isinstance(_filter, six.string_types)
55+
self._filter = _filter
56+
return self
57+
5258
def custom_params(self):
5359
params = {}
5460

@@ -67,6 +73,9 @@ def custom_params(self):
6773
if self._include:
6874
params['include'] = utils.join_items(self._include)
6975

76+
if self._filter:
77+
params['filter'] = utils.url_encode(self._filter)
78+
7079
return params
7180

7281
def build_path(self):

pubnub/endpoints/space/get_spaces.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pubnub.managers import TokenManagerProperties
55
from pubnub.models.consumer.space import PNGetSpacesResult
66
from pubnub.enums import HttpMethod, PNOperationType, PNResourceType
7+
from pubnub import utils
78

89

910
class GetSpaces(Endpoint):
@@ -17,6 +18,7 @@ def __init__(self, pubnub):
1718
self._limit = GetSpaces.MAX_LIMIT
1819
self._count = False
1920
self._include = None
21+
self._filter = None
2022

2123
def start(self, start):
2224
assert isinstance(start, six.string_types)
@@ -41,6 +43,11 @@ def include(self, data):
4143
self._include = data
4244
return self
4345

46+
def filter(self, _filter):
47+
assert isinstance(_filter, six.string_types)
48+
self._filter = _filter
49+
return self
50+
4451
def custom_params(self):
4552
params = {}
4653

@@ -59,6 +66,9 @@ def custom_params(self):
5966
if self._include:
6067
params['include'] = self._include
6168

69+
if self._filter:
70+
params['filter'] = utils.url_encode(self._filter)
71+
6272
return params
6373

6474
def build_path(self):

pubnub/endpoints/users/get_users.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pubnub.managers import TokenManagerProperties
55
from pubnub.models.consumer.user import PNGetUsersResult
66
from pubnub.enums import HttpMethod, PNOperationType, PNResourceType
7+
from pubnub import utils
78

89

910
class GetUsers(Endpoint):
@@ -17,6 +18,7 @@ def __init__(self, pubnub):
1718
self._limit = GetUsers.MAX_LIMIT
1819
self._count = False
1920
self._include = None
21+
self._filter = None
2022

2123
def start(self, start):
2224
assert isinstance(start, six.string_types)
@@ -41,6 +43,11 @@ def include(self, data):
4143
self._include = data
4244
return self
4345

46+
def filter(self, _filter):
47+
assert isinstance(_filter, six.string_types)
48+
self._filter = _filter
49+
return self
50+
4451
def custom_params(self):
4552
params = {}
4653

@@ -59,6 +66,9 @@ def custom_params(self):
5966
if self._include:
6067
params['include'] = self._include
6168

69+
if self._filter:
70+
params['filter'] = utils.url_encode(self._filter)
71+
6272
return params
6373

6474
def build_path(self):

pubnub/pubnub_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
class PubNubCore:
5858
"""A base class for PubNub Python API implementations"""
59-
SDK_VERSION = "4.4.0"
59+
SDK_VERSION = "4.5.0"
6060
SDK_NAME = "PubNub-Python"
6161

6262
TIMESTAMP_DIVIDER = 1000

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='pubnub',
5-
version='4.4.0',
5+
version='4.5.0',
66
description='PubNub Real-time push service in the cloud',
77
author='PubNub',
88
author_email='[email protected]',

0 commit comments

Comments
 (0)