embulk-input-facebook_ads_insights 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25294378cb92ec04eb4597bc4cf5bd88b42d0636
4
- data.tar.gz: cd464ac63c44f3ada5fcd35ddb8efdf589a32e15
3
+ metadata.gz: 216c608f834dd00d357b5065f346317c1ab0e23b
4
+ data.tar.gz: e3c360c8ef84d04c4e4119bba18d7124781f955f
5
5
  SHA512:
6
- metadata.gz: b6c7466198ac7be783d6ec4b3cec622e21ca544f7abbd4753a396ddb59ce6789ce66d65a699e20709efb4d85a9043208274c5c434b981617fd6f8a3beb759cfa
7
- data.tar.gz: 2351afd4f9099f36342757758c10ef45bc89dbbb13f336007d1b571b11191ed36f27b5dec8c44dcd21dc2c78bf52babfb5e22ebfb4f41e4e0c59eef69be7c641
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
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.1.1"
16
+ version = "0.1.2"
17
17
 
18
18
  sourceCompatibility = 1.8
19
19
  targetCompatibility = 1.8
@@ -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.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.1.jar
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