// Path: src/main/java/org/votesmart/api/VoteSmartErrorException.java
// public class VoteSmartErrorException extends Exception {
// 	private static final long serialVersionUID = 2196788960724030978L;
// 	public ErrorBase errorBase;
// 	public String method;
// 	public ArgMap argMap;
// 	public VoteSmartErrorException(ErrorBase errorBase, String method, ArgMap argMap) {
// 		super(errorBase.errorMessage);
// 		this.errorBase = errorBase;
// 		this.method = method;
// 		this.argMap = argMap;
// 	}
// }


import org.votesmart.api.VoteSmartErrorException;
import org.votesmart.classes.*;
import org.votesmart.data.*;

package examples;


/**
 * <pre> 
 * This program is a very simple demonstration of this RESTful Client API.
 * It requires a ResourceBundle named VoteSmart. This means a file
 * named VoteSmart.properties must be found in your class path, such
 * as your resources directory. This VoteSmart client reads three 
 * keys from the resource bundle, two of which are mandatory.
 * These are in the form of key=value, one on each line.
 * The three keys are:
 * 
 * apikey    (Mandatory) get from VoteSmart.org
 * cache     (Mandatory) such as c:/tmp/VoteSmartCache
 * 
 * The basic goal here are to make (most) every possible call 
 * and use ID's from earlier calls to pass to later calls.
 * 
 * The queries will be cached and all subsequent calls will return 
 * the same information. If you want to disable the cache checking, 
 * then call VoteSmart.checkCache(false); or VoteSmart.checkCache(true);
 * to turn it back on.
 * 
 * Secondarily, the goal is to list make all the calls that can be 
 * made for a state.
 * </pre>
 *
 */
public class PoliticalExperience {

	public static void handleError(VoteSmartErrorException e) {
		System.out.println("Error: " + e.errorBase.errorMessage);
		System.out.println("	Details: " + e.method + " " + e.argMap + "\n");
	}

	public static void main(String... args) throws Exception {
		
		// Candidate biographical 

// Path: src/main/java/org/votesmart/api/VoteSmartErrorException.java
// public class VoteSmartErrorException extends Exception {
// 	private static final long serialVersionUID = 2196788960724030978L;
// 	public ErrorBase errorBase;
// 	public String method;
// 	public ArgMap argMap;
// 	public VoteSmartErrorException(ErrorBase errorBase, String method, ArgMap argMap) {
// 		super(errorBase.errorMessage);
// 		this.errorBase = errorBase;
// 		this.method = method;
// 		this.argMap = argMap;
// 	}
// }


// Path: src/main/java/examples/PoliticalExperience.java
import org.votesmart.api.VoteSmartErrorException;
import org.votesmart.classes.*;
import org.votesmart.data.*;

package examples;


/**
 * <pre> 
 * This program is a very simple demonstration of this RESTful Client API.
 * It requires a ResourceBundle named VoteSmart. This means a file
 * named VoteSmart.properties must be found in your class path, such
 * as your resources directory. This VoteSmart client reads three 
 * keys from the resource bundle, two of which are mandatory.
 * These are in the form of key=value, one on each line.
 * The three keys are:
 * 
 * apikey    (Mandatory) get from VoteSmart.org
 * cache     (Mandatory) such as c:/tmp/VoteSmartCache
 * 
 * The basic goal here are to make (most) every possible call 
 * and use ID's from earlier calls to pass to later calls.
 * 
 * The queries will be cached and all subsequent calls will return 
 * the same information. If you want to disable the cache checking, 
 * then call VoteSmart.checkCache(false); or VoteSmart.checkCache(true);
 * to turn it back on.
 * 
 * Secondarily, the goal is to list make all the calls that can be 
 * made for a state.
 * </pre>
 *
 */
public class PoliticalExperience {

	public static void handleError(VoteSmartErrorException e) {
		System.out.println("Error: " + e.errorBase.errorMessage);
		System.out.println("	Details: " + e.method + " " + e.argMap + "\n");
	}

	public static void main(String... args) throws Exception {
		
		// Candidate biographical 

		CandidatesClass candidatesClass = new CandidatesClass();
