[Twitter] 3.0 Twitter Binding (#10241)
* [twitter][WIP] Initial contribution using the 1.x binding as a template, I created a new Twitter Binding. Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> (github: computergeek1507) Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * trying to fix twitter4j dependency stuff Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * add to bundle POM Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * trying to fix build Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * Fixed dependency issues, Got Actions working Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * updating readme Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * fix class name Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * Fixes based on review Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * Cleanup based on review and mvn checks Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * grammar fix Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * remove Apache dependencies Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * added Null Checks based on review Signed-off-by: Scott Hanson <scooter_seh@yahoo.com> * change null check around Signed-off-by: Scott Hanson <scooter_seh@yahoo.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<binding:binding id="twitter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
|
||||
|
||||
<name>Twitter Binding</name>
|
||||
<description>Supports adding Thing for getting the Last Tweet. Send Tweets and Pictures with Actions.</description>
|
||||
|
||||
</binding:binding>
|
||||
@@ -0,0 +1,9 @@
|
||||
# actions
|
||||
sendTweetActionLabel = send a Tweet
|
||||
sendTweetActionDescription = Sends a Tweet.
|
||||
|
||||
sendAttachmentTweetActionLabel = send a Tweet with attachment
|
||||
sendAttachmentTweetActionDescription = Sends a Tweet with an attachment.
|
||||
|
||||
sendDirectMessageActionLabel = send a DirectMessage
|
||||
sendDirectMessageActionDescription = Sends a DirectMessage.
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<thing:thing-descriptions bindingId="twitter"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||
|
||||
<thing-type id="account">
|
||||
<label>Twitter Account</label>
|
||||
<description>Account uses for sending Tweets</description>
|
||||
|
||||
<channels>
|
||||
<channel id="lasttweet" typeId="lasttweet"/>
|
||||
</channels>
|
||||
|
||||
<config-description>
|
||||
<parameter name="consumerKey" type="text" required="true">
|
||||
<label>Consumer API Key</label>
|
||||
<context>password</context>
|
||||
</parameter>
|
||||
<parameter name="consumerSecret" type="text" required="true">
|
||||
<label>Consumer API Secret</label>
|
||||
<context>password</context>
|
||||
</parameter>
|
||||
<parameter name="accessToken" type="text" required="true">
|
||||
<label>Access Token</label>
|
||||
<context>password</context>
|
||||
</parameter>
|
||||
<parameter name="accessTokenSecret" type="text" required="true">
|
||||
<label>Access Token Secret</label>
|
||||
<context>password</context>
|
||||
</parameter>
|
||||
<parameter name="refresh" type="integer" required="false" unit="min" min="1">
|
||||
<label>Refresh Time</label>
|
||||
<description>Refresh Time for This Account in Mins</description>
|
||||
<default>30</default>
|
||||
</parameter>
|
||||
</config-description>
|
||||
|
||||
</thing-type>
|
||||
|
||||
<channel-type id="lasttweet">
|
||||
<item-type>String</item-type>
|
||||
<label>Last Tweet</label>
|
||||
<description>Users Last Tweet</description>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
</thing:thing-descriptions>
|
||||
Reference in New Issue
Block a user