Skip to content

Commit b8f30da

Browse files
committed
Merge branch 'list-type'
Merged moogar0880/PyTrakt#206
2 parents 5440af3 + 27f9375 commit b8f30da

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

tests/mock_data/users.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"name":"Star Wars in NEW machete order",
4848
"description":"Some descriptive text",
4949
"privacy":"private",
50+
"type":"personal",
5051
"display_numbers":true,
5152
"allow_comments":false,
5253
"updated_at":"2014-10-11T17:00:54.000Z",
@@ -188,7 +189,7 @@
188189
{"type":"show","show":{"title":"Breaking Bad","year":2008,"ids":{"trakt":1,"slug":"breaking-bad","tvdb":81189,"imdb":"tt0903747","tmdb":1396,"tvrage":18164}},"comment":{"id":199,"comment":"Skyler, I AM THE DANGER.","spoiler":false,"review":false,"parent_id":0,"created_at":"2015-02-18T06:02:30.000Z","replies":0,"likes":0,"user_rating":10,"user":{"username":"justin","private":false,"name":"Justin N.","vip":true,"vip_ep":false}}},
189190
{"type":"season","season":{"number":1,"ids":{"trakt":3958,"tvdb":274431,"tmdb":60394,"tvrage":38049}},"show":{"title":"Gotham","year":2014,"ids":{"trakt":869,"slug":"gotham","tvdb":274431,"imdb":"tt3749900","tmdb":60708,"tvrage":38049}},"comment":{"id":220,"comment":"Kicking off season 1 for a new Batman show.","spoiler":false,"review":false,"parent_id":0,"created_at":"2015-04-21T06:53:25.000Z","replies":0,"likes":0,"user_rating":8,"user":{"username":"justin","private":false,"name":"Justin N.","vip":true,"vip_ep":false}}},
190191
{"type":"episode","episode":{"season":1,"number":1,"title":"Jim Gordon","ids":{"trakt":63958,"tvdb":4768720,"imdb":"tt3216414","tmdb":975968,"tvrage":1065564827}},"show":{"title":"Gotham","year":2014,"ids":{"trakt":869,"slug":"gotham","tvdb":274431,"imdb":"tt3749900","tmdb":60708,"tvrage":38049}},"comment":{"id":229,"comment":"Is this the OC?","spoiler":false,"review":false,"parent_id":0,"created_at":"2015-04-21T15:42:31.000Z","replies":1,"likes":0,"user_rating":7,"user":{"username":"justin","private":false,"name":"Justin N.","vip":true,"vip_ep":false}}},
191-
{"type":"list","list":{"name":"Star Wars","description":"The complete Star Wars saga!","privacy":"public","display_numbers":false,"allow_comments":true,"updated_at":"2015-04-22T22:01:39.000Z","item_count":8,"comment_count":0,"likes":0,"ids":{"trakt":51,"slug":"star-wars"}},"comment":{"id":268,"comment":"May the 4th be with you!","spoiler":false,"review":false,"parent_id":0,"created_at":"2014-12-08T17:34:51.000Z","replies":0,"likes":0,"user_rating":null,"user":{"username":"justin","private":false,"name":"Justin N.","vip":true,"vip_ep":false}}}
192+
{"type":"list","list":{"name":"Star Wars","description":"The complete Star Wars saga!","privacy":"public","type":"personal","display_numbers":false,"allow_comments":true,"updated_at":"2015-04-22T22:01:39.000Z","item_count":8,"comment_count":0,"likes":0,"ids":{"trakt":51,"slug":"star-wars"}},"comment":{"id":268,"comment":"May the 4th be with you!","spoiler":false,"review":false,"parent_id":0,"created_at":"2014-12-08T17:34:51.000Z","replies":0,"likes":0,"user_rating":null,"user":{"username":"justin","private":false,"name":"Justin N.","vip":true,"vip_ep":false}}}
192193
]
193194
},
194195
"users/sean/lists": {
@@ -197,6 +198,7 @@
197198
"name":"Star Wars in machete order",
198199
"description":"Some descriptive text",
199200
"privacy":"public",
201+
"type":"personal",
200202
"display_numbers":true,
201203
"allow_comments":true,
202204
"sort_by": "rank",
@@ -220,6 +222,7 @@
220222
"name":"Vampires FTW",
221223
"description":"These suck, but in a good way!",
222224
"privacy":"public",
225+
"type":"personal",
223226
"display_numbers":false,
224227
"allow_comments":true,
225228
"sort_by": "rank",
@@ -244,6 +247,7 @@
244247
"name":"Star Wars in machete order",
245248
"description":"Some descriptive text",
246249
"privacy":"public",
250+
"type":"personal",
247251
"display_numbers":true,
248252
"allow_comments":true,
249253
"sort_by": "rank",
@@ -261,6 +265,7 @@
261265
"name":"Star Wars in machete order",
262266
"description":"Some descriptive text",
263267
"privacy":"public",
268+
"type":"personal",
264269
"display_numbers":true,
265270
"allow_comments":true,
266271
"sort_by": "rank",
@@ -277,6 +282,7 @@
277282
"name":"Star Wars in NEW machete order",
278283
"description":"Some descriptive text",
279284
"privacy":"private",
285+
"type":"personal",
280286
"display_numbers":true,
281287
"allow_comments":false,
282288
"sort_by": "rank",

trakt/users.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ def unfollow(user_name):
6161

6262

6363
class UserList(namedtuple('UserList', ['name', 'description', 'privacy',
64-
'display_numbers', 'allow_comments',
65-
'sort_by', 'sort_how', 'created_at',
64+
'type', 'display_numbers',
65+
'allow_comments', 'sort_by',
66+
'sort_how', 'created_at',
6667
'updated_at', 'item_count',
6768
'comment_count', 'likes', 'trakt',
6869
'slug', 'user', 'creator'])):

0 commit comments

Comments
 (0)