Slack library?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Slack library?

J. Landman Gay via use-livecode
Has anyone interfaced with Slack using LiveCode?  If so, any tips, experience,
or code to share?

Many thanks,

Ben

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Slack library?

J. Landman Gay via use-livecode
Depends on what you want to do...

Below is just a post to channel command I had made, haven't used it ina
while and obviously the webhook has fake credentials...


command slackPost
  put
"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
into slackURL
  put "Fallback text" into tPostArray["fallback"]
  put "#random" into tPostArray["channel"]
  put "This is the text test" into tPostArray["text"]
  put "App Bot" into tPostArray["username"]
  put "Quick pretext" into tPostArray["pretext"]
  put "danger" into tPostArray["color"]
  put ":dragon:" into tPostArray["icon_emoji"]
  put "abc" into tPostArray["fields"]["1"]["title"]
  put 2   into tPostArray["fields"]["1"]["value"]
  put "short"   into tPostArray["fields"]["1"]["short"]
  put "def" into tPostArray["fields"]["2"]["title"]
  put 2   into tPostArray["fields"]["2"]["value"]
  put "short"   into tPostArray["fields"]["2"]["short"]
 
  put jsonFromArray(tPostArray) into tPost
 
  post tPost to URL slackURL
end slackPost



-----
---
Greg (pink) Miller
mad, pink and dangerous to code
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode