This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 6dde5ba Polished docs for camel-wordpress 6dde5ba is described below commit 6dde5ba464cb6cc7138bc7b456f7ebebf0d8a789 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Jan 30 10:18:14 2018 +0100 Polished docs for camel-wordpress --- .../src/main/docs/wordpress-component.adoc | 45 +++++++++++----------- .../component/wordpress/WordpressEndpoint.java | 4 +- components/readme.adoc | 2 +- .../WordpressComponentConfiguration.java | 2 +- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/components/camel-wordpress/src/main/docs/wordpress-component.adoc b/components/camel-wordpress/src/main/docs/wordpress-component.adoc index a8d98f8..73b6ffb 100644 --- a/components/camel-wordpress/src/main/docs/wordpress-component.adoc +++ b/components/camel-wordpress/src/main/docs/wordpress-component.adoc @@ -1,31 +1,12 @@ == Wordpress Component -*Available as of Camel version 2.20.1* +*Available as of Camel version 2.21* Camel component for https://developer.wordpress.org/rest-api/reference/[Wordpress API]. -=== Usage - Currently only the **Posts** and **Users** operations are supported. -==== Configure your route - -The `WordpressConfiguration` class can be used to set initial properties configuration to the component instead of passing it as query parameter. The following listing shows how to set the component to be used in your routes. - -[source,java] --------------------------------------------------- -public void configure() { - final WordpressConfiguration configuration = new WordpressConfiguration(); - final WordpressComponent component = new WordpressComponent(); - configuration.setApiVersion("2"); - configuration.setUrl("http://yoursite.com/wp-json/"); - component.setConfiguration(configuration); - getContext().addComponent("wordpress", component); - - from("wordpress:post?id=1") - .to("mock:result"); -} --------------------------------------------------- +=== Options // component options: START The Wordpress component supports 2 options which are listed below. @@ -80,10 +61,28 @@ with the following path and query parameters: Most of parameters needed when performing a read operation mirrors from the official https://developer.wordpress.org/rest-api/reference/[API]. When performing searches operations, the `criteria.` suffix is needed. Take the following `Consumer` as example: ---------------------------------------------------------- +---- wordpress:post?criteria.perPage=10&criteria.orderBy=author&criteria.categories=camel,dozer,json ---------------------------------------------------------- +---- +==== Configuring Wordpress component + +The `WordpressConfiguration` class can be used to set initial properties configuration to the component instead of passing it as query parameter. The following listing shows how to set the component to be used in your routes. + +[source,java] +---- +public void configure() { + final WordpressConfiguration configuration = new WordpressConfiguration(); + final WordpressComponent component = new WordpressComponent(); + configuration.setApiVersion("2"); + configuration.setUrl("http://yoursite.com/wp-json/"); + component.setConfiguration(configuration); + getContext().addComponent("wordpress", component); + + from("wordpress:post?id=1") + .to("mock:result"); +} +---- ==== Consumer Example diff --git a/components/camel-wordpress/src/main/java/org/apache/camel/component/wordpress/WordpressEndpoint.java b/components/camel-wordpress/src/main/java/org/apache/camel/component/wordpress/WordpressEndpoint.java index 77af980..a6fe780 100644 --- a/components/camel-wordpress/src/main/java/org/apache/camel/component/wordpress/WordpressEndpoint.java +++ b/components/camel-wordpress/src/main/java/org/apache/camel/component/wordpress/WordpressEndpoint.java @@ -41,9 +41,9 @@ import org.apache.camel.util.IntrospectionSupport; import org.apache.camel.util.ObjectHelper; /** - * Represents a Wordpress endpoint. + * Integrates Camel with Wordpress. */ -@UriEndpoint(firstVersion = "2.20.1", scheme = "wordpress", title = "Wordpress", syntax = "wordpress:operation", label = "Wordpress") +@UriEndpoint(firstVersion = "2.21.0", scheme = "wordpress", title = "Wordpress", syntax = "wordpress:operation", label = "cms") public class WordpressEndpoint extends DefaultEndpoint { public static final String ENDPOINT_SERVICE_POST = "post, user"; diff --git a/components/readme.adoc b/components/readme.adoc index d3b6e6a..4d1b980 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -843,7 +843,7 @@ Number of Components: 290 in 199 JAR artifacts (19 deprecated) `weather:name` | 2.12 | Polls the weather information from Open Weather Map. | link:camel-wordpress/src/main/docs/wordpress-component.adoc[Wordpress] (camel-wordpress) + -`wordpress:operation` | 2.20.1 | Represents a Wordpress endpoint. +`wordpress:operation` | 2.21 | Integrates Camel with Wordpress. | link:camel-xchange/src/main/docs/xchange-component.adoc[XChange] (camel-xchange) + `xchange:name` | 2.21 | Camel XChange support diff --git a/platforms/spring-boot/components-starter/camel-wordpress-starter/src/main/java/org/apache/camel/component/wordpress/springboot/WordpressComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-wordpress-starter/src/main/java/org/apache/camel/component/wordpress/springboot/WordpressComponentConfiguration.java index bb7dd7b..c0e59ba 100644 --- a/platforms/spring-boot/components-starter/camel-wordpress-starter/src/main/java/org/apache/camel/component/wordpress/springboot/WordpressComponentConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-wordpress-starter/src/main/java/org/apache/camel/component/wordpress/springboot/WordpressComponentConfiguration.java @@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.NestedConfigurationProperty; /** - * Represents a Wordpress endpoint. + * Integrates Camel with Wordpress. * * Generated by camel-package-maven-plugin - do not edit this file! */ -- To stop receiving notification emails like this one, please contact davscl...@apache.org.