This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUSER.cs
39 lines (34 loc) · 1.83 KB
/
USER.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace CSharp_CODAPI
{
public class USER
{
public async Task<BaseAPIResponse?> friendFeed(string gamertag, Platforms platform)
{
(gamertag, var platformStr, _) = Helpers.mapGamertagToPlatform(gamertag, platform, true);
return await Http.sendRequest<BaseAPIResponse>($"/userfeed/v1/friendFeed/platform/{platformStr}/gamer/{gamertag}/friendFeedEvents/en");
}
public async Task<BaseAPIResponse?> eventFeed()
{
return await Http.sendRequest<BaseAPIResponse>($"/userfeed/v1/friendFeed/rendered/en/{Http.globalSsoToken}");
}
public async Task<BaseAPIResponse?> loggedInIdentities()
{
return await Http.sendRequest<BaseAPIResponse>($"/crm/cod/v2/identities/{Http.globalSsoToken}");
}
public async Task<BaseAPIResponse?> codPoints(string gamertag, Platforms platform)
{
(gamertag, var platformStr, _) = Helpers.mapGamertagToPlatform(gamertag, platform, true);
return await Http.sendRequest<BaseAPIResponse>($"/inventory/v1/title/mw/platform/{platformStr}/gamer/{gamertag}/currency");
}
public async Task<BaseAPIResponse?> connectedAccounts(string gamertag, Platforms platform)
{
(gamertag, var platformStr, var lookupType) = Helpers.mapGamertagToPlatform(gamertag, platform, true);
return await Http.sendRequest<BaseAPIResponse>($"/crm/cod/v2/accounts/platform/{platformStr}/{lookupType}/{gamertag}");
}
public async Task<BaseAPIResponse?> settings(string gamertag, Platforms platform)
{
(gamertag, var platformStr, _) = Helpers.mapGamertagToPlatform(gamertag, platform, true);
return await Http.sendRequest<BaseAPIResponse>($"/preferences/v1/platform/{platformStr}/gamer/{gamertag}/list");
}
}
}