Reverse-engineered from the bahn.de web frontend. All endpoints are HTTP GET, return JSON, and require browser-like headers to avoid bot detection. No authentication token is needed, but the headers below are essential.
https://www.bahn.de/web/api
| ## Create Let's Encrypt certificate for DOMAIN and www subdomain of DOMAIN. | |
| DOMAIN=example.com | |
| EMAIL=noreply@example.com | |
| .PHONY: default install generate | |
| default: install | |
| install: |
| extension URLResponse { | |
| /// Returns casted `HTTPURLResponse` | |
| var http: HTTPURLResponse? { | |
| return self as? HTTPURLResponse | |
| } | |
| } | |
| extension HTTPURLResponse { | |
| /// Returns `true` if `statusCode` is in range 200...299. | |
| /// Otherwise `false`. |
| ### Keybase proof | |
| I hereby claim: | |
| * I am messeb on github. | |
| * I am messeb (https://keybase.io/messeb) on keybase. | |
| * I have a public key ASBdLKgcqx4kpDUor-OwoWOn0gG3sHXSQNxwtsDREhckpwo | |
| To claim this, I am signing this object: |
| UIViewController *vc = // ViewController | |
| id mockVC = [OCMockObject partialMockForObject:vc]; | |
| UIButton *button = // Button on view of ViewController | |
| UIStoryboardSegue *storyBoardSegue = [OCMArg checkWithBlock:^BOOL(id obj){ | |
| UIStoryboardSegue *segue = obj; | |
| UIViewController *src = segue.sourceViewController; | |
| UIViewController *dst = segue.destinationViewController; | |
| NSString *idtf = segue.identifier; |