#Pokemon Global L*nk API
share.base.jsとかshare.base.v2.jsを覗くと分かるように、コメントがキチンと残っている。
誰かドキュメント化してください。
一応使ったものだけリクエスト例を残しておく。
var title = "Wikipedia"; | |
var iconURL = "https://ja.m.wikipedia.org/static/apple-touch/wikipedia.png"; | |
var linkItemFormat = "http://wikipedia.org/wiki/Special:Search/_Q_" | |
OHJConvertImgToBase64(iconURL,function(base64Image){ | |
base64Image = base64Image.replace(/^data.+?base64,/, ''); | |
window.webkit.messageHandlers.oooDidClickAddLinkItem.postMessage([title,linkItemFormat,base64Image]) | |
}) |
if [ -z "$TMUX" ]; then | |
if $(tmux has-session); then | |
tmux a | |
else | |
tmux | |
fi | |
fi |
import Foundation | |
enum FormatType { | |
case intType(Int.Type) | |
case stringType(String.Type) | |
case string(String) | |
} | |
enum MatchedType { | |
case string(String) |
extension CustomStringConvertible where Self: Enum { | |
var description: String { | |
return String(describing: self) | |
} | |
} |
protocol EnumStringConvertible {} | |
extension EnumStringConvertible where Self: Hashable { | |
var string: String { | |
return String(describing: self) | |
} | |
} | |
enum Hoge: EnumStringconvertible { | |
case yo | |
} |
enum Hoge { | |
case yoyo(str: String) | |
case hoi(st: String) | |
var string: String { | |
switch self { | |
case .hoi(st: let str), | |
.yoyo(str: let str): | |
return str | |
} |
import Kitura | |
let router = Router() | |
class RouteMapping1: RouteMapping { | |
static var format: MappingFormat { | |
return ("status"/String.self/Int.self) | |
} | |
var user_name: String |
class MainController: PageController { | |
typealias Routing = MainRouting | |
var context: [String : Any] { | |
return [ | |
"user": self.user, | |
"id": self.id | |
] | |
} |
import Foundation | |
import Fluent | |
final class User: Entity { | |
var id: Node? | |
var name: String | |
var exists: Bool = false | |
init(name: String) { |
#Pokemon Global L*nk API
share.base.jsとかshare.base.v2.jsを覗くと分かるように、コメントがキチンと残っている。
誰かドキュメント化してください。
一応使ったものだけリクエスト例を残しておく。