public static int genericAsyncAPICall(String region, String service, String operation, Object[] args)
	{
		//Retrieve client for the specified region
		LoLRTMPSClient client = null;
		//Set the ID to be assigned to the result value
		final int localID = ids++;
		try
		{
			client = LoadBalancer.returnClient(region);
		} 
		catch (NullClientForRegionException e1) 
		{
			addResult(localID, "Connection to " + e1.getRegion() + " failed. This may be because that region does not exist, or the administrator of this server " +
					" does not have it configured to that region, or because that region is currently offline.");
			return(localID);
		}
		//Retrieves the data from Riot's servers async then formats it into json during the callback and adds it to the async result hashmap
		try 
		{
			int id = client.invokeWithCallback(service, operation, args,
			new Callback()
			{
				public void callback(TypedObject result)
				{
					String json;
					json = "{";
					for(String x : result.keySet())
					{
						json = addObject(json, result, x);
					}
					json = json.substring(0,json.length()-1);
					json += "}";
					addResult(localID, json);
				}
			});
			client.join();
			//Wait for result to be obtained and added to hashmap
			while(returnAsyncAPICallResult(localID, false) == null)
			{
				try {
					Thread.sleep(20);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return localID;
		}
		catch (IOException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return -1;
	}