8000 document two methods · stomatocode/twilio-python@d0373da · GitHub
[go: up one dir, main page]

Skip to content

Commit d0373da

Browse files
author
Kevin Burke
committed
document two methods
1 parent 9283b7e commit d0373da

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

twilio/rest/resources.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ def transform_params(p):
2727
"""
2828
Transform parameters, throwing away any None values
2929
and convert False and True values to strings
30+
31+
Ex:
32+
{"record": true, "date_created": "2012-01-02"}
33+
34+
becomes:
35+
{"Record": "true", "DateCreated": "2012-01-02"}
3036
"""
3137
p = [(format_name(d), convert_boolean(p[d])) for d in p if p[d] is not None]
3238
return dict(p)
@@ -63,7 +69,10 @@ def convert_boolean(bool):
6369

6470
def convert_case(s):
6571
"""
66-
Given a string in snake case, conver to CamelCase
72+
Given a string in snake case, convert to CamelCase
73+
74+
Ex:
75+
date_created -> DateCreated
6776
"""
6877
return ''.join([a.title() for a in s.split("_") if a])
6978

@@ -1213,7 +1222,7 @@ def create(self, **kwargs):
12131222
"""
12141223
return self.create_instance(transform_params(kwargs))
12151224

1216-
def update(self, sid, **kwargs):
1225+
def update(self, sid, **kwargs):
12171226
"""
12181227
Update an :class:`Application` with the given parameters.
12191228

0 commit comments

Comments
 (0)
0