brazify 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5416cc59a3bd2a6575aa63657894a808a9d576c088070bb909b5480db40683b
4
- data.tar.gz: bd762347c45c4370744225663254d28a113129eb3799cb6d23941fce600c2c10
3
+ metadata.gz: cc58feb45ba6d1cd125066429494dd7d66601fee195f625fb046d14c97abd26c
4
+ data.tar.gz: 226eddd568eedb1cbce8a142b4604dfa5fd4cf1f1cf60c9287b22b02a20661a8
5
5
  SHA512:
6
- metadata.gz: ed62ad3e3a3136379df9cb9c97b8b497b54c9a3ba85f6ece6bff62092c6808385eebac764aae5fc40e308150f179a830bedf45c4181dda56be9d9062b36b44ba
7
- data.tar.gz: 8443ed47d96c18e21d809c4bd296f30042b280295ae8a8fe5a47a95de8800d92c802437966063a8f1543ebb47aa97bb8c66745e9999544438cfb6a0c50678808
6
+ metadata.gz: 233a5c70777c1f752ba4dc65f816066da747b380261e08bf04cd0617d6dce6bc47c01263a98f8e1bad4469addee8633b11060661fd6cbbb3334fc911884bc165
7
+ data.tar.gz: ea79e3206e6f4598d92b43a15c9d64f522cdc1e6e30d8b2ccdded1aefb49b4f451c869d233679a0b7cc74e52a055a843fb201f4de23b4342227ea611fe18ec05
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.2.0](https://github.com/Portify/brazify/tree/v0.2.0) (2021-11-18)
4
+
5
+ **Merged pull requests:**
6
+
7
+ - Make release jobs dependent on test workflow success [\#2](https://github.com/Portify/brazify/pull/2)
8
+ - Script for automating gem releases [\#1](https://github.com/Portify/brazify/pull/1)
3
9
 
4
10
  ## [v0.1.0](https://github.com/Portify/brazify/tree/v0.1.0) (2021-11-12)
5
11
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brazify (0.2.0)
4
+ brazify (0.2.1)
5
5
  faraday (~> 1.8)
6
6
  faraday_middleware (~> 1.2)
7
7
 
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Brazify
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/brazify`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Wrapper library that provides convenient access to the Braze REST API from applications written in Ruby.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ## Documentation
6
+
7
+ See the [Braze REST API docs](https://www.braze.com/docs/api/basics/).
6
8
 
7
9
  ## Installation
8
10
 
@@ -20,9 +22,124 @@ Or install it yourself as:
20
22
 
21
23
  $ gem install brazify
22
24
 
25
+ ## Requirements
26
+
27
+ - Ruby 2.7+.
28
+
23
29
  ## Usage
24
30
 
25
- TODO: Write usage instructions here
31
+ ### Configuration
32
+
33
+ The library needs to be configured with your braze account's API key and an optional base URL. Set Braze.api_key to its value:
34
+
35
+ ```ruby
36
+ # initializers/brazify.rb
37
+
38
+ Braze.api_key = 'braze-api-key...'
39
+ Braze.base_url = 'braze-base-url...'
40
+ ```
41
+
42
+ ### Resources
43
+
44
+ #### Email
45
+
46
+ ```ruby
47
+ Brazify::Email.update_status(
48
+ email: 'john_doe@mail.com',
49
+ subscription_state: 'subscribed'
50
+ )
51
+ ```
52
+
53
+ ```ruby
54
+ Brazify::Email.blacklist(
55
+ email: 'john_doe@mail.com'
56
+ )
57
+ ```
58
+
59
+ #### User
60
+
61
+ ```ruby
62
+ Brazify::User.delete(
63
+ external_ids: ['123', '456'],
64
+ user_aliases: ['john_doe'], #optional
65
+ braze_ids: ['789'] #optional
66
+ )
67
+ ```
68
+
69
+ ```ruby
70
+ Brazify::User.track(
71
+ attributes: [
72
+ {
73
+ external_id: 'user_identifier',
74
+ string_attribute: 'fruit',
75
+ boolean_attribute_1: true,
76
+ integer_attribute: 25,
77
+ array_attribute: %w[banana apple]
78
+ }
79
+ ],
80
+ events: [
81
+ {
82
+ external_id: 'user_identifier',
83
+ app_id: 'app_identifier',
84
+ name: 'watched_trailer',
85
+ time: '2013-07-16T19:20:30+1:00'
86
+ }
87
+ ],
88
+ purchases: [
89
+ {
90
+ external_id: 'user_identifier',
91
+ app_id: 'app_identifier',
92
+ product_id: 'product_name',
93
+ currency: 'USD',
94
+ price: 12.12,
95
+ quantity: 6,
96
+ time: '2017-05-12T18:47:12Z',
97
+ properties: {
98
+ integer_property: 3,
99
+ string_property: 'Russell',
100
+ date_property: '2014-02-02T00:00:00Z'
101
+ }
102
+ }
103
+ ]
104
+ )
105
+ ```
106
+
107
+ #### Event
108
+
109
+ ```ruby
110
+ Brazify::Event.list
111
+ ```
112
+
113
+ ```ruby
114
+ Brazify::Event.retrieve_analytics(
115
+ event: 'event_name',
116
+ length: 24,
117
+ options: {
118
+ unit: 'hour',
119
+ ending_at: '2014-12-10T23:59:59-05:00'
120
+ }
121
+ )
122
+ ```
123
+
124
+ #### Segment
125
+
126
+ ```ruby
127
+ Brazify::Segment.list
128
+ ```
129
+
130
+ ```ruby
131
+ Brazify::Segment.retrieve(
132
+ segment_id: 123
133
+ )
134
+ ```
135
+
136
+ ```ruby
137
+ Brazify::Segment.retrieve_analytics(
138
+ segment_id: '123',
139
+ length: 14,
140
+ ending_at: '2018-06-27T23:59:59-5:00'
141
+ )
142
+ ```
26
143
 
27
144
  ## Development
28
145
 
@@ -42,7 +159,7 @@ The CI will then handle creating a github release, updating the changelog and pu
42
159
 
43
160
  ## Contributing
44
161
 
45
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/brazify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/brazify/blob/master/CODE_OF_CONDUCT.md).
162
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Portify/brazify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Portify/brazify/blob/master/CODE_OF_CONDUCT.md).
46
163
 
47
164
 
48
165
  ## License
@@ -51,4 +168,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
51
168
 
52
169
  ## Code of Conduct
53
170
 
54
- Everyone interacting in the Brazify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/brazify/blob/master/CODE_OF_CONDUCT.md).
171
+ Everyone interacting in the Brazify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Portify/brazify/blob/master/CODE_OF_CONDUCT.md).
data/brazify.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = spec.summary
13
13
  spec.homepage = 'https://github.com/Portify/brazify'
14
14
  spec.license = 'MIT'
15
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
15
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
16
16
 
17
17
  spec.metadata['homepage_uri'] = spec.homepage
18
18
  spec.metadata['source_code_uri'] = spec.homepage
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Brazify
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brazify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Bates, Maksim Fedotov
@@ -194,7 +194,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
194
  requirements:
195
195
  - - ">="
196
196
  - !ruby/object:Gem::Version
197
- version: 2.5.0
197
+ version: 2.7.0
198
198
  required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  requirements:
200
200
  - - ">="