boxcar_publisher 1.0.0 → 1.0.1
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 +15 -2
- data/boxcar_publisher-1.0.0.gem +0 -0
- data/boxcar_publisher.gemspec +1 -1
- data/lib/boxcar_publisher.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b985b49865d8beec8fff112190e0511d650bff3
|
|
4
|
+
data.tar.gz: f11f1c40339da2e7c88993f6477e9a13b9911896
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0d816dd768bf814133d443cee6af6fc3bb050251526a52dcf64075433dd817e3bd76f2333be8b50839e319815290b750619b38fe47571eb392b23cae2445cdf
|
|
7
|
+
data.tar.gz: c03a9703f2a56858971d1bc7baef973fa87b2a47ee3373895bc41aabf7922177eea4efcd0d7ad81c1f687869d93141dcd2358def9a0f81b774c2666a6f81bf36
|
data/README.md
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
boxcar\_publisher
|
|
2
2
|
=================
|
|
3
3
|
|
|
4
|
+
A simple Ruby interface to the [Boxcar Push API](http://developer.boxcar.io/api/publisher/).
|
|
5
|
+
|
|
4
6
|
Installation
|
|
5
7
|
-----
|
|
6
8
|
|
|
7
|
-
```
|
|
9
|
+
```ruby
|
|
8
10
|
gem install boxcar_publisher
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
Usage
|
|
12
14
|
-----
|
|
13
15
|
|
|
14
|
-
```
|
|
16
|
+
```ruby
|
|
15
17
|
BoxcarPublisher.setup do |config|
|
|
16
18
|
config.access_key 'THIS_IS_MY_ACCESS_KEY'
|
|
17
19
|
config.secret_key 'THIS_IS_MY_SECRET_KEY'
|
|
18
20
|
end
|
|
19
21
|
|
|
22
|
+
# Create a new push notification (POST /api/push)
|
|
23
|
+
# Returns a BoxcarPublisher::Push instance
|
|
20
24
|
push = BoxcarPublisher::Push.new aps: { alert: 'Hello world' }, tags: ['@all'], id: '12345'
|
|
25
|
+
# => #<BoxcarPublisher::Push:0x007f8491892ea8 @id="472317", @url="http://boxcar-api.io/api/push/472317">
|
|
21
26
|
push.id
|
|
22
27
|
# => 12345
|
|
28
|
+
|
|
29
|
+
# Get the state of an existing push (GET /api/push/{id})
|
|
30
|
+
# Returns a hash with the current state of the push
|
|
23
31
|
push.state
|
|
24
32
|
# => {:state=>"delivered", :created_at=>2015-05-27 22:28:10 -0700, :last_delivered_at=>2015-05-27 22:28:10 -0700, :sent=>1, :errors=>0, :opened=>0}
|
|
33
|
+
|
|
34
|
+
# Delete a queued push (DELETE /api/push/{id})
|
|
35
|
+
# Returns nil on success; raises an error on failure
|
|
36
|
+
push.delete
|
|
37
|
+
# => nil
|
|
25
38
|
```
|
|
Binary file
|
data/boxcar_publisher.gemspec
CHANGED
data/lib/boxcar_publisher.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: boxcar_publisher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tony Novak
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -46,6 +46,7 @@ extra_rdoc_files: []
|
|
|
46
46
|
files:
|
|
47
47
|
- LICENSE
|
|
48
48
|
- README.md
|
|
49
|
+
- boxcar_publisher-1.0.0.gem
|
|
49
50
|
- boxcar_publisher.gemspec
|
|
50
51
|
- lib/boxcar_publisher.rb
|
|
51
52
|
homepage: http://rubygems.org/gems/boxcar_publisher
|