ontraport_api 0.1.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a9c8999a20018aa968a518686e421690f37ba41
4
- data.tar.gz: 9e8ecc30e3988402976626eda06511099f6e0416
3
+ metadata.gz: 09c473e460cc3c2705a8035e0481535a7f7138c3
4
+ data.tar.gz: af3a6c1f4815d4f2fdd33a5a8e949b4b6593123c
5
5
  SHA512:
6
- metadata.gz: b43976b869094a0d383c91badd6dc613b5e3e8b9e533925ab2da4a033e5d208e7102d94ff0d476fc07ad54862bc882e79f9e942ce7fa7b33db87f81e66b176fe
7
- data.tar.gz: 495671c6d545ffa750c2ec319ed56d5dab061cdf5a8d8daf1ddcf2cb51b514baf48c3a6988caf007717ab935d8f4ae8ae40fd77f696479490433efc05bd8ad9b
6
+ metadata.gz: 973865d6d5bf7e2de3b4a873e22011368739ae9d0b98fc228728d639b87577472dfc86e2a205919de794ea4d1c0184cda4065c1c418f7a1e0a95be9b314a92e6
7
+ data.tar.gz: 1e74c9a5152ec047639906dc2279f1351762ea15ee4a97670ae09cd843c6f56e9fb13f3d86b5e1ced70eeceaa1e3a04cdcf898e1e8ea5b2203f5f2c36017eb12
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # OntraportApi
1
+ # Ontraport API
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ontraport_api.svg)](http://badge.fury.io/rb/ontraport_api)
4
4
 
@@ -69,6 +69,12 @@ client.get_sequences(conditions) # Get all sequences
69
69
  client.get_sequences_by_<field_name>(value) # Wildcard alias to client.get_sequences("<field_name> = 'value'")
70
70
  ```
71
71
 
72
+ ### Contact Sequences (experimental)
73
+
74
+ ```ruby
75
+ client.add_sequence_to_contact(sequence_drip_id, contact_id) # Add Sequence to Contact
76
+ ```
77
+
72
78
  See https://api.ontraport.com/doc/ on details of parameters.
73
79
 
74
80
  ## Contributing
@@ -98,6 +104,9 @@ Otherwise, they're missing because I haven't got to them yet. Check the TODO lis
98
104
 
99
105
  ## Release Notes
100
106
 
107
+ #### v0.1.1
108
+ - Add Contact Sequence API
109
+
101
110
  #### v0.1.0
102
111
  - Fix bug on PUT methods
103
112
  - Fix bug on add / remove Contact Tags
@@ -62,7 +62,7 @@ module OntraportApi
62
62
  def query(method, path, payload = {})
63
63
  raise InvalidAPIMethodOrPath if [method, path].any? { |w| w !~ blank_regex } || ![:get, :post, :put, :delete].include?(method)
64
64
  response = self.class.send(method, path, query: payload, body: payload, headers: api_credentials_headers )
65
- response.parsed_response
65
+ response.parsed_response['data']
66
66
  rescue JSON::ParserError => e
67
67
  {
68
68
  'error' => true,
@@ -1,3 +1,3 @@
1
1
  module OntraportApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ontraport_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Ngu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-10 00:00:00.000000000 Z
11
+ date: 2015-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler