ch4r10t33r / jdiffbot

Maven based Java Wrapper for the DiffBot API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jdiffbot

Maven based Java Wrapper for the DiffBot API

Example of using this Wrapper


		//Add your API token below
		String token = "your api token goes here";
		//Add version of the API here
		int version = 2;
		//Add your list of fields below
		List fields = new ArrayList ();
	fields.add("*"); // '*' means return all fields.
	//fields.add("querystring");fields.add("date");
	
	JDiffBotWrapper theBot = JDiffBotWrapperFactory.getInstance();
	
	//Fetch the output as a JsonObject
	JsonObject jsonObject = theBot.diffBot(new URL("http://blog.diffbot.com/diffbots-new-product-api-teaches-robots-to-shop-online/"),
			token,JDiffBotWrapper.ARTICLE,fields,version);
	
	//Fetch the output as a JSON String
	String jsonString = theBot.diffBotAsString(new URL("http://blog.diffbot.com/diffbots-new-product-api-teaches-robots-to-shop-online/"),
			token,JDiffBotWrapper.ARTICLE,fields,version);

About

Maven based Java Wrapper for the DiffBot API

License:Apache License 2.0


Languages

Language:Java 100.0%