-
Notifications
You must be signed in to change notification settings - Fork 8
Group Management
js.sevestre edited this page Dec 18, 2018
·
12 revisions
Group in LumApps are named Feeds
in the api and object definition.
The SDK includes a helper to easily manipulate the groups
Obtain the api object using the authentification method explained in Getting Started or in Authentication and connection
from lumapps_api_sdk import group
api = ... # previously obtained
groups = group.list(api)
for grp in groups:
print(grp)
You can also filter by instance
groups = group.list(api, instance="my_instance")
save a feed by providing %instance_id%, %group_name%, %google_group_email%, %feed_type_id%
from lumapps_api_sdk.group import Group
api = ... # previously obtained
group = Group(
api,
instance="%instance_id%",
name="%group_name%",
group="%google_group_email%",
feed_type="%feed_type_id%",
)
success, errors = group.save()
print(success)