https://github.com/keith/ksgithubstatusapi
A simple Objective-C API controller for status.github.com
https://github.com/keith/ksgithubstatusapi
Last synced: 8 months ago
JSON representation
A simple Objective-C API controller for status.github.com
- Host: GitHub
- URL: https://github.com/keith/ksgithubstatusapi
- Owner: keith
- License: mit
- Created: 2013-01-03T19:27:43.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-07-23T16:56:37.000Z (almost 12 years ago)
- Last Synced: 2025-01-16T22:43:20.154Z (over 1 year ago)
- Language: Objective-C
- Size: 547 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KSGithubStatusAPI
This API Controller use Github's [system status API](https://github.com/blog/1348-github-system-status-api) and returns the current status
## Usage
```objc
KSGithubStatusAPI *statusAPI = [[KSGithubStatusAPI alloc] init];
[statusAPI checkStatus:^(KSGithubStatus *status) {
if (status.isAvailable) {
NSLog(@"Github is available");
} else {
NSLog(@"Github isn't available");
}
NSLog(@"Status: %@", status.status);
NSLog(@"Details: %@", status.details);
NSLog(@"Last Checked: %@", status.readableCreatedAtDate);
NSLog(@"Last Checked: %@", statusAPI.readableLastCheckedDate);
NSLog(@"Github updated date: %@", status.readableGithubUpdatedDate);
}];
```
### Installation
1. Use [CocoaPods](http://cocoapods.org/), in your Podfile
pod 'KSGithubStatusAPI', '~> 0.2.0'
2. Add [Reachability](https://github.com/tonymillion/Reachability) to your project. Add all `.h` and `.m` files to your project.