Skip to content

Commit 1de3806

Browse files
cloudant-sdks-automationmojito317
authored andcommitted
PR feedback(generated): use enum values instead of plain strings
Generated SDK source code using: - Generator version 3.107.1 - Specification version 1.0.0-dev0.1.29 - Automation (cloudant-sdks) version 52aab7c
1 parent 6305048 commit 1de3806

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

examples/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,15 @@ _POST `/_api/v2/user/activity_tracker/events`_
125125
[embedmd]:# (snippets/postActivityTrackerEvents/example_request.py)
126126
```py
127127
# section: code
128-
from ibmcloudant.cloudant_v1 import CloudantV1
128+
from ibmcloudant.cloudant_v1 import CloudantV1, ActivityTrackerEvents
129129

130130
service = CloudantV1.new_instance()
131131

132132
response = service.post_activity_tracker_events(
133-
types=['management']
133+
types=[
134+
ActivityTrackerEvents.TypesEnum.MANAGEMENT,
135+
ActivityTrackerEvents.TypesEnum.DATA
136+
]
134137
).get_result()
135138

136139
print(response)
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# section: code
2-
from ibmcloudant.cloudant_v1 import CloudantV1
2+
from ibmcloudant.cloudant_v1 import CloudantV1, ActivityTrackerEvents
33

44
service = CloudantV1.new_instance()
55

66
response = service.post_activity_tracker_events(
7-
types=['management']
7+
types=[
8+
ActivityTrackerEvents.TypesEnum.MANAGEMENT,
9+
ActivityTrackerEvents.TypesEnum.DATA
10+
]
811
).get_result()
912

1013
print(response)

0 commit comments

Comments
 (0)