We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 977295f + 667d8d3 commit bc77c77Copy full SHA for bc77c77
1 file changed
README.md
@@ -83,6 +83,27 @@ for a complete API reference.
83
84
Here are some common use cases for the API client.
85
86
+###Fetching user accounts
87
+
88
+Once you have an access token for a Drip user, you can fetch their accounts.
89
90
+Initialize your client and pull down the user's accounts. To make further calls, set the account_id
91
+on your client to the account you want to access.
92
93
+```ruby
94
+client = Drip::Client.new do |c|
95
+ c.access_token = "YOUR_ACCESS_TOKEN"
96
+end
97
98
+resp = client.accounts
99
+# => <Drip::Response ...>
100
101
+account_id = resp.accounts.first.id
102
+# => "9999999"
103
104
+client.account_id = account_id
105
+```
106
107
### Fetching subscriber data
108
109
Subscribers can be looked up by their email address or by their Drip subscriber
0 commit comments