Skip to content

Commit 672f34f

Browse files
authored
Merge pull request #120 from tr4nt0r/fix_people_provider
Update `PeopleProvider` to xbl-contract-version 7 and improve typing
2 parents b5c56aa + 57070b2 commit 672f34f

9 files changed

Lines changed: 446 additions & 198 deletions

File tree

tests/data/responses/people_batch.json

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"presenceState": "Offline",
2121
"presenceText": "Last seen 49m ago: Xbox App",
2222
"presenceDevices": null,
23+
"isFriend": true,
24+
"isFriendRequestReceived": false,
25+
"isFriendRequestSent": false,
2326
"isBroadcasting": false,
2427
"isCloaked": false,
2528
"isQuarantined": false,
@@ -30,8 +33,8 @@
3033
"search": null,
3134
"titleHistory": null,
3235
"multiplayerSummary": {
33-
"InMultiplayerSession": 0,
34-
"InParty": 0
36+
"inMultiplayerSession": 0,
37+
"inParty": 0
3538
},
3639
"recentPlayer": null,
3740
"follower": null,
@@ -67,7 +70,17 @@
6770
"mute": false,
6871
"followerCount": 105,
6972
"followingCount": 121,
70-
"hasGamePass": false
73+
"hasGamePass": false,
74+
"isFriend": true,
75+
"canBeFriended": true,
76+
"canBeFollowed": true,
77+
"friendCount": 150,
78+
"isFriendRequestReceived": false,
79+
"isFriendRequestSent": false,
80+
"isFriendListShared": true,
81+
"isFollowingCaller": false,
82+
"isFollowedByCaller": false,
83+
"isFavorite": true
7184
},
7285
"communityManagerTitles": null,
7386
"socialManager": null,
@@ -99,6 +112,9 @@
99112
"presenceState": "Online",
100113
"presenceText": "Online",
101114
"presenceDevices": null,
115+
"isFriend": true,
116+
"isFriendRequestReceived": false,
117+
"isFriendRequestSent": false,
102118
"isBroadcasting": false,
103119
"isCloaked": null,
104120
"isQuarantined": false,
@@ -109,8 +125,8 @@
109125
"search": null,
110126
"titleHistory": null,
111127
"multiplayerSummary": {
112-
"InMultiplayerSession": 0,
113-
"InParty": 0
128+
"inMultiplayerSession": 0,
129+
"inParty": 0
114130
},
115131
"recentPlayer": null,
116132
"follower": null,
@@ -146,7 +162,17 @@
146162
"mute": false,
147163
"followerCount": 78,
148164
"followingCount": 83,
149-
"hasGamePass": false
165+
"hasGamePass": false,
166+
"isFriend": true,
167+
"canBeFriended": true,
168+
"canBeFollowed": true,
169+
"friendCount": 150,
170+
"isFriendRequestReceived": false,
171+
"isFriendRequestSent": false,
172+
"isFriendListShared": true,
173+
"isFollowingCaller": false,
174+
"isFollowedByCaller": false,
175+
"isFavorite": true
150176
},
151177
"communityManagerTitles": null,
152178
"socialManager": null,
@@ -178,6 +204,9 @@
178204
"presenceState": "Online",
179205
"presenceText": "Amazon Instant Video",
180206
"presenceDevices": null,
207+
"isFriend": true,
208+
"isFriendRequestReceived": false,
209+
"isFriendRequestSent": false,
181210
"isBroadcasting": false,
182211
"isCloaked": null,
183212
"isQuarantined": false,
@@ -188,8 +217,8 @@
188217
"search": null,
189218
"titleHistory": null,
190219
"multiplayerSummary": {
191-
"InMultiplayerSession": 0,
192-
"InParty": 0
220+
"inMultiplayerSession": 0,
221+
"inParty": 0
193222
},
194223
"recentPlayer": null,
195224
"follower": null,
@@ -236,7 +265,17 @@
236265
"mute": false,
237266
"followerCount": 27659,
238267
"followingCount": 0,
239-
"hasGamePass": false
268+
"hasGamePass": false,
269+
"isFriend": true,
270+
"canBeFriended": true,
271+
"canBeFollowed": true,
272+
"friendCount": 150,
273+
"isFriendRequestReceived": false,
274+
"isFriendRequestSent": false,
275+
"isFriendListShared": true,
276+
"isFollowingCaller": false,
277+
"isFollowedByCaller": false,
278+
"isFavorite": true
240279
},
241280
"communityManagerTitles": null,
242281
"socialManager": null,

tests/data/responses/people_friends_by_xuid.json

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"presenceState": "Offline",
2121
"presenceText": "Offline",
2222
"presenceDevices": null,
23+
"isFriend": true,
24+
"isFriendRequestReceived": false,
25+
"isFriendRequestSent": false,
2326
"isBroadcasting": false,
2427
"isCloaked": null,
2528
"isQuarantined": false,
@@ -30,8 +33,8 @@
3033
"search": null,
3134
"titleHistory": null,
3235
"multiplayerSummary": {
33-
"InMultiplayerSession": 0,
34-
"InParty": 0
36+
"inMultiplayerSession": 0,
37+
"inParty": 0
3538
},
3639
"recentPlayer": null,
3740
"follower": null,
@@ -55,7 +58,17 @@
5558
"mute": false,
5659
"followerCount": 50,
5760
"followingCount": 34,
58-
"hasGamePass": false
61+
"hasGamePass": false,
62+
"isFriend": true,
63+
"canBeFriended": true,
64+
"canBeFollowed": true,
65+
"friendCount": 150,
66+
"isFriendRequestReceived": false,
67+
"isFriendRequestSent": false,
68+
"isFriendListShared": true,
69+
"isFollowingCaller": false,
70+
"isFollowedByCaller": false,
71+
"isFavorite": true
5972
},
6073
"communityManagerTitles": null,
6174
"socialManager": null,
@@ -87,6 +100,9 @@
87100
"presenceState": "Online",
88101
"presenceText": "YouTube",
89102
"presenceDevices": null,
103+
"isFriend": true,
104+
"isFriendRequestReceived": false,
105+
"isFriendRequestSent": false,
90106
"isBroadcasting": false,
91107
"isCloaked": null,
92108
"isQuarantined": false,
@@ -97,8 +113,8 @@
97113
"search": null,
98114
"titleHistory": null,
99115
"multiplayerSummary": {
100-
"InMultiplayerSession": 0,
101-
"InParty": 0
116+
"inMultiplayerSession": 0,
117+
"inParty": 0
102118
},
103119
"recentPlayer": null,
104120
"follower": null,
@@ -145,7 +161,17 @@
145161
"mute": false,
146162
"followerCount": 38,
147163
"followingCount": 48,
148-
"hasGamePass": false
164+
"hasGamePass": false,
165+
"isFriend": true,
166+
"canBeFriended": true,
167+
"canBeFollowed": true,
168+
"friendCount": 150,
169+
"isFriendRequestReceived": false,
170+
"isFriendRequestSent": false,
171+
"isFriendListShared": true,
172+
"isFollowingCaller": false,
173+
"isFollowedByCaller": false,
174+
"isFavorite": true
149175
},
150176
"communityManagerTitles": null,
151177
"socialManager": null,

0 commit comments

Comments
 (0)