全部PHPで書いているので他の言語を使うときは読み替えて下さい。Twitter APIのライブラリはTwistOAuthを使っています。
ここで説明するのは公式のAPIからの取得のみです。作成はここからでは出来ません。出来るのは取得のみです。
公式のキーでログインする必要があります。サードパーティではアンケートの情報が一切入らないためです。
// Twitter for Macのキーでログイン
// ==UserScript== | |
// @name we_love_square_twitter | |
// @namespace https://gist.github.com/mpyw/199917673d4eef200e0532af2aadda85 | |
// @version 0.0.3 | |
// @description ● → ■ | |
// @author foooomio (より優れているので拝借させていただきました: http://qiita.com/foooomio/items/a8307820aabab37e02f2 ) | |
// @match https://twitter.com/* | |
// @grant none | |
// ==/UserScript== |
#!/bin/bash | |
# ----------------------------------------------------------------------- | |
# Copyright (C) 2013 Matthias Sohn <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
[{ | |
"created_at": "Fri Feb 08 09:36:04 +0000 2013", | |
"id": 299813838403010560, | |
"id_str": "299813838403010560", | |
"text": "\u753b\u50cfpost\u3066\u3059\u3061 http:\/\/t.co\/49XVeerc", | |
"source": "\u003ca href=\"http:\/\/ksoft.dip.jp\/\" rel=\"nofollow\"\u003ere4k\u003c\/a\u003e", | |
"truncated": false, | |
"in_reply_to_status_id": null, | |
"in_reply_to_status_id_str": null, | |
"in_reply_to_user_id": null, |
// https://api.twitter.com/1.1/search/universal.json?q=tweenq | |
{ | |
"metadata": { | |
"cursor": "TWEET-170606166982930432-299822566774808577" | |
}, | |
"modules": [ | |
{ | |
"status": { | |
"data": { | |
"contributors": null, |
r,s="おちんぽ","";s<<r[rand 4]until s.match r;puts s,"\nおぉぉお゙お゙~っ!!イグゥウ!!イッグゥウウ!!\n\n#{s.size}回目で果てました…" |
Plugin.create(:inmuapi) do | |
[(1..4).to_a, "一二三四".chars].transpose.each do |num, knum| | |
command(:"inmuapi_#{num}", name: "真夏の夜の淫夢 #{knum}章", condition: -> _ { true }, visible: true, role: :postbox) do |opt| | |
res = Net::HTTP.get_response(URI.parse("http://api.yukkurisinai.net/inmu/story/#{num}")) | |
text = JSON.parse(res.body)["Plot"] | |
Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text = text | |
end | |
end | |
end |
<?php | |
function prompt($msg, $hidden = false) { | |
echo $msg; | |
if ($hidden) { | |
`stty -echo`; | |
} | |
$r = trim(fgets(STDIN)); | |
if ($hidden) { | |
`stty echo`; |
ぬあのようにあのようにア紫やおおお | |
chi枯れしぼむ・.・(小さな声) | |
MUR大変だった向こう脛ーこんにちは | |
重い。... これ ... ああ、とてもすでに今日、 | |
それがそのようなキツいんすでも、私は好きでしょう、そして辞職するために既に来るために、なんで。何かがぶっとぅです。- | |
どのようにする起こるか〜ナ・トグや〜 | |
彼は移動します -- それは迅速です... | |
ワイシャツすでに…ずぶぬれになります | |
洗面所のケースは、元気を回復します | |
2つのケース |