urbanairship 10.0.1 → 10.0.2
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/.github/workflows/ci.yaml +1 -1
- data/CHANGELOG +4 -0
- data/docs/conf.py +2 -2
- data/docs/devices.rst +2 -2
- data/docs/email.rst +1 -1
- data/docs/index.rst +1 -1
- data/docs/named_user.rst +1 -1
- data/docs/push.rst +4 -4
- data/lib/urbanairship/version.rb +1 -1
- data/urbanairship.gemspec +1 -1
- metadata +3 -4
- data/bin/test.rb +0 -157
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 599f8e6c8b0eb1a8c50a9e9c397ccfa8e47e86e0eab9b9bfe35e0987ae1cef72
|
|
4
|
+
data.tar.gz: 070e8a804a7bdaa4dd0d052598f7e747463d937a2f2a755a6bebe95f403fb37b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd6fb64d29d4be182417382e46edb002544f8b301c1b46fce26dc88d35196fac76a0cc785848d310eaf9a69a2cd52a5d2d4fd02c0143fbb865cd2237629b86b4
|
|
7
|
+
data.tar.gz: 69e41ed9a1bad0fa40d85653123b861651852996d0406e7c3b3b96b124da7156f2cf581b4e0e090904caf5d24c9338ee88c0fe3d58e583819aac948ba84e1b64
|
data/.github/workflows/ci.yaml
CHANGED
data/CHANGELOG
CHANGED
data/docs/conf.py
CHANGED
|
@@ -33,7 +33,7 @@ needs_sphinx = '1.6.7'
|
|
|
33
33
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
34
34
|
# ones.
|
|
35
35
|
|
|
36
|
-
extensions = ['
|
|
36
|
+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx_rtd_theme']
|
|
37
37
|
|
|
38
38
|
# Add any paths that contain templates here, relative to this directory.
|
|
39
39
|
templates_path = ['_templates']
|
|
@@ -70,7 +70,7 @@ for line in file:
|
|
|
70
70
|
file.close()
|
|
71
71
|
#
|
|
72
72
|
# The short X.Y version.
|
|
73
|
-
version = re.match('\d
|
|
73
|
+
version = re.match(r'\d+\.\d+', release).group()
|
|
74
74
|
|
|
75
75
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
76
76
|
# for a list of supported languages.
|
data/docs/devices.rst
CHANGED
|
@@ -5,7 +5,7 @@ Channel Listing
|
|
|
5
5
|
---------------
|
|
6
6
|
|
|
7
7
|
Device lists are fetched by instantiating an iterator object
|
|
8
|
-
using
|
|
8
|
+
using ``ChannelList``. For more information, see `the API
|
|
9
9
|
documentation for channels <http://docs.airship.com/api/ua.html#channels>`_.
|
|
10
10
|
The ``count`` method will give you the number of channels over which you have iterated.
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ Channel Lookup
|
|
|
26
26
|
--------------
|
|
27
27
|
|
|
28
28
|
Device metadata is fetched for a specific channel by using
|
|
29
|
-
|
|
29
|
+
``ChannelInfo`` with the method ``lookup(uuid: 'uuid')``.
|
|
30
30
|
|
|
31
31
|
.. code-block:: ruby
|
|
32
32
|
|
data/docs/email.rst
CHANGED
data/docs/index.rst
CHANGED
|
@@ -26,7 +26,7 @@ Using the library
|
|
|
26
26
|
|
|
27
27
|
The library is intended to be used with the small footprint of a single
|
|
28
28
|
import. To get started, import the package, and create an
|
|
29
|
-
|
|
29
|
+
``Airship`` object representing a single Airship project.
|
|
30
30
|
|
|
31
31
|
The library uses `rest-client <https://github.com/rest-client/rest-client>`_ for communication with the Airship API.
|
|
32
32
|
|
data/docs/named_user.rst
CHANGED
|
@@ -5,7 +5,7 @@ Named User Listing
|
|
|
5
5
|
------------------
|
|
6
6
|
|
|
7
7
|
Named User lists are fetched by instantiating an iterator object
|
|
8
|
-
using
|
|
8
|
+
using ``NamedUserList``.
|
|
9
9
|
For more information, see `the API documentation
|
|
10
10
|
<http://docs.airship.com/api/ua.html#listing>`__
|
|
11
11
|
|
data/docs/push.rst
CHANGED
|
@@ -455,7 +455,7 @@ attributes, the notification is ready for delivery.
|
|
|
455
455
|
|
|
456
456
|
push.send_push
|
|
457
457
|
|
|
458
|
-
If the delivery is unsuccessful, an
|
|
458
|
+
If the delivery is unsuccessful, an ``AirshipFailure`` exception
|
|
459
459
|
will be raised.
|
|
460
460
|
|
|
461
461
|
|
|
@@ -477,7 +477,7 @@ minute.
|
|
|
477
477
|
response = schedule.send_push
|
|
478
478
|
print ("Created schedule. url: " + response.schedule_url)
|
|
479
479
|
|
|
480
|
-
If the schedule is unsuccessful, an
|
|
480
|
+
If the schedule is unsuccessful, an ``AirshipFailure``
|
|
481
481
|
exception will be raised.
|
|
482
482
|
|
|
483
483
|
|
|
@@ -499,7 +499,7 @@ local time.
|
|
|
499
499
|
response = schedule.send_push
|
|
500
500
|
print ("Created schedule. url: " + response.schedule_url)
|
|
501
501
|
|
|
502
|
-
If the schedule is unsuccessful, an
|
|
502
|
+
If the schedule is unsuccessful, an ``AirshipFailure`` exception
|
|
503
503
|
will be raised.
|
|
504
504
|
|
|
505
505
|
Scheduled Delivery for Optimal Send Time
|
|
@@ -519,7 +519,7 @@ This example schedules the above notification delivery for optimal send time.
|
|
|
519
519
|
response = schedule.send_push
|
|
520
520
|
print ("Created schedule. url: " + response.schedule_url)
|
|
521
521
|
|
|
522
|
-
If the schedule is unsuccessful, an
|
|
522
|
+
If the schedule is unsuccessful, an ``AirshipFailure`` exception
|
|
523
523
|
will be raised.
|
|
524
524
|
|
|
525
525
|
.. note::
|
data/lib/urbanairship/version.rb
CHANGED
data/urbanairship.gemspec
CHANGED
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.require_paths = ['lib']
|
|
29
29
|
|
|
30
30
|
spec.add_runtime_dependency 'rest-client', '>= 1.4', '< 4.0'
|
|
31
|
-
spec.add_runtime_dependency 'jwt', '>= 2.0', '<
|
|
31
|
+
spec.add_runtime_dependency 'jwt', '>= 2.0', '< 4.0'
|
|
32
32
|
spec.add_runtime_dependency 'csv', '~> 3.0'
|
|
33
33
|
|
|
34
34
|
spec.add_development_dependency 'bundler', '>= 1', '< 3.0'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: urbanairship
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.0.
|
|
4
|
+
version: 10.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Airship
|
|
@@ -38,7 +38,7 @@ dependencies:
|
|
|
38
38
|
version: '2.0'
|
|
39
39
|
- - "<"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
41
|
+
version: '4.0'
|
|
42
42
|
type: :runtime
|
|
43
43
|
prerelease: false
|
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -48,7 +48,7 @@ dependencies:
|
|
|
48
48
|
version: '2.0'
|
|
49
49
|
- - "<"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
|
-
version: '
|
|
51
|
+
version: '4.0'
|
|
52
52
|
- !ruby/object:Gem::Dependency
|
|
53
53
|
name: csv
|
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -191,7 +191,6 @@ files:
|
|
|
191
191
|
- Rakefile
|
|
192
192
|
- bin/console
|
|
193
193
|
- bin/setup
|
|
194
|
-
- bin/test.rb
|
|
195
194
|
- docs/Makefile
|
|
196
195
|
- docs/ab_tests.rst
|
|
197
196
|
- docs/attributes.rst
|
data/bin/test.rb
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
require 'bundler/setup'
|
|
2
|
-
require 'urbanairship'
|
|
3
|
-
require 'jwt'
|
|
4
|
-
require 'irb'
|
|
5
|
-
|
|
6
|
-
UA = Urbanairship
|
|
7
|
-
class TestAssertion
|
|
8
|
-
def initialize
|
|
9
|
-
private_key_str = '-----BEGIN PRIVATE KEY-----
|
|
10
|
-
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDA28b5fiRI++skfIZxW
|
|
11
|
-
NtXKb80u7CJ7OoHLDFw0Eur2Y9OA2UImJe4WtAAAYaUJOXKhZANiAARf1nJMSvZe
|
|
12
|
-
NnVsOKi48Sre0Ei/45LD+EMjCJo0Ey0rYxXVtyNLWYecCsRxbPOOir4SBgpuETD4
|
|
13
|
-
iKOqhidZxaNxBWEDAvLdEV5SzCDqVWbuKhTIhzqc2AY46XphAPVYQbI=
|
|
14
|
-
-----END PRIVATE KEY-----
|
|
15
|
-
'
|
|
16
|
-
@oauth = UA::Oauth.new(
|
|
17
|
-
client_id: 'OKFei6zAR6K28VraONAltw',
|
|
18
|
-
key: 'vNziktxBTIqn6-_5mXUdZw',
|
|
19
|
-
assertion_private_key: private_key_str,
|
|
20
|
-
# scopes: ['psh', 'chn'],
|
|
21
|
-
# ip_addresses: ['50.47.131.20/22']
|
|
22
|
-
)
|
|
23
|
-
@airship = UA::Client.new(key:'vNziktxBTIqn6-_5mXUdZw', oauth: @oauth)
|
|
24
|
-
end
|
|
25
|
-
def send_broadcast_message
|
|
26
|
-
p = @airship.create_push
|
|
27
|
-
p.audience = UA.all
|
|
28
|
-
p.notification = UA.notification(alert: 'Hello')
|
|
29
|
-
p.device_types = UA.device_types(['web'])
|
|
30
|
-
response = p.send_push
|
|
31
|
-
puts response.payload
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def channel_listing
|
|
35
|
-
channel_list = UA::ChannelList.new(client: @airship)
|
|
36
|
-
channel_list.each do |channel|
|
|
37
|
-
puts(channel)
|
|
38
|
-
end
|
|
39
|
-
puts(channel_list.count)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def register_email
|
|
43
|
-
email_channel = UA::Email.new(client: @airship)
|
|
44
|
-
email_channel.type = 'email'
|
|
45
|
-
email_channel.commercial_opted_in = '2020-10-28T10:34:22'
|
|
46
|
-
email_channel.address = 'jade.westover+neato@airship.com'
|
|
47
|
-
email_channel.timezone = 'America/Los_Angeles'
|
|
48
|
-
email_channel.locale_country = 'US'
|
|
49
|
-
email_channel.locale_language = 'en'
|
|
50
|
-
email_channel.register
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def update_email
|
|
54
|
-
email_channel = UA::Email.new(client: @airship)
|
|
55
|
-
email_channel.click_tracking_opted_in = '2018-10-28T10:34:22'
|
|
56
|
-
email_channel.open_tracking_opted_in = '2018-10-28T10:34:22'
|
|
57
|
-
email_channel.type = 'email'
|
|
58
|
-
email_channel.commercial_opted_in = '2020-10-28T10:34:22'
|
|
59
|
-
# email_channel.suppression_state = 'imported'
|
|
60
|
-
# email_channel.address = 'jade.westover+neato@airship.com'
|
|
61
|
-
email_channel.timezone = 'America/Los_Angeles'
|
|
62
|
-
email_channel.locale_country = 'US'
|
|
63
|
-
email_channel.locale_language = 'en'
|
|
64
|
-
email_channel.channel_id = '49146a45-6356-4427-bad9-8288ae9254b4'
|
|
65
|
-
puts email_channel.channel_id
|
|
66
|
-
puts email_channel.address
|
|
67
|
-
email_channel.update
|
|
68
|
-
end
|
|
69
|
-
def replace_email
|
|
70
|
-
email_channel = UA::Email.new(client: @airship)
|
|
71
|
-
email_channel.click_tracking_opted_in = '2018-10-28T10:34:22'
|
|
72
|
-
email_channel.open_tracking_opted_in = '2018-10-28T10:34:22'
|
|
73
|
-
email_channel.type = 'email'
|
|
74
|
-
email_channel.commercial_opted_in = '2020-10-28T10:34:22'
|
|
75
|
-
# email_channel.suppression_state = 'imported'
|
|
76
|
-
email_channel.address = 'jade.westover+rubyemailtest12345@airship.com'
|
|
77
|
-
email_channel.timezone = 'America/Los_Angeles'
|
|
78
|
-
email_channel.locale_country = 'US'
|
|
79
|
-
email_channel.locale_language = 'en'
|
|
80
|
-
email_channel.channel_id = '49146a45-6356-4427-bad9-8288ae9254b4'
|
|
81
|
-
email_channel.replace
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def get_email
|
|
85
|
-
email_channel = UA::Email.new(client: @airship)
|
|
86
|
-
email_channel.address = 'jade.westover+rubyemailtest12345@airship.com'
|
|
87
|
-
email_channel.lookup
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# def verify_key
|
|
91
|
-
# @oauth.verify_public_key
|
|
92
|
-
# end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
class TestBasic
|
|
96
|
-
def initialize
|
|
97
|
-
@airship = UA::Client.new(key:'vNziktxBTIqn6-_5mXUdZw', secret: 'yZb9CYoSQkeSO5kVpwgArg')
|
|
98
|
-
|
|
99
|
-
def send_broadcast_message
|
|
100
|
-
p = @airship.create_push
|
|
101
|
-
p.audience = UA.all
|
|
102
|
-
p.notification = UA.notification(alert: 'Hello')
|
|
103
|
-
p.device_types = UA.device_types(['web'])
|
|
104
|
-
response = p.send_push
|
|
105
|
-
puts response.payload
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
def channel_listing
|
|
109
|
-
channel_list = UA::ChannelList.new(client: @airship)
|
|
110
|
-
channel_list.each do |channel|
|
|
111
|
-
puts(channel)
|
|
112
|
-
end
|
|
113
|
-
puts(channel_list.count)
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
class TestBearer
|
|
119
|
-
def initialize
|
|
120
|
-
@airship = UA::Client.new(key:'vNziktxBTIqn6-_5mXUdZw', token: 'MTp2Tnppa3R4QlRJcW42LV81bVhVZFp3OjNGdkxrTzhwZ3gxMnp5WGhnZGZYMzhSYjNBWFo3ZHR2anYwMzR1SFBOWjg')
|
|
121
|
-
|
|
122
|
-
def send_broadcast_message
|
|
123
|
-
p = @airship.create_push
|
|
124
|
-
p.audience = UA.all
|
|
125
|
-
p.notification = UA.notification(alert: 'Hello')
|
|
126
|
-
p.device_types = UA.device_types(['web'])
|
|
127
|
-
response = p.send_push
|
|
128
|
-
puts response.payload
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
def channel_listing
|
|
132
|
-
channel_list = UA::ChannelList.new(client: @airship)
|
|
133
|
-
channel_list.each do |channel|
|
|
134
|
-
puts(channel)
|
|
135
|
-
end
|
|
136
|
-
puts(channel_list.count)
|
|
137
|
-
end
|
|
138
|
-
end
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# ta = TestAssertion.new
|
|
142
|
-
IRB.start
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
# ta = TestAssertion.new
|
|
146
|
-
# ta.send_broadcast_message
|
|
147
|
-
# ta.channel_listing
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
# tb = TestBasic.new
|
|
152
|
-
# tb.send_broadcast_message
|
|
153
|
-
# tb.channel_listing
|
|
154
|
-
|
|
155
|
-
# tbr = TestBearer.new
|
|
156
|
-
# tbr.send_broadcast_message
|
|
157
|
-
# tbr.channel_listing
|