38
38
'position' ,
39
39
'id' ]
40
40
41
- STREAM_FIELDS = [ 'completed_at' ,
42
- 'created_at' ,
43
- 'id' ,
44
- 'value' ]
45
-
46
41
FEED_FIELDS = [ 'name' ,
47
42
'key' ,
48
43
'description' ,
71
66
# client it might be prudent to revisit this decision and consider making these
72
67
# full fledged classes that are mutable.
73
68
Data = namedtuple ('Data' , DATA_FIELDS )
74
- Stream = namedtuple ('Stream' , STREAM_FIELDS )
75
69
Feed = namedtuple ('Feed' , FEED_FIELDS )
76
70
Group = namedtuple ('Group' , GROUP_FIELDS )
77
71
78
72
79
73
# Magic incantation to make all parameters to the initializers optional with a
80
74
# default value of None.
81
75
Data .__new__ .__defaults__ = tuple (None for x in DATA_FIELDS )
82
- Stream .__new__ .__defaults__ = tuple (None for x in STREAM_FIELDS )
83
- Feed .__new__ .__defaults__ = tuple (None for x in FEED_FIELDS )
76
+ Feed .__new__ .__defaults__ = tuple (None for x in FEED_FIELDS )
84
77
Group .__new__ .__defaults__ = tuple (None for x in GROUP_FIELDS )
85
78
86
-
87
79
# Define methods to convert from dicts to the data types.
88
80
def _from_dict (cls , data ):
89
81
# Convert dict to call to class initializer (to work with the data types
@@ -108,6 +100,5 @@ def _group_from_dict(cls, data):
108
100
109
101
# Now add the from_dict class methods defined above to the data types.
110
102
Data .from_dict = classmethod (_from_dict )
111
- Stream .from_dict = classmethod (_from_dict )
112
103
Feed .from_dict = classmethod (_feed_from_dict )
113
104
Group .from_dict = classmethod (_group_from_dict )
0 commit comments