package xyz.thastertyn.Scrape;

import java.io.IOException;

import xyz.thastertyn.Types.Choice;
import xyz.thastertyn.Types.Options;

/**
 * Abstract class to wrap around everything that scrapes some data. Most of them also have getData or something similiar,
 * but the data types are just so vastly different, they couldnt be wrapped as abstract method and abstract class
 */
public abstract class JecnaScrape {
	
	/**
	 * returns possible options, like school year or half year
	 * @return {@link Options} array, for when there are more options available
	 */
	public abstract Options[] getOptions();

	/**
	 * Downloads the chosen url, given the {@link Choice} which includes all the needed data
	 * @param choice of any possible data like school year or half year
	 * @throws IOException like any other download method, in case no internet, timeout, etc.
	 */
	public abstract void download(Choice choice) throws IOException;

	/**
	 * Downloads the default url, without any parameters
	 * @throws IOException in case of timeout, no internet, etc.
	 */
	public abstract void download() throws IOException;
}
