Difference between revisions of "SNDTWTMSG"

From MidrangeWiki
Jump to: navigation, search
(New page: Want a simple and free way to send a message to Twitter from your System i? Here you go. I am releasing this as an Open Source release. Please improve on the coding and update this page wi...)
 
Line 1: Line 1:
 
Want a simple and free way to send a message to Twitter from your System i? Here you go. I am releasing this as an Open Source release. Please improve on the coding and update this page with your changes.
 
Want a simple and free way to send a message to Twitter from your System i? Here you go. I am releasing this as an Open Source release. Please improve on the coding and update this page with your changes.
 +
 +
You will need the AIX binary of cURL from [http://computer-refuge.org/classiccmp/aixpdslib/pub/curl/RISC/4.3/exec/ here]. You will need version 7.13.1. Once extracted, put the curl object into a folder on the IFS.
  
 
SNDTWTMSG.CLLE
 
SNDTWTMSG.CLLE

Revision as of 15:31, 24 April 2009

Want a simple and free way to send a message to Twitter from your System i? Here you go. I am releasing this as an Open Source release. Please improve on the coding and update this page with your changes.

You will need the AIX binary of cURL from here. You will need version 7.13.1. Once extracted, put the curl object into a folder on the IFS.

SNDTWTMSG.CLLE

            PGM        PARM(&USER &PASS &TWEET)
            DCL        VAR(&USER) TYPE(*CHAR) LEN(30)
            DCL        VAR(&PASS) TYPE(*CHAR) LEN(30)
            DCL        VAR(&TWEET) TYPE(*CHAR) LEN(140)
            DCL        VAR(&CMD) TYPE(*CHAR) LEN(300)
            CHGVAR     VAR(&CMD) VALUE('/installedApps/curl/curl --basic +
                         --user ' || &USER *TCAT ':' || &PASS *TCAT ' +
                         --data status="' || &TWEET *TCAT '" +
                         http://twitter.com/statuses/update.xml')
            QSH        CMD(&CMD)
            ENDPGM

SNDTWTMSG.cmd

            CMD        PROMPT('Send Tweet')
            PARM       KWD(USER) TYPE(*CHAR) LEN(30) CASE(*MIXED) +
                         PROMPT('User Name')
            PARM       KWD(PASS) TYPE(*CHAR) LEN(30) CASE(*MIXED) +
                         PROMPT('Password')
            PARM       KWD(TWEET) TYPE(*CHAR) LEN(140) CASE(*MIXED) +
                         PROMPT('Tweet')