Instantly share code, notes, and snippets.

Embed
What would you like to do?
An example implementation of the SteamRep API for checking whether a user is marked or not in C#.
using System.IO;
using System.Net;
using System;
class SteamRep
{
public bool isMarked(string steamId32)
{
// Create the SteamRep API address with the SteamID32.
string api = "http://steamrep.com/id2rep.php?steamID32={0}";
string url = string.Format(api, steamId32);
// Fetch the result of the endpoint as a string.
WebClient client = new WebClient();
string result = client.DownloadString(url);
// Check for the string "SCAMMER" in the result.
return (result.IndexOf("SCAMMER") > -1);
}
}
class Program
{
static void Main()
{
SteamRep steamRep = new SteamRep();
string clean = "STEAM_0:1:12277347";
string scammer = "STEAM_0:1:56662324";
Console.WriteLine(steamRep.isMarked(clean));
Console.WriteLine(steamRep.isMarked(scammer));
}
}
@kashmar

This comment has been minimized.

kashmar commented Jan 5, 2017

hi hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment