Skip to content

Commit 567eba2

Browse files
committed
Update docs
1 parent 0000fa6 commit 567eba2

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A Ruby toolkit for the [Drip](https://www.getdrip.com/) API.
66

77
Add this line to your application's Gemfile:
88

9-
gem 'drip-ruby', :require => 'drip'
9+
gem 'drip-ruby', :require => 'drip'
1010

1111
And then execute:
1212

@@ -46,12 +46,14 @@ as methods on the client object. The following methods are currently available:
4646
| Action | Method |
4747
| :------------------------- | :--------------------------------------------------- |
4848
| Create/update a subscriber | `#create_or_update_subscriber(email, options = {})` |
49+
| Create/update a batch of subscribers | `#create_or_update_subscribers(subscribers)` |
4950
| Fetch a subscriber | `#subscriber(id_or_email)` |
5051
| Subscribe to a campaign | `#subscribe(email, campaign_id, options = {})` |
5152
| Unsubscribe | `#unsubscribe(id_or_email, options = {})` |
5253
| Apply a tag | `#apply_tag(email, tag)` |
5354
| Remove a tag | `#remove_tag(email, tag)` |
5455
| Track an event | `#track_event(email, action, properties = {})` |
56+
| Track a batch of events | `#track_events(events)` |
5557

5658

5759
**Note:** We do not have complete API coverage yet. If we are missing an API method

lib/drip/client/events.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ def track_event(email, action, properties = {})
1818

1919
# Public: Track a collection of events all at once.
2020
#
21-
# events - Required. An Array with between 1 and 1000 objects containing event data.
22-
# - A hash containing event data.
23-
# - email - Required. The String email address of the subscriber.
24-
# - action - Required. The String event action.
25-
# - properties - Optional. A Hash of event properties.
21+
# events - Required. An Array of between 1 and 1000 Hashes of event data.
22+
# - email - Required. The String email address of the subscriber.
23+
# - action - Required. The String event action.
24+
# - properties - Optional. A Hash of event properties.
2625
#
2726
# Returns a Drip::Response.
2827
# See https://www.getdrip.com/docs/rest-api#event_batches

lib/drip/client/subscribers.rb

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,16 @@ def create_or_update_subscriber(email, options = {})
3535

3636
# Public: Create or update a collection of subscribers.
3737
#
38-
# subscribers - Required. An Array with between 1 and 1000 objects containing subscriber data
39-
# - A hash containing subscribers data.
40-
# - email - Required. The String subscriber email address.
41-
# - new_email - Optional. A new email address for the subscriber.
42-
# If provided and a subscriber with the email above
43-
# does not exist, this address will be used to
44-
# create a new subscriber.
45-
# - time_zone - Optional. The subscriber's time zone (in Olsen
46-
# format). Defaults to Etc/UTC.
47-
# - custom_fields - Optional. A Hash of custom field data.
48-
# - tags - Optional. An Array of tags.
38+
# subscribers - Required. An Array of between 1 and 1000 Hashes of subscriber data.
39+
# - email - Required. The String subscriber email address.
40+
# - new_email - Optional. A new email address for the subscriber.
41+
# If provided and a subscriber with the email above
42+
# does not exist, this address will be used to
43+
# create a new subscriber.
44+
# - time_zone - Optional. The subscriber's time zone (in Olsen
45+
# format). Defaults to Etc/UTC.
46+
# - custom_fields - Optional. A Hash of custom field data.
47+
# - tags - Optional. An Array of tags.
4948
#
5049
# Returns a Drip::Response
5150
# See https://www.getdrip.com/docs/rest-api#subscriber_batches

0 commit comments

Comments
 (0)