Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About geel9

  • Rank
    Chicken Feather
  1. System.Linq is only used in the examples, it's not in the API source.
  2. Interesting idea. Right now I'm working on threading the requests, so the entire application doesn't hang.
  3. Haha, sorry, I already did. I just didn't update the first post ;) I'll work on making a wiki or something.
  4. Awesome, do you have any experience in C#?
  5. CURRENT VERSION: Development 0.5 Hi guys! I'm Geel9, obviously, and I've been working on a Runescape API for .NET 4.0. It will, eventually, have all the features that you need to make a sick Runescape application. This is not released yet! Requirements: Using .NET 4.0 Classes so far: Main--This does nothing for the programmer. Highscores--Used to get Highscore info GERequest--Used to get item prices AdvLog---used to get a player's Adventurer's Log Highscores Documentation List<string> getPlayerStats(string username) This returns a List<string> of the player's stats on the highscores, organized as such: rank,level,experience So, using getPlayerStats("geel9"), we'd get this(each new line is a different index in the List<string>) 271359,1680,19892015 501891,80,1986588 356390,80,2049194 674117,81,2193428 524442,82,2535620 808048,71,862653 347988,62,343981 458023,78,1631821 511026,75,1229818 1199423,72,959218 1025156,61,307352 681006,70,776987 805021,62,341688 368200,64,407219 385690,63,370343 942282,64,408310 218843,61,305852 271077,62,348847 149865,69,670244 310833,66,498125 186129,63,371423 307348,55,174781 450877,59,261531 221601,60,279390 213971,63,368840 95647,57,208762 -1,-1 -1,-1 -1,-1 -1,-1 -1,-1 150386,738 -1,-1 251180,510 25954,2451 -1,-1 -1,-1 Note that after a certain point, they only have two commas per skill. Those aren't skills, those are minigames, and are formatted as: rank,score Here's a fully commented example of using the Highscores. using System; using System.Collections.Generic; using System.Linq; using System.Text; using RSapi; namespace APItest { class APItest { static void Main(string[] args) { //Make the list to hold our highscores List<string> scores = new List<string>(); //Get the username to find Console.WriteLine("What is your username?"); string username = Console.ReadLine(); //Get the scores, and output them. scores = RSapi.Highscores.getPlayerStats(username); //If the username is found if (scores.Count > 0) { foreach (string l in scores) { Console.WriteLine(l); } } Console.ReadLine(); } } } GERequest Documentation The GERequest class is an instance-based class, or rather, it's not static. You need to create an instance of it first. Here's how it works. GERequest(string search) The GErequest class is what you use to make a GE price search. It takes a string in its constructor and uses that as the search. Example: GERequest request = new GERequest("dragon longsword"); List<string> getItems() Returns the list of items that the GERequest found. Example: List<string> list = new List<string>(); list = request.getItems(); List<string> getPrices() Returns the list of prices that the GERequest found. Note that the prices are just prices; to get the item names, you must use the same index as the price. For example, to get the item name of prices[4], use items[4]. List<string> getChange() Returns the change in price for each item the GERequest found. string getFirstItem() Returns the first item the GERequest found. string getFirstPrice() Returns the price for the first item the GERequest found. string getFirstChange() Returns the change in price today for the first item the GERequest found. Example of GERequest: using System; using System.Collections.Generic; using System.Linq; using System.Text; using RSapi; namespace APItest { class APItest { static void Main(string[] args) { //Make the lists for our items, prices and price changes List<string> items = new List<string>(); List<string> prices = new List<string>(); List<string> changes = new List<string>(); //Get the search term Console.WriteLine("What would you like to search for?"); string search = Console.ReadLine(); //Make a new GERequest instance and pass the search term to it. GERequest request = new GERequest(search); //Get the items from the request items = request.getItems(); //Get the prices prices = request.getPrices(); //Get the change in prices changes = request.getChange(); //Print it all out if (items.Count > 0) { for (int i = 0; i < items.Count; i++) { Console.WriteLine(items[i] + " cost(s) " + prices[i] + " and changed " + changes[i] + " today."); } } Console.ReadLine(); } } } AdvLog Nothing yet, working on it.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.