statuspageio 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/lib/statuspageio/client/incident.rb +5 -0
- data/lib/statuspageio/client.rb +2 -2
- data/lib/statuspageio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 455366f8c25d2bd8a353e87ab53e901931309885
|
4
|
+
data.tar.gz: 07e0b6066a8ae714c53e887ab63c0b69576678e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732126728c8c13f95d35b098148aab6d1b4be0c7c7ea5f4f894a434371f1fca10087f4a6a858dced79011ab39fdfc5faffd522d6b99c1af9990217ea35edfcd2
|
7
|
+
data.tar.gz: 232322e3ef9c3010277c7df6f69c2545dd2531cb11e19567eaea9e498fb327c9755803b0aa17faeb408a7c0f934cb070bf11ebc097a7b5f565b014eec3fe4937
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Statuspageio
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Ruby gem for the [Statuspage REST API](https://developer.statuspage.io).
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,23 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
##### In plain Ruby
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
client = Statuspageio::Client.new(api_key: '<your_api_key>', page_id: '<your_page_id>')
|
27
|
+
client.incidents(:all) # get a list of all your incidents
|
28
|
+
```
|
29
|
+
|
30
|
+
##### In Rails you can configure using an initializer
|
31
|
+
|
32
|
+
`config/intializers/statuspage.rb`
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
Statuspageio.configure do |config|
|
36
|
+
config.api_key = ENV['STATUSPAGE_API_KEY']
|
37
|
+
config.page_id = ENV['STATUSPAGE_PAGE_ID']
|
38
|
+
end
|
39
|
+
```
|
26
40
|
|
27
41
|
## Development
|
28
42
|
|
data/lib/statuspageio/client.rb
CHANGED
@@ -38,8 +38,8 @@ module Statuspageio
|
|
38
38
|
self.class.handle_response(self.class.delete("#{path}.json", headers: headers))
|
39
39
|
end
|
40
40
|
|
41
|
-
def get(path)
|
42
|
-
self.class.handle_response(self.class.get("#{path}.json", headers: headers))
|
41
|
+
def get(path, query = {})
|
42
|
+
self.class.handle_response(self.class.get("#{path}.json", query: query, headers: headers))
|
43
43
|
end
|
44
44
|
|
45
45
|
def post(path, data = {})
|
data/lib/statuspageio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statuspageio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|