Skip to content

Latest commit

 

History

History
executable file
·
38 lines (26 loc) · 1.51 KB

README.textile

File metadata and controls

executable file
·
38 lines (26 loc) · 1.51 KB

A java client for akismet.com

Maven Central

This is a client for the akismet spam checker that supports all api methods.

The project is a ready to use configured maven/eclipse project, dependencies are HttpComponents 4.x and slf4j.

Deployment

Run maven with the following argument added:

mvn -DargLine="-DakismetApiKey=YOUR_API_KEY -DakismetConsumer=YOUR_SITE" install

It get’s even more complicated using the release plugin:

mvn release:prepare -Darguments="-DargLine='-DakismetApiKey=YOUR_API_KEY -DakismetConsumer=YOUR_SITE'" 
mvn release:perform -Darguments="-DargLine='-DakismetApiKey=YOUR_API_KEY -DakismetConsumer=YOUR_SITE'" 

Usage

In a Spring 3.x application

The httpClient reference must be an instance of org.apache.http.client.HttpClient.


<bean name="akismet" class="ac.simons.akismet.Akismet">
	<constructor-arg name="httpClient" ref="httpClient" />
	<!-- The api key from akismet.com --> 
	<property name="apiKey" value="YOUR_API_KEY" />
	<!-- The name of your blog or site -->
	<property name="apiConsumer" value="YOUR_SITE" />
</bean>