Skip to content

Instantly share code, notes, and snippets.

@noir-neo
Created June 30, 2015 21:35
Show Gist options
  • Select an option

  • Save noir-neo/096f9356c97775c77627 to your computer and use it in GitHub Desktop.

Select an option

Save noir-neo/096f9356c97775c77627 to your computer and use it in GitHub Desktop.
たび先輩のvineを拾ってきてくれるhubotスクリプト
module.exports = (robot) ->
robot.respond /(tabi|たび)/i, (msg) ->
robot.http("https://api.vineapp.com/timelines/users/1038468495395958784") # ざわちゃんのuserid
.get() (err, res, body) ->
records = JSON.parse(body)['data']['records']
tabis = []
for record in records
# ざわちゃんは複数タグつけないと思うので配列0ハードで
if record.entities[0]?.id == 1138830969860853760 # tag"#たび"のid
tabis.push(record.shareUrl)
msg.send msg.random tabis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment