Chat is more social with gifs. This block lets users send each others gifs in a chat message based on the text it reads in the message with the Giphy API, just like Slack.
This block adds a gif url to a message based on the text. It uses 3rd party Giphy API to get gif url matching input text. Keywords are extracted from text based on usage of /gif tag in message text. The /gif tag is removed from text before publishing.
To learn more about Giphy API and getting your production keys, visit https://api.giphy.com.
Input Channel: pubnub-gif-chat (configurable) A JSON object containing key "text", with the message needs to be published on input channel. If message contains /gif tag, then the next word will be used for finding a matching gif image. Multiple tags can exist in same message. For including gif urls based on phrases or sentences, enclose them using ( ) .
{ "text" : "/gif hello" }
Output channel: pubnub-gif-chat (configurable) The modified message containing the list of gif urls is received on same channel.
{ "text": "hello", "gifs": ["http://media1.giphy.com/media/xTiTngMMCIt7FramOc/200.gif"] }
Need help? Contact PubNub Support.
Copyright (c) 2018 PubNub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.