urbanairship 3.0.2 → 3.1.0
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/.gitignore +2 -0
- data/CHANGELOG +13 -0
- data/README.rst +111 -0
- data/docs/Makefile +192 -0
- data/docs/channel_uninstall.rst +21 -0
- data/docs/conf.py +293 -0
- data/docs/devices.rst +54 -0
- data/docs/examples.rst +118 -0
- data/docs/exceptions.rst +17 -0
- data/docs/index.rst +83 -0
- data/docs/named_user.rst +101 -0
- data/docs/push.rst +416 -0
- data/docs/reports.rst +303 -0
- data/docs/segment.rst +97 -0
- data/docs/tags.rst +49 -0
- data/lib/urbanairship/client.rb +20 -17
- data/lib/urbanairship/common.rb +47 -3
- data/lib/urbanairship/devices/channel_tags.rb +73 -0
- data/lib/urbanairship/devices/channel_uninstall.rb +35 -0
- data/lib/urbanairship/devices/devicelist.rb +61 -0
- data/lib/urbanairship/devices/named_user.rb +87 -0
- data/lib/urbanairship/devices/segment.rb +109 -0
- data/lib/urbanairship/loggable.rb +1 -0
- data/lib/urbanairship/push/audience.rb +1 -0
- data/lib/urbanairship/push/push.rb +12 -18
- data/lib/urbanairship/push/schedule.rb +1 -0
- data/lib/urbanairship/reports/per_push.rb +97 -0
- data/lib/urbanairship/reports/response_statistics.rb +157 -0
- data/lib/urbanairship/version.rb +1 -1
- data/lib/urbanairship.rb +9 -4
- data/urbanairship.gemspec +2 -2
- metadata +44 -25
- data/README.md +0 -96
data/README.md
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
[](https://travis-ci.org/urbanairship/ruby-library)
|
2
|
-
|
3
|
-
# Urbanairship
|
4
|
-
|
5
|
-
`urbanairship` is a Ruby library for using the [Urban Airship](www.urbanairship.com) web service API for push notifications and rich app pages.
|
6
|
-
|
7
|
-
## Requirements
|
8
|
-
As of Version 3.0, a Ruby version >= 2.0 must be used.
|
9
|
-
|
10
|
-
## Functionality
|
11
|
-
|
12
|
-
####BETA Release
|
13
|
-
Version 3.0 is a major upgrade and backwards incompatible with earlier versions. This BETA release focuses on support for the new version 3 push API. There is also a major reorganization of the codebase.
|
14
|
-
|
15
|
-
Note: the BETA release only supports UA's ```/push/``` and ```/schedules/``` endpoints. Expanded support for UA's other endpoints will be in the forthcoming release.
|
16
|
-
|
17
|
-
####Forthcoming Release
|
18
|
-
To encourage the use of our SDK, which takes care of proper channel registration, support for device token registration will be removed. Support for v1 endpoints will also be removed and transitioned to their v3 equivalents where possible.
|
19
|
-
|
20
|
-
## Installation
|
21
|
-
|
22
|
-
If you have the ```bundler``` gem (if not you can get it with ```$ gem install bundler```) add this line to your application's Gemfile:
|
23
|
-
|
24
|
-
```ruby
|
25
|
-
gem 'urbanairship'
|
26
|
-
```
|
27
|
-
|
28
|
-
And then execute:
|
29
|
-
|
30
|
-
$ bundle
|
31
|
-
|
32
|
-
OR install it yourself as:
|
33
|
-
|
34
|
-
$ gem install urbanairship
|
35
|
-
|
36
|
-
## Usage
|
37
|
-
|
38
|
-
Once the gem has been installed you can start sending pushes! See http://docs.urbanairship.com/topic-guides/api-examples.html for more examples.
|
39
|
-
|
40
|
-
####Broadcast to All Devices
|
41
|
-
```ruby
|
42
|
-
require 'urbanairship'
|
43
|
-
UA = Urbanairship
|
44
|
-
airship = UA::Client.new(key:'application_key', secret:'master_secret')
|
45
|
-
p = airship.create_push
|
46
|
-
p.audience = UA.all
|
47
|
-
p.notification = UA.notification(alert: 'Hello')
|
48
|
-
p.device_types = UA.all
|
49
|
-
p.send_push
|
50
|
-
```
|
51
|
-
|
52
|
-
####Simple Tag Push
|
53
|
-
```ruby
|
54
|
-
require 'urbanairship'
|
55
|
-
UA = Urbanairship
|
56
|
-
airship = UA::Client.new(key:'application_key', secret:'master_secret')
|
57
|
-
p = airship.create_push
|
58
|
-
p.audience = UA.tag('some_tag')
|
59
|
-
p.notification = UA.notification(alert: 'Hello')
|
60
|
-
p.device_types = UA.all
|
61
|
-
p.send_push
|
62
|
-
```
|
63
|
-
|
64
|
-
## Questions
|
65
|
-
The best place to ask questions is our support site: http://support.urbanairship.com/
|
66
|
-
|
67
|
-
## Contributing
|
68
|
-
|
69
|
-
1. Fork it ( https://github.com/urbanairship/ruby-library )
|
70
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
71
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
72
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
73
|
-
5. Create a new Pull Request
|
74
|
-
6. Sign Urban Airship's [contribution agreement](http://urbanairship.com/legal/contribution-agreement)
|
75
|
-
Note: Changes will not be approved and merged without a signed contribution agreement
|
76
|
-
|
77
|
-
## Development
|
78
|
-
|
79
|
-
After checking out the repo, ensure you have ```bundler``` installed (```$ gem install bundler```) run
|
80
|
-
|
81
|
-
$ bin/setup
|
82
|
-
|
83
|
-
to install dependencies.
|
84
|
-
Then, run
|
85
|
-
|
86
|
-
$ bin/console
|
87
|
-
|
88
|
-
for an interactive prompt that will allow you to experiment.
|
89
|
-
|
90
|
-
OR you can build a local gem to play with:
|
91
|
-
|
92
|
-
$ gem build urbanairship.gemspec
|
93
|
-
$ gem install ./urbanairship-<VERSION>.gem
|
94
|
-
|
95
|
-
Having a local build will give you better logging if you are running into issues, but be careful to make sure to use our released
|
96
|
-
public gem in Production.
|