Skip to content

Commit

Permalink
Updated api and usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
ohhsodead committed Nov 11, 2018
1 parent 0f7fd56 commit d921f58
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
8 changes: 4 additions & 4 deletions API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static Validate ValidateUser(string username, Platform platform)
}

/// <summary>
/// Get user's profile stats
/// Get user's profile stats for the specified mode
/// </summary>
/// <param name="username">Username of the user</param>
/// <param name="platform">Platform the user is on</param>
Expand Down Expand Up @@ -63,7 +63,7 @@ public static object GetProfile(string username, Platform platform, Mode mode)
}

/// <summary>
/// Get user's profile stats
/// Get user's profile stats for the specified mode
/// </summary>
/// <param name="username">Username of the user</param>
/// <param name="userid">Id the user</param>
Expand Down Expand Up @@ -93,7 +93,7 @@ public static object GetProfile(string username, long userid, Platform platform,
}

/// <summary>
/// Get user's recent matches
/// Get user's last 20 matches for the specified mode
/// </summary>
/// <param name="rows">Number of rows to fetch</param>
/// <returns>Recent matches data</returns>
Expand Down Expand Up @@ -123,7 +123,7 @@ public static object GetUserMatches(string username, Platform platform, Mode mod
}

/// <summary>
/// Get recent matches being played
/// Get up to the last 100 recent matches played
/// </summary>
/// <param name="rows">Number of rows to fetch</param>
/// <returns>Recent matches data</returns>
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ var users = await Task.Run(() => API.GetUserById(327154, 396158));

foreach (var user in users)
{
Console.WriteLine(user.uid);
Console.WriteLine(user.uid);
Console.WriteLine("User Id: " + user.uid);
}
//...
```
Expand All @@ -75,9 +74,9 @@ __Tip:__ You can provide the *userId* for a much faster response, which can be f
```csharp
var profile = await Task.Run(() => API.GetProfile("YOUTUBE__Kor3aYn", 323487, Platform.PS4, Mode.Multiplayer));

Console.WriteLine(profile.user.username);
Console.WriteLine(profile.user.stats.prestige);
Console.WriteLine(profile.user.stats.level);
Console.WriteLine("Username: " + profile.user.username);
Console.WriteLine("Prestige: " + profile.user.stats.prestige);
Console.WriteLine("Level: " + profile.user.stats.level);
//...
#### Data Example
Expand Down Expand Up @@ -204,9 +203,13 @@ Console.WriteLine(profile.user.stats.level);
```csharp
var matches = await Task.Run(() => API.GetUserMatches("YOUTUBE__Kor3aYn", Platform.PS4, Mode.Multiplayer));

Console.WriteLine(profile.user.username);
Console.WriteLine(profile.user.stats.prestige);
Console.WriteLine(profile.user.stats.level);
foreach (var match in matches.entries)
{
Console.WriteLine("Map Name: " + match.mapName);

Console.WriteLine("Kills: " + match.stats.kills);
Console.WriteLine("Deaths: " + match.stats.deaths);
}
//...
```

Expand Down

0 comments on commit d921f58

Please sign in to comment.