Difference between revisions of "SNDTWTMSG"
From MidrangeWiki
(hide password parm contents) |
|||
Line 21: | Line 21: | ||
PROMPT('User Name') | PROMPT('User Name') | ||
PARM KWD(PASS) TYPE(*CHAR) LEN(30) CASE(*MIXED) + | PARM KWD(PASS) TYPE(*CHAR) LEN(30) CASE(*MIXED) + | ||
− | PROMPT('Password') | + | PROMPT('Password') DSPINPUT(*NO) |
PARM KWD(TWEET) TYPE(*CHAR) LEN(140) CASE(*MIXED) + | PARM KWD(TWEET) TYPE(*CHAR) LEN(140) CASE(*MIXED) + | ||
PROMPT('Tweet') | PROMPT('Tweet') |
Revision as of 15:44, 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') DSPINPUT(*NO) PARM KWD(TWEET) TYPE(*CHAR) LEN(140) CASE(*MIXED) + PROMPT('Tweet')