embulk-input-facebook_ads_insights 0.1.1 → 0.1.2
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 +1 -0
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/input/facebook_ads_insights/Client.java +12 -0
- data/src/main/java/org/embulk/input/facebook_ads_insights/PluginTask.java +4 -0
- data/src/main/java/org/embulk/input/facebook_ads_insights/Util.java +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 216c608f834dd00d357b5065f346317c1ab0e23b
|
4
|
+
data.tar.gz: e3c360c8ef84d04c4e4119bba18d7124781f955f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcfd7142941bc480c15372b6efa2f297dccbbe6788e762b79598ea6d63bf7d5e3699e6c4c3deeef8ea161fed1b8f54eb4e1cb4ef44ac68fa9589bdff6955028d
|
7
|
+
data.tar.gz: ccfc9c175adde3185f571fe9404b6e313ceb7bed174a5aa0d7d94721a7c12766c7e6ced0c00fc4ed2652bab413921b33f83441c4b83bf26a9c4572b55a999bc9
|
data/README.md
CHANGED
@@ -29,6 +29,7 @@ Required Embulk version >= 0.9
|
|
29
29
|
| product_id_limit | no | integer | see [product_id_limit](https://developers.facebook.com/docs/marketing-api/insights/parameters) for details. |
|
30
30
|
| sort | no | array(string) | see [sort](https://developers.facebook.com/docs/marketing-api/insights/parameters) for details. |
|
31
31
|
| time_increment | no | enum{monthly, all_days} or integer(1-90) | see [time_increment](https://developers.facebook.com/docs/marketing-api/insights/parameters) for details. |
|
32
|
+
| time_range | no | {since:YYYY-MM-DD, until:YYYY-MM-DD} | see [time_range](https://developers.facebook.com/docs/marketing-api/insights/parameters) for details. |
|
32
33
|
| time_ranges | no | array({since:YYYY-MM-DD, until:YYYY-MM-DD}) | see [time_ranges](https://developers.facebook.com/docs/marketing-api/insights/parameters) for details. |
|
33
34
|
| use_account_attribution_setting | no | boolean | see [use_account_attribution_setting](https://developers.facebook.com/docs/marketing-api/insights/parameters) for details. |
|
34
35
|
|
data/build.gradle
CHANGED
@@ -94,6 +94,9 @@ public class Client
|
|
94
94
|
if (pluginTask.getTimeIncrement().isPresent()) {
|
95
95
|
request.setTimeIncrement(pluginTask.getTimeIncrement().get());
|
96
96
|
}
|
97
|
+
if (pluginTask.getTimeRange().isPresent()) {
|
98
|
+
request.setTimeRange(Util.stringifyToStringMap(pluginTask.getTimeRange().get()));
|
99
|
+
}
|
97
100
|
if (pluginTask.getTimeRanges().isPresent()) {
|
98
101
|
request.setTimeRanges(Util.stringifyToStringMaps(pluginTask.getTimeRanges().get()));
|
99
102
|
}
|
@@ -137,6 +140,9 @@ public class Client
|
|
137
140
|
if (pluginTask.getTimeIncrement().isPresent()) {
|
138
141
|
request.setTimeIncrement(pluginTask.getTimeIncrement().get());
|
139
142
|
}
|
143
|
+
if (pluginTask.getTimeRange().isPresent()) {
|
144
|
+
request.setTimeRange(Util.stringifyToStringMap(pluginTask.getTimeRange().get()));
|
145
|
+
}
|
140
146
|
if (pluginTask.getTimeRanges().isPresent()) {
|
141
147
|
request.setTimeRanges(Util.stringifyToStringMaps(pluginTask.getTimeRanges().get()));
|
142
148
|
}
|
@@ -180,6 +186,9 @@ public class Client
|
|
180
186
|
if (pluginTask.getTimeIncrement().isPresent()) {
|
181
187
|
request.setTimeIncrement(pluginTask.getTimeIncrement().get());
|
182
188
|
}
|
189
|
+
if (pluginTask.getTimeRange().isPresent()) {
|
190
|
+
request.setTimeRange(Util.stringifyToStringMap(pluginTask.getTimeRange().get()));
|
191
|
+
}
|
183
192
|
if (pluginTask.getTimeRanges().isPresent()) {
|
184
193
|
request.setTimeRanges(Util.stringifyToStringMaps(pluginTask.getTimeRanges().get()));
|
185
194
|
}
|
@@ -223,6 +232,9 @@ public class Client
|
|
223
232
|
if (pluginTask.getTimeIncrement().isPresent()) {
|
224
233
|
request.setTimeIncrement(pluginTask.getTimeIncrement().get());
|
225
234
|
}
|
235
|
+
if (pluginTask.getTimeRange().isPresent()) {
|
236
|
+
request.setTimeRange(Util.stringifyToStringMap(pluginTask.getTimeRange().get()));
|
237
|
+
}
|
226
238
|
if (pluginTask.getTimeRanges().isPresent()) {
|
227
239
|
request.setTimeRanges(Util.stringifyToStringMaps(pluginTask.getTimeRanges().get()));
|
228
240
|
}
|
@@ -70,6 +70,10 @@ public interface PluginTask extends Task
|
|
70
70
|
@ConfigDefault("null")
|
71
71
|
public Optional<String> getTimeIncrement();
|
72
72
|
|
73
|
+
@Config("time_range")
|
74
|
+
@ConfigDefault("null")
|
75
|
+
public Optional<ToStringMap> getTimeRange();
|
76
|
+
|
73
77
|
@Config("time_ranges")
|
74
78
|
@ConfigDefault("null")
|
75
79
|
public Optional<List<ToStringMap>> getTimeRanges();
|
@@ -15,4 +15,9 @@ public class Util
|
|
15
15
|
Gson gson = new Gson();
|
16
16
|
return "[" + value.stream().map(gson::toJson).collect(Collectors.joining(",")) + "]";
|
17
17
|
}
|
18
|
+
public static String stringifyToStringMap(ToStringMap value)
|
19
|
+
{
|
20
|
+
Gson gson = new Gson();
|
21
|
+
return gson.toJson(value);
|
22
|
+
}
|
18
23
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-facebook_ads_insights
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naotaka nakane
|
@@ -50,7 +50,7 @@ files:
|
|
50
50
|
- README.md
|
51
51
|
- build.gradle
|
52
52
|
- classpath/annotations-13.0.jar
|
53
|
-
- classpath/embulk-input-facebook_ads_insights-0.1.
|
53
|
+
- classpath/embulk-input-facebook_ads_insights-0.1.2.jar
|
54
54
|
- classpath/facebook-java-business-sdk-4.0.5.jar
|
55
55
|
- classpath/gson-2.5.jar
|
56
56
|
- classpath/guava-20.0.jar
|