zernio-sdk 0.0.550 → 0.0.552
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/README.md +73 -75
- data/docs/AdAccountsApi.md +915 -0
- data/docs/AdCampaignsApi.md +615 -15
- data/docs/AdCreativesApi.md +815 -0
- data/docs/AdInsightsApi.md +415 -0
- data/docs/AdTargetingApi.md +371 -0
- data/docs/AnalyticsApi.md +7 -7
- data/docs/BoostPostRequestTracking.md +1 -1
- data/docs/{CreateLeadFormRequestQuestionsInnerOptionsInner.md → BoostPostRequestTrackingUrlTagsInner.md} +2 -2
- data/docs/ConversionsApi.md +890 -0
- data/docs/CreateLeadFormRequestQuestionsInner.md +1 -1
- data/docs/LeadGenApi.md +527 -0
- data/docs/MessagingAdsApi.md +215 -0
- data/docs/ReachAndFrequencyApi.md +294 -0
- data/docs/TrackingTagsApi.md +141 -0
- data/docs/YouTubeDailyViewsResponse.md +2 -0
- data/docs/YouTubeDemographicsResponse.md +2 -0
- data/docs/YouTubeVideoRetentionResponse.md +2 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +958 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +618 -12
- data/lib/zernio-sdk/api/ad_creatives_api.rb +826 -0
- data/lib/zernio-sdk/api/ad_insights_api.rb +446 -0
- data/lib/zernio-sdk/api/ad_targeting_api.rb +404 -0
- data/lib/zernio-sdk/api/analytics_api.rb +8 -8
- data/lib/zernio-sdk/api/conversions_api.rb +936 -0
- data/lib/zernio-sdk/api/lead_gen_api.rb +547 -0
- data/lib/zernio-sdk/api/messaging_ads_api.rb +226 -0
- data/lib/zernio-sdk/api/reach_and_frequency_api.rb +316 -0
- data/lib/zernio-sdk/api/tracking_tags_api.rb +137 -0
- data/lib/zernio-sdk/models/boost_post_request_tracking.rb +5 -2
- data/lib/zernio-sdk/models/{create_lead_form_request_questions_inner_options_inner.rb → boost_post_request_tracking_url_tags_inner.rb} +3 -3
- data/lib/zernio-sdk/models/create_lead_form_request_questions_inner.rb +1 -1
- data/lib/zernio-sdk/models/you_tube_daily_views_response.rb +11 -1
- data/lib/zernio-sdk/models/you_tube_demographics_response.rb +11 -1
- data/lib/zernio-sdk/models/you_tube_video_retention_response.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +9 -2
- data/openapi.yaml +329 -163
- data/spec/api/ad_accounts_api_spec.rb +206 -0
- data/spec/api/ad_campaigns_api_spec.rb +119 -6
- data/spec/api/ad_creatives_api_spec.rb +182 -0
- data/spec/api/ad_insights_api_spec.rb +120 -0
- data/spec/api/ad_targeting_api_spec.rb +101 -0
- data/spec/api/analytics_api_spec.rb +4 -4
- data/spec/api/conversions_api_spec.rb +199 -0
- data/spec/api/lead_gen_api_spec.rb +131 -0
- data/spec/api/messaging_ads_api_spec.rb +71 -0
- data/spec/api/reach_and_frequency_api_spec.rb +87 -0
- data/spec/api/tracking_tags_api_spec.rb +25 -0
- data/spec/models/{create_lead_form_request_questions_inner_options_inner_spec.rb → boost_post_request_tracking_url_tags_inner_spec.rb} +6 -6
- data/spec/models/you_tube_daily_views_response_spec.rb +6 -0
- data/spec/models/you_tube_demographics_response_spec.rb +6 -0
- data/spec/models/you_tube_video_retention_response_spec.rb +6 -0
- metadata +38 -10
- data/docs/AdsApi.md +0 -5278
- data/lib/zernio-sdk/api/ads_api.rb +0 -5391
- data/spec/api/ads_api_spec.rb +0 -1015
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **type** | **String** | EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, … | |
|
|
8
8
|
| **key** | **String** | CUSTOM questions only. | [optional] |
|
|
9
9
|
| **label** | **String** | CUSTOM questions only. | [optional] |
|
|
10
|
-
| **options** | [**Array<
|
|
10
|
+
| **options** | [**Array<BoostPostRequestTrackingUrlTagsInner>**](BoostPostRequestTrackingUrlTagsInner.md) | | [optional] |
|
|
11
11
|
| **inline_context** | **String** | | [optional] |
|
|
12
12
|
|
|
13
13
|
## Example
|
data/docs/LeadGenApi.md
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
# Zernio::LeadGenApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**archive_lead_form**](LeadGenApi.md#archive_lead_form) | **DELETE** /v1/ads/lead-forms/{formId} | Archive a lead form |
|
|
8
|
+
| [**create_lead_form**](LeadGenApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form |
|
|
9
|
+
| [**create_test_lead**](LeadGenApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead |
|
|
10
|
+
| [**get_lead_form**](LeadGenApi.md#get_lead_form) | **GET** /v1/ads/lead-forms/{formId} | Get a lead form |
|
|
11
|
+
| [**list_form_leads**](LeadGenApi.md#list_form_leads) | **GET** /v1/ads/lead-forms/{formId}/leads | List leads for a single form |
|
|
12
|
+
| [**list_lead_forms**](LeadGenApi.md#list_lead_forms) | **GET** /v1/ads/lead-forms | List lead forms |
|
|
13
|
+
| [**list_leads**](LeadGenApi.md#list_leads) | **GET** /v1/ads/leads | List submitted leads |
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## archive_lead_form
|
|
17
|
+
|
|
18
|
+
> <ArchiveLeadForm200Response> archive_lead_form(form_id, account_id)
|
|
19
|
+
|
|
20
|
+
Archive a lead form
|
|
21
|
+
|
|
22
|
+
Meta has no hard delete for forms; this archives the form (status=ARCHIVED).
|
|
23
|
+
|
|
24
|
+
### Examples
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
require 'time'
|
|
28
|
+
require 'zernio-sdk'
|
|
29
|
+
# setup authorization
|
|
30
|
+
Zernio.configure do |config|
|
|
31
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
32
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = Zernio::LeadGenApi.new
|
|
36
|
+
form_id = 'form_id_example' # String |
|
|
37
|
+
account_id = 'account_id_example' # String |
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
# Archive a lead form
|
|
41
|
+
result = api_instance.archive_lead_form(form_id, account_id)
|
|
42
|
+
p result
|
|
43
|
+
rescue Zernio::ApiError => e
|
|
44
|
+
puts "Error when calling LeadGenApi->archive_lead_form: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Using the archive_lead_form_with_http_info variant
|
|
49
|
+
|
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
|
51
|
+
|
|
52
|
+
> <Array(<ArchiveLeadForm200Response>, Integer, Hash)> archive_lead_form_with_http_info(form_id, account_id)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
begin
|
|
56
|
+
# Archive a lead form
|
|
57
|
+
data, status_code, headers = api_instance.archive_lead_form_with_http_info(form_id, account_id)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => <ArchiveLeadForm200Response>
|
|
61
|
+
rescue Zernio::ApiError => e
|
|
62
|
+
puts "Error when calling LeadGenApi->archive_lead_form_with_http_info: #{e}"
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **form_id** | **String** | | |
|
|
71
|
+
| **account_id** | **String** | | |
|
|
72
|
+
|
|
73
|
+
### Return type
|
|
74
|
+
|
|
75
|
+
[**ArchiveLeadForm200Response**](ArchiveLeadForm200Response.md)
|
|
76
|
+
|
|
77
|
+
### Authorization
|
|
78
|
+
|
|
79
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
80
|
+
|
|
81
|
+
### HTTP request headers
|
|
82
|
+
|
|
83
|
+
- **Content-Type**: Not defined
|
|
84
|
+
- **Accept**: application/json
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## create_lead_form
|
|
88
|
+
|
|
89
|
+
> <CreateLeadForm200Response> create_lead_form(create_lead_form_request)
|
|
90
|
+
|
|
91
|
+
Create a lead form
|
|
92
|
+
|
|
93
|
+
Creates a Lead Gen form on the connected Facebook Page (POST /{page-id}/leadgen_forms). NOT idempotent — a retry creates a second form. Prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. Requires the Ads add-on.
|
|
94
|
+
|
|
95
|
+
### Examples
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
require 'time'
|
|
99
|
+
require 'zernio-sdk'
|
|
100
|
+
# setup authorization
|
|
101
|
+
Zernio.configure do |config|
|
|
102
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
103
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
api_instance = Zernio::LeadGenApi.new
|
|
107
|
+
create_lead_form_request = Zernio::CreateLeadFormRequest.new({account_id: 'account_id_example', name: 'name_example', questions: [Zernio::CreateLeadFormRequestQuestionsInner.new({type: 'type_example'})], privacy_policy_url: 'privacy_policy_url_example'}) # CreateLeadFormRequest |
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
# Create a lead form
|
|
111
|
+
result = api_instance.create_lead_form(create_lead_form_request)
|
|
112
|
+
p result
|
|
113
|
+
rescue Zernio::ApiError => e
|
|
114
|
+
puts "Error when calling LeadGenApi->create_lead_form: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the create_lead_form_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(<CreateLeadForm200Response>, Integer, Hash)> create_lead_form_with_http_info(create_lead_form_request)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# Create a lead form
|
|
127
|
+
data, status_code, headers = api_instance.create_lead_form_with_http_info(create_lead_form_request)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => <CreateLeadForm200Response>
|
|
131
|
+
rescue Zernio::ApiError => e
|
|
132
|
+
puts "Error when calling LeadGenApi->create_lead_form_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **create_lead_form_request** | [**CreateLeadFormRequest**](CreateLeadFormRequest.md) | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**CreateLeadForm200Response**](CreateLeadForm200Response.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: application/json
|
|
153
|
+
- **Accept**: application/json
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## create_test_lead
|
|
157
|
+
|
|
158
|
+
> <CreateTestLead200Response> create_test_lead(form_id, create_test_lead_request)
|
|
159
|
+
|
|
160
|
+
Create a test lead
|
|
161
|
+
|
|
162
|
+
Submits a test lead against the form (POST /{form-id}/test_leads) to exercise retrieval without waiting for real ad impressions. Meta allows one test lead per form at a time.
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
require 'time'
|
|
168
|
+
require 'zernio-sdk'
|
|
169
|
+
# setup authorization
|
|
170
|
+
Zernio.configure do |config|
|
|
171
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
172
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
api_instance = Zernio::LeadGenApi.new
|
|
176
|
+
form_id = 'form_id_example' # String |
|
|
177
|
+
create_test_lead_request = Zernio::CreateTestLeadRequest.new({account_id: 'account_id_example', field_data: [Zernio::CreateTestLeadRequestFieldDataInner.new({name: 'name_example', values: ['values_example']})]}) # CreateTestLeadRequest |
|
|
178
|
+
|
|
179
|
+
begin
|
|
180
|
+
# Create a test lead
|
|
181
|
+
result = api_instance.create_test_lead(form_id, create_test_lead_request)
|
|
182
|
+
p result
|
|
183
|
+
rescue Zernio::ApiError => e
|
|
184
|
+
puts "Error when calling LeadGenApi->create_test_lead: #{e}"
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Using the create_test_lead_with_http_info variant
|
|
189
|
+
|
|
190
|
+
This returns an Array which contains the response data, status code and headers.
|
|
191
|
+
|
|
192
|
+
> <Array(<CreateTestLead200Response>, Integer, Hash)> create_test_lead_with_http_info(form_id, create_test_lead_request)
|
|
193
|
+
|
|
194
|
+
```ruby
|
|
195
|
+
begin
|
|
196
|
+
# Create a test lead
|
|
197
|
+
data, status_code, headers = api_instance.create_test_lead_with_http_info(form_id, create_test_lead_request)
|
|
198
|
+
p status_code # => 2xx
|
|
199
|
+
p headers # => { ... }
|
|
200
|
+
p data # => <CreateTestLead200Response>
|
|
201
|
+
rescue Zernio::ApiError => e
|
|
202
|
+
puts "Error when calling LeadGenApi->create_test_lead_with_http_info: #{e}"
|
|
203
|
+
end
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Parameters
|
|
207
|
+
|
|
208
|
+
| Name | Type | Description | Notes |
|
|
209
|
+
| ---- | ---- | ----------- | ----- |
|
|
210
|
+
| **form_id** | **String** | | |
|
|
211
|
+
| **create_test_lead_request** | [**CreateTestLeadRequest**](CreateTestLeadRequest.md) | | |
|
|
212
|
+
|
|
213
|
+
### Return type
|
|
214
|
+
|
|
215
|
+
[**CreateTestLead200Response**](CreateTestLead200Response.md)
|
|
216
|
+
|
|
217
|
+
### Authorization
|
|
218
|
+
|
|
219
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
220
|
+
|
|
221
|
+
### HTTP request headers
|
|
222
|
+
|
|
223
|
+
- **Content-Type**: application/json
|
|
224
|
+
- **Accept**: application/json
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
## get_lead_form
|
|
228
|
+
|
|
229
|
+
> <GetLeadForm200Response> get_lead_form(form_id, account_id)
|
|
230
|
+
|
|
231
|
+
Get a lead form
|
|
232
|
+
|
|
233
|
+
### Examples
|
|
234
|
+
|
|
235
|
+
```ruby
|
|
236
|
+
require 'time'
|
|
237
|
+
require 'zernio-sdk'
|
|
238
|
+
# setup authorization
|
|
239
|
+
Zernio.configure do |config|
|
|
240
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
241
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
api_instance = Zernio::LeadGenApi.new
|
|
245
|
+
form_id = 'form_id_example' # String |
|
|
246
|
+
account_id = 'account_id_example' # String |
|
|
247
|
+
|
|
248
|
+
begin
|
|
249
|
+
# Get a lead form
|
|
250
|
+
result = api_instance.get_lead_form(form_id, account_id)
|
|
251
|
+
p result
|
|
252
|
+
rescue Zernio::ApiError => e
|
|
253
|
+
puts "Error when calling LeadGenApi->get_lead_form: #{e}"
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Using the get_lead_form_with_http_info variant
|
|
258
|
+
|
|
259
|
+
This returns an Array which contains the response data, status code and headers.
|
|
260
|
+
|
|
261
|
+
> <Array(<GetLeadForm200Response>, Integer, Hash)> get_lead_form_with_http_info(form_id, account_id)
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
begin
|
|
265
|
+
# Get a lead form
|
|
266
|
+
data, status_code, headers = api_instance.get_lead_form_with_http_info(form_id, account_id)
|
|
267
|
+
p status_code # => 2xx
|
|
268
|
+
p headers # => { ... }
|
|
269
|
+
p data # => <GetLeadForm200Response>
|
|
270
|
+
rescue Zernio::ApiError => e
|
|
271
|
+
puts "Error when calling LeadGenApi->get_lead_form_with_http_info: #{e}"
|
|
272
|
+
end
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
| Name | Type | Description | Notes |
|
|
278
|
+
| ---- | ---- | ----------- | ----- |
|
|
279
|
+
| **form_id** | **String** | | |
|
|
280
|
+
| **account_id** | **String** | | |
|
|
281
|
+
|
|
282
|
+
### Return type
|
|
283
|
+
|
|
284
|
+
[**GetLeadForm200Response**](GetLeadForm200Response.md)
|
|
285
|
+
|
|
286
|
+
### Authorization
|
|
287
|
+
|
|
288
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
289
|
+
|
|
290
|
+
### HTTP request headers
|
|
291
|
+
|
|
292
|
+
- **Content-Type**: Not defined
|
|
293
|
+
- **Accept**: application/json
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## list_form_leads
|
|
297
|
+
|
|
298
|
+
> <ListFormLeads200Response> list_form_leads(form_id, account_id, opts)
|
|
299
|
+
|
|
300
|
+
List leads for a single form
|
|
301
|
+
|
|
302
|
+
Returns leads for one form. Serves persisted leads (ingested via the leadgen webhook) when available, falling back to a live Graph read.
|
|
303
|
+
|
|
304
|
+
### Examples
|
|
305
|
+
|
|
306
|
+
```ruby
|
|
307
|
+
require 'time'
|
|
308
|
+
require 'zernio-sdk'
|
|
309
|
+
# setup authorization
|
|
310
|
+
Zernio.configure do |config|
|
|
311
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
312
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
api_instance = Zernio::LeadGenApi.new
|
|
316
|
+
form_id = 'form_id_example' # String |
|
|
317
|
+
account_id = 'account_id_example' # String |
|
|
318
|
+
opts = {
|
|
319
|
+
limit: 56, # Integer |
|
|
320
|
+
cursor: 'cursor_example', # String |
|
|
321
|
+
since: 56 # Integer | Unix seconds.
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
begin
|
|
325
|
+
# List leads for a single form
|
|
326
|
+
result = api_instance.list_form_leads(form_id, account_id, opts)
|
|
327
|
+
p result
|
|
328
|
+
rescue Zernio::ApiError => e
|
|
329
|
+
puts "Error when calling LeadGenApi->list_form_leads: #{e}"
|
|
330
|
+
end
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
#### Using the list_form_leads_with_http_info variant
|
|
334
|
+
|
|
335
|
+
This returns an Array which contains the response data, status code and headers.
|
|
336
|
+
|
|
337
|
+
> <Array(<ListFormLeads200Response>, Integer, Hash)> list_form_leads_with_http_info(form_id, account_id, opts)
|
|
338
|
+
|
|
339
|
+
```ruby
|
|
340
|
+
begin
|
|
341
|
+
# List leads for a single form
|
|
342
|
+
data, status_code, headers = api_instance.list_form_leads_with_http_info(form_id, account_id, opts)
|
|
343
|
+
p status_code # => 2xx
|
|
344
|
+
p headers # => { ... }
|
|
345
|
+
p data # => <ListFormLeads200Response>
|
|
346
|
+
rescue Zernio::ApiError => e
|
|
347
|
+
puts "Error when calling LeadGenApi->list_form_leads_with_http_info: #{e}"
|
|
348
|
+
end
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Parameters
|
|
352
|
+
|
|
353
|
+
| Name | Type | Description | Notes |
|
|
354
|
+
| ---- | ---- | ----------- | ----- |
|
|
355
|
+
| **form_id** | **String** | | |
|
|
356
|
+
| **account_id** | **String** | | |
|
|
357
|
+
| **limit** | **Integer** | | [optional][default to 25] |
|
|
358
|
+
| **cursor** | **String** | | [optional] |
|
|
359
|
+
| **since** | **Integer** | Unix seconds. | [optional] |
|
|
360
|
+
|
|
361
|
+
### Return type
|
|
362
|
+
|
|
363
|
+
[**ListFormLeads200Response**](ListFormLeads200Response.md)
|
|
364
|
+
|
|
365
|
+
### Authorization
|
|
366
|
+
|
|
367
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
368
|
+
|
|
369
|
+
### HTTP request headers
|
|
370
|
+
|
|
371
|
+
- **Content-Type**: Not defined
|
|
372
|
+
- **Accept**: application/json
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
## list_lead_forms
|
|
376
|
+
|
|
377
|
+
> <ListLeadForms200Response> list_lead_forms(account_id, opts)
|
|
378
|
+
|
|
379
|
+
List lead forms
|
|
380
|
+
|
|
381
|
+
Lists the Lead Gen forms owned by the connected Facebook Page. Requires the Ads add-on.
|
|
382
|
+
|
|
383
|
+
### Examples
|
|
384
|
+
|
|
385
|
+
```ruby
|
|
386
|
+
require 'time'
|
|
387
|
+
require 'zernio-sdk'
|
|
388
|
+
# setup authorization
|
|
389
|
+
Zernio.configure do |config|
|
|
390
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
391
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
api_instance = Zernio::LeadGenApi.new
|
|
395
|
+
account_id = 'account_id_example' # String | Connected facebook account id.
|
|
396
|
+
opts = {
|
|
397
|
+
limit: 56, # Integer |
|
|
398
|
+
cursor: 'cursor_example' # String |
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
begin
|
|
402
|
+
# List lead forms
|
|
403
|
+
result = api_instance.list_lead_forms(account_id, opts)
|
|
404
|
+
p result
|
|
405
|
+
rescue Zernio::ApiError => e
|
|
406
|
+
puts "Error when calling LeadGenApi->list_lead_forms: #{e}"
|
|
407
|
+
end
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
#### Using the list_lead_forms_with_http_info variant
|
|
411
|
+
|
|
412
|
+
This returns an Array which contains the response data, status code and headers.
|
|
413
|
+
|
|
414
|
+
> <Array(<ListLeadForms200Response>, Integer, Hash)> list_lead_forms_with_http_info(account_id, opts)
|
|
415
|
+
|
|
416
|
+
```ruby
|
|
417
|
+
begin
|
|
418
|
+
# List lead forms
|
|
419
|
+
data, status_code, headers = api_instance.list_lead_forms_with_http_info(account_id, opts)
|
|
420
|
+
p status_code # => 2xx
|
|
421
|
+
p headers # => { ... }
|
|
422
|
+
p data # => <ListLeadForms200Response>
|
|
423
|
+
rescue Zernio::ApiError => e
|
|
424
|
+
puts "Error when calling LeadGenApi->list_lead_forms_with_http_info: #{e}"
|
|
425
|
+
end
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### Parameters
|
|
429
|
+
|
|
430
|
+
| Name | Type | Description | Notes |
|
|
431
|
+
| ---- | ---- | ----------- | ----- |
|
|
432
|
+
| **account_id** | **String** | Connected facebook account id. | |
|
|
433
|
+
| **limit** | **Integer** | | [optional][default to 25] |
|
|
434
|
+
| **cursor** | **String** | | [optional] |
|
|
435
|
+
|
|
436
|
+
### Return type
|
|
437
|
+
|
|
438
|
+
[**ListLeadForms200Response**](ListLeadForms200Response.md)
|
|
439
|
+
|
|
440
|
+
### Authorization
|
|
441
|
+
|
|
442
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
443
|
+
|
|
444
|
+
### HTTP request headers
|
|
445
|
+
|
|
446
|
+
- **Content-Type**: Not defined
|
|
447
|
+
- **Accept**: application/json
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
## list_leads
|
|
451
|
+
|
|
452
|
+
> <ListLeads200Response> list_leads(opts)
|
|
453
|
+
|
|
454
|
+
List submitted leads
|
|
455
|
+
|
|
456
|
+
Returns persisted Meta Lead Gen leads for your team, newest-first, with keyset pagination on `cursor`. Leads are ingested in real time from the `leadgen` webhook. Requires the Ads add-on.
|
|
457
|
+
|
|
458
|
+
### Examples
|
|
459
|
+
|
|
460
|
+
```ruby
|
|
461
|
+
require 'time'
|
|
462
|
+
require 'zernio-sdk'
|
|
463
|
+
# setup authorization
|
|
464
|
+
Zernio.configure do |config|
|
|
465
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
466
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
api_instance = Zernio::LeadGenApi.new
|
|
470
|
+
opts = {
|
|
471
|
+
form_id: 'form_id_example', # String | Filter to a single lead form.
|
|
472
|
+
account_id: 'account_id_example', # String | Filter to a single connected account.
|
|
473
|
+
limit: 56, # Integer |
|
|
474
|
+
since: 56, # Integer | Unix seconds; only leads created at/after this Meta timestamp.
|
|
475
|
+
cursor: 'cursor_example' # String | Keyset cursor from a previous response's pagination.cursor.
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
begin
|
|
479
|
+
# List submitted leads
|
|
480
|
+
result = api_instance.list_leads(opts)
|
|
481
|
+
p result
|
|
482
|
+
rescue Zernio::ApiError => e
|
|
483
|
+
puts "Error when calling LeadGenApi->list_leads: #{e}"
|
|
484
|
+
end
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
#### Using the list_leads_with_http_info variant
|
|
488
|
+
|
|
489
|
+
This returns an Array which contains the response data, status code and headers.
|
|
490
|
+
|
|
491
|
+
> <Array(<ListLeads200Response>, Integer, Hash)> list_leads_with_http_info(opts)
|
|
492
|
+
|
|
493
|
+
```ruby
|
|
494
|
+
begin
|
|
495
|
+
# List submitted leads
|
|
496
|
+
data, status_code, headers = api_instance.list_leads_with_http_info(opts)
|
|
497
|
+
p status_code # => 2xx
|
|
498
|
+
p headers # => { ... }
|
|
499
|
+
p data # => <ListLeads200Response>
|
|
500
|
+
rescue Zernio::ApiError => e
|
|
501
|
+
puts "Error when calling LeadGenApi->list_leads_with_http_info: #{e}"
|
|
502
|
+
end
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
### Parameters
|
|
506
|
+
|
|
507
|
+
| Name | Type | Description | Notes |
|
|
508
|
+
| ---- | ---- | ----------- | ----- |
|
|
509
|
+
| **form_id** | **String** | Filter to a single lead form. | [optional] |
|
|
510
|
+
| **account_id** | **String** | Filter to a single connected account. | [optional] |
|
|
511
|
+
| **limit** | **Integer** | | [optional][default to 25] |
|
|
512
|
+
| **since** | **Integer** | Unix seconds; only leads created at/after this Meta timestamp. | [optional] |
|
|
513
|
+
| **cursor** | **String** | Keyset cursor from a previous response's pagination.cursor. | [optional] |
|
|
514
|
+
|
|
515
|
+
### Return type
|
|
516
|
+
|
|
517
|
+
[**ListLeads200Response**](ListLeads200Response.md)
|
|
518
|
+
|
|
519
|
+
### Authorization
|
|
520
|
+
|
|
521
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
522
|
+
|
|
523
|
+
### HTTP request headers
|
|
524
|
+
|
|
525
|
+
- **Content-Type**: Not defined
|
|
526
|
+
- **Accept**: application/json
|
|
527
|
+
|