This repository has been archived by the owner on Apr 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Home
Yuri Schimke edited this page Jul 18, 2018
·
29 revisions
A curl like client based on OkHttp with tight integration for Mac OSX
$ uberprices buckingham palace
show(staticMap(loc, dest, route?.routes?.firstOrNull()?.geometry))
val prices = query<UberPriceEstimates>("https://api.uber.com/v1.2/estimates/price?start_latitude=${loc.latitude}&start_longitude=${loc.longitude}&end_latitude=${dest.latitude}&end_longitude=${dest.longitude}")
val times = query<UberTimeEstimates>("https://api.uber.com/v1.2/estimates/time?start_latitude=${loc.latitude}&start_longitude=${loc.longitude}&end_latitude=${dest.latitude}&end_longitude=${dest.longitude}")
for (price in prices.prices) {
val time = times.times.find { it.productId == price.productId }
val timeEstimate = time?.estimate?.let { "${it / 60} min" } ?: "Unknown"
println(price.localizedDisplayName.padEnd(15) + "\t" + timeEstimate.padEnd(15) + "\t" + price.estimate);
}
- Bash completion of URLs
- Mac OSX Support
- Displays images in iTerm2
- Opens other media in Preview
- Saves oauth tokens in OSX Keychain
- Login (token generation) support and automatic authentication for
- OpenSC & Government ID Cards
- Managing Tokens
- Javascript scripting support
- Aliases "twitterapi /1.1/statuses/user_timeline.json"
- Location support
- HTTP/2 Support
- Websocket support
- Sharing Site Secrets (Client Ids etc)
$ brew install yschimke/tap/okurl
$ okurl --authorize twitter
$ okurl https://api.twitter.com/1.1/statuses/home_timeline.json
$ twitterapi /1.1/statuses/home_timeline.json
Optional Dependencies
$ brew install corelocationcli
$ brew install jq
Requires Java 8 and Mac OSX
$ brew cask install java
See Running for command options
$ brew install jq
$ git clone https://github.com/yschimke/okurl
$ cd https://github.com/yschimke/okurl
$ . use_dev.sh
$ okurl --authorize twitter
$ okurl https://api.twitter.com/1.1/statuses/user_timeline.json