embulk-input-http 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +53 -3
- data/build.gradle +1 -1
- data/example/json-example.yml +2 -2
- data/src/main/java/org/embulk/input/HttpInputPlugin.java +14 -7
- data/src/main/java/org/embulk/input/PagerConfig.java +86 -0
- data/src/main/java/org/embulk/input/ParamsConfig.java +21 -5
- data/src/main/java/org/embulk/input/QueryConfig.java +5 -0
- data/src/test/java/org/embulk/input/TestPagerConfig.java +78 -0
- data/src/test/java/org/embulk/input/TestParamsConfig.java +8 -4
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 452759fbe56ecd2ad188fa9a242632e336cc0d36
|
4
|
+
data.tar.gz: 120395d8cfa06b72c150346d06b22f3b864e09a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10d8542672bd947506f551c35daf0e8e76638962ac96818e4feaa7603425cc84c858066f72ecd91b43e71f870ec1b01a1a497f301186a0ff52f1543c19184af1
|
7
|
+
data.tar.gz: 808141162ec7c55a29d6a207ccdaa33843c2bdf774c0ba4c3e9dffe81f8df9a198540717453f74007c79649db733560595c7c558f1349e719d5e93c23a4fc253
|
data/README.md
CHANGED
@@ -30,6 +30,7 @@ in:
|
|
30
30
|
- **type**: specify this plugin as *http*
|
31
31
|
- **url**: base url something like api (required)
|
32
32
|
- **params**: pair of name/value to specify query parameter (optional)
|
33
|
+
- **pager**: configuration to parameterize paging (optional)
|
33
34
|
- **method**: http method, get is used by default (optional)
|
34
35
|
- **user_agent**: the usrr agent to specify request header (optional)
|
35
36
|
- **request_headers**: the extra request headers as key-value (optional)
|
@@ -42,7 +43,7 @@ in:
|
|
42
43
|
- **request_interval**: wait msec before each requests (optional, 0 is used by default)
|
43
44
|
- **interval\_includes\_response\_time**: yes/no, if yes and you set *request_interval*, response time will be included in interval for next request (optional, no is used by default)
|
44
45
|
|
45
|
-
### Brace expansion style in params
|
46
|
+
### Brace expansion style in 'params'
|
46
47
|
|
47
48
|
In *params* section, you can specify also multilple requests by using **values** or **brace expansion style** with set **expand** true.
|
48
49
|
|
@@ -67,7 +68,6 @@ Then all patterns of query will be called in a defferent request.
|
|
67
68
|
|
68
69
|
By default, **expand** is false. In this case, all values will be multiple params in one request.
|
69
70
|
|
70
|
-
|
71
71
|
### Use basic authentication
|
72
72
|
|
73
73
|
You can specify username/password for basic authentication.
|
@@ -78,6 +78,56 @@ basic_auth:
|
|
78
78
|
- password: MyPassword
|
79
79
|
```
|
80
80
|
|
81
|
+
### Paging by 'pager'
|
82
|
+
|
83
|
+
You can configure request parameters for paging requests, like as follows:
|
84
|
+
|
85
|
+
```yaml
|
86
|
+
in:
|
87
|
+
type: http
|
88
|
+
url: http://express.heartrails.com/api/json
|
89
|
+
pager: {from_param: from, to_param: to, start: 1, step: 1000, pages: 10}
|
90
|
+
```
|
91
|
+
|
92
|
+
Properties of pager is as below:
|
93
|
+
|
94
|
+
- **from_param**: parameter name of 'from' index
|
95
|
+
- **to_param**: parameter name of 'to' index (optional)
|
96
|
+
- **pages**: total page size
|
97
|
+
- **start**: first index number (optional, 0 is used by default)
|
98
|
+
- **step**: size to increment (optional, 1 is used by default)
|
99
|
+
|
100
|
+
#### Examples of 'pager'
|
101
|
+
|
102
|
+
#### Conbination of from/to parameters.
|
103
|
+
|
104
|
+
```yaml
|
105
|
+
pager: {from_param: from, to_param: to, pages: 4, start: 1, step: 10}
|
106
|
+
```
|
107
|
+
|
108
|
+
the request parameters will be:
|
109
|
+
|
110
|
+
1. ?from=1&to=10
|
111
|
+
2. ?from=11&to=20
|
112
|
+
3. ?from=21&to=30
|
113
|
+
4. ?from=31&to=40
|
114
|
+
|
115
|
+
|
116
|
+
##### Batch request with incremental page parameter.
|
117
|
+
|
118
|
+
```yaml
|
119
|
+
params:
|
120
|
+
- {name: size, value: 100}
|
121
|
+
pager: {from_param: page, pages: 4, start: 1, step: 1}
|
122
|
+
```
|
123
|
+
|
124
|
+
the request parameters will be:
|
125
|
+
|
126
|
+
1. ?page=1&size=100
|
127
|
+
2. ?page=2&size=100
|
128
|
+
3. ?page=3&size=100
|
129
|
+
4. ?page=4&size=100
|
130
|
+
|
81
131
|
|
82
132
|
## Example
|
83
133
|
|
@@ -91,7 +141,7 @@ in:
|
|
91
141
|
- {name: method, value: getStations}
|
92
142
|
- {name: x, value: 135.0}
|
93
143
|
- {name: y, value: "{35,34,33,32,31}.0", expand: true}
|
94
|
-
|
144
|
+
request_headers: {X-Some-Key1: some-value1, X-Some-key2: some-value2}
|
95
145
|
parser:
|
96
146
|
type: json
|
97
147
|
root: $.response.station
|
data/build.gradle
CHANGED
data/example/json-example.yml
CHANGED
@@ -6,14 +6,14 @@ in:
|
|
6
6
|
params:
|
7
7
|
- {name: method, value: getStations}
|
8
8
|
- {name: x, value: 135.0}
|
9
|
-
- {name: y, value: "{35,34
|
10
|
-
- {name: z, values: ["a", "b", "c"], expand: 1}
|
9
|
+
- {name: y, value: "{35,34}.0", expand: 1}
|
11
10
|
method: get
|
12
11
|
user_agent: example_json
|
13
12
|
charset: utf8
|
14
13
|
request_interval: 600
|
15
14
|
interval_includes_response_time: 1
|
16
15
|
request_headers: {X-Some-Key1: some-value1, X-Some-key2: some-value2}
|
16
|
+
pager: {from_param: from, to_param: to, pages: 10, step: 100}
|
17
17
|
parser:
|
18
18
|
type: none
|
19
19
|
|
@@ -90,11 +90,14 @@ public class HttpInputPlugin implements FileInputPlugin {
|
|
90
90
|
@ConfigDefault("null")
|
91
91
|
public Optional<BasicAuthConfig> getBasicAuth();
|
92
92
|
|
93
|
+
@Config("pager")
|
94
|
+
@ConfigDefault("null")
|
95
|
+
public Optional<PagerConfig> getPager();
|
96
|
+
|
93
97
|
@Config("request_headers")
|
94
98
|
@ConfigDefault("{}")
|
95
99
|
public Map<String, String> getRequestHeaders();
|
96
100
|
|
97
|
-
|
98
101
|
@ConfigInject
|
99
102
|
public BufferAllocator getBufferAllocator();
|
100
103
|
|
@@ -118,9 +121,13 @@ public class HttpInputPlugin implements FileInputPlugin {
|
|
118
121
|
|
119
122
|
final int tasks;
|
120
123
|
if (task.getParams().isPresent()) {
|
121
|
-
List<List<QueryConfig.Query>>
|
122
|
-
task.setQueries(
|
123
|
-
tasks =
|
124
|
+
List<List<QueryConfig.Query>> queries = task.getParams().get().generateQueries(task.getPager());
|
125
|
+
task.setQueries(queries);
|
126
|
+
tasks = queries.size();
|
127
|
+
} else if (task.getPager().isPresent()) {
|
128
|
+
List<List<QueryConfig.Query>> queries = task.getPager().get().expand();
|
129
|
+
task.setQueries(queries);
|
130
|
+
tasks = queries.size();
|
124
131
|
} else {
|
125
132
|
task.setQueries(Lists.<List<QueryConfig.Query>>newArrayList());
|
126
133
|
task.setRequestInterval(0);
|
@@ -134,8 +141,8 @@ public class HttpInputPlugin implements FileInputPlugin {
|
|
134
141
|
|
135
142
|
@Override
|
136
143
|
public ConfigDiff resume(TaskSource taskSource,
|
137
|
-
|
138
|
-
|
144
|
+
int taskCount,
|
145
|
+
FileInputPlugin.Control control) {
|
139
146
|
control.run(taskSource, taskCount);
|
140
147
|
return Exec.newConfigDiff();
|
141
148
|
}
|
@@ -233,7 +240,7 @@ public class HttpInputPlugin implements FileInputPlugin {
|
|
233
240
|
headers.add(new BasicHeader("Accept-Encoding", "gzip, deflate"));
|
234
241
|
headers.add(new BasicHeader("Accept-Language", "en-us,en;q=0.5"));
|
235
242
|
headers.add(new BasicHeader("User-Agent", task.getUserAgent()));
|
236
|
-
for (Map.Entry<String,String> entry : task.getRequestHeaders().entrySet()) {
|
243
|
+
for (Map.Entry<String, String> entry : task.getRequestHeaders().entrySet()) {
|
237
244
|
headers.add(new BasicHeader(entry.getKey(), entry.getValue()));
|
238
245
|
}
|
239
246
|
return headers;
|
@@ -0,0 +1,86 @@
|
|
1
|
+
package org.embulk.input;
|
2
|
+
|
3
|
+
import com.fasterxml.jackson.annotation.JsonCreator;
|
4
|
+
import com.fasterxml.jackson.annotation.JsonProperty;
|
5
|
+
import com.google.common.base.Optional;
|
6
|
+
|
7
|
+
import java.util.ArrayList;
|
8
|
+
import java.util.List;
|
9
|
+
|
10
|
+
public class PagerConfig {
|
11
|
+
|
12
|
+
private final String fromParam;
|
13
|
+
private final Optional<String> toParam;
|
14
|
+
private final int start;
|
15
|
+
private final int pages;
|
16
|
+
private final int step;
|
17
|
+
|
18
|
+
@JsonCreator
|
19
|
+
public PagerConfig(@JsonProperty("from_param") String fromParam,
|
20
|
+
@JsonProperty("to_param") Optional<String> toParam,
|
21
|
+
@JsonProperty("start") Optional<Integer> start,
|
22
|
+
@JsonProperty("pages") int pages,
|
23
|
+
@JsonProperty("step") Optional<Integer> step) {
|
24
|
+
this.fromParam = fromParam;
|
25
|
+
this.toParam = toParam;
|
26
|
+
this.start = start.or(0);
|
27
|
+
this.pages = pages;
|
28
|
+
this.step = step.or(1);
|
29
|
+
}
|
30
|
+
|
31
|
+
public List<List<QueryConfig.Query>> expand() {
|
32
|
+
List<List<QueryConfig.Query>> queries = new ArrayList<>();
|
33
|
+
int p = 1;
|
34
|
+
int index = start;
|
35
|
+
while (p <= pages) {
|
36
|
+
List<QueryConfig.Query> one = new ArrayList<>();
|
37
|
+
one.add(new QueryConfig.Query(fromParam, Integer.toString(index)));
|
38
|
+
if (toParam.isPresent()) {
|
39
|
+
int t = index + step - 1;
|
40
|
+
one.add(new QueryConfig.Query(toParam.get(), Integer.toString(t)));
|
41
|
+
index = t + 1;
|
42
|
+
} else {
|
43
|
+
index += step;
|
44
|
+
}
|
45
|
+
queries.add(one);
|
46
|
+
p++;
|
47
|
+
}
|
48
|
+
return queries;
|
49
|
+
}
|
50
|
+
|
51
|
+
@JsonProperty("from_param")
|
52
|
+
public String getFromParam() {
|
53
|
+
return fromParam;
|
54
|
+
}
|
55
|
+
|
56
|
+
@JsonProperty("to_param")
|
57
|
+
public Optional<String> getToParam() {
|
58
|
+
return toParam;
|
59
|
+
}
|
60
|
+
|
61
|
+
@JsonProperty("start")
|
62
|
+
public int getStart() {
|
63
|
+
return start;
|
64
|
+
}
|
65
|
+
|
66
|
+
@JsonProperty("pages")
|
67
|
+
public int getPages() {
|
68
|
+
return pages;
|
69
|
+
}
|
70
|
+
|
71
|
+
@JsonProperty("step")
|
72
|
+
public int getStep() {
|
73
|
+
return step;
|
74
|
+
}
|
75
|
+
|
76
|
+
@Override
|
77
|
+
public String toString() {
|
78
|
+
return "PagerConfig{" +
|
79
|
+
"fromParam='" + fromParam + '\'' +
|
80
|
+
", toParam=" + toParam +
|
81
|
+
", start=" + start +
|
82
|
+
", pages=" + pages +
|
83
|
+
", step=" + step +
|
84
|
+
'}';
|
85
|
+
}
|
86
|
+
}
|
@@ -3,6 +3,7 @@ package org.embulk.input;
|
|
3
3
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
4
4
|
import com.fasterxml.jackson.annotation.JsonValue;
|
5
5
|
import com.google.common.base.Objects;
|
6
|
+
import com.google.common.base.Optional;
|
6
7
|
|
7
8
|
import java.util.ArrayList;
|
8
9
|
import java.util.List;
|
@@ -21,7 +22,7 @@ public class ParamsConfig {
|
|
21
22
|
return queries;
|
22
23
|
}
|
23
24
|
|
24
|
-
public List<List<QueryConfig.Query>>
|
25
|
+
public List<List<QueryConfig.Query>> generateQueries(Optional<PagerConfig> pagerConfig) {
|
25
26
|
List<List<QueryConfig.Query>> base = new ArrayList<>(queries.size());
|
26
27
|
for (QueryConfig p : queries) {
|
27
28
|
base.add(p.expand());
|
@@ -29,18 +30,24 @@ public class ParamsConfig {
|
|
29
30
|
|
30
31
|
int productSize = 1;
|
31
32
|
int baseSize = base.size();
|
32
|
-
for (int i = 0; i < baseSize; productSize *= base.get(i).size(), i++)
|
33
|
+
for (int i = 0; i < baseSize; productSize *= base.get(i).size(), i++);
|
33
34
|
|
34
35
|
List<List<QueryConfig.Query>> expands = new ArrayList<>(productSize);
|
35
36
|
for (int i = 0; i < productSize; i++) {
|
36
37
|
int j = 1;
|
37
|
-
List<QueryConfig.Query>
|
38
|
+
List<QueryConfig.Query> one = new ArrayList<>();
|
38
39
|
for (List<QueryConfig.Query> list : base) {
|
39
40
|
QueryConfig.Query pc = list.get((i / j) % list.size());
|
40
|
-
|
41
|
+
one.add(pc);
|
41
42
|
j *= list.size();
|
42
43
|
}
|
43
|
-
|
44
|
+
if (pagerConfig.isPresent()) {
|
45
|
+
for (List<QueryConfig.Query> q : pagerConfig.get().expand()) {
|
46
|
+
expands.add(copyAndConcat(one, q));
|
47
|
+
}
|
48
|
+
} else {
|
49
|
+
expands.add(one);
|
50
|
+
}
|
44
51
|
}
|
45
52
|
|
46
53
|
return expands;
|
@@ -63,4 +70,13 @@ public class ParamsConfig {
|
|
63
70
|
return Objects.hashCode(queries);
|
64
71
|
}
|
65
72
|
|
73
|
+
private List<QueryConfig.Query> copyAndConcat(List<QueryConfig.Query>... srcs) {
|
74
|
+
List<QueryConfig.Query> dest = new ArrayList<>();
|
75
|
+
for (List<QueryConfig.Query> src : srcs) {
|
76
|
+
for (QueryConfig.Query q : src) {
|
77
|
+
dest.add(q.copy());
|
78
|
+
}
|
79
|
+
}
|
80
|
+
return dest;
|
81
|
+
}
|
66
82
|
}
|
@@ -6,6 +6,7 @@ import com.google.common.base.Objects;
|
|
6
6
|
import com.google.common.base.Optional;
|
7
7
|
|
8
8
|
import java.util.ArrayList;
|
9
|
+
import java.util.Arrays;
|
9
10
|
import java.util.List;
|
10
11
|
|
11
12
|
public class QueryConfig {
|
@@ -115,6 +116,10 @@ public class QueryConfig {
|
|
115
116
|
public String[] getValues() {
|
116
117
|
return values;
|
117
118
|
}
|
119
|
+
|
120
|
+
public Query copy() {
|
121
|
+
return new Query(this.name, Arrays.copyOf(this.values, this.values.length));
|
122
|
+
}
|
118
123
|
}
|
119
124
|
|
120
125
|
private static class BraceExpansion {
|
@@ -0,0 +1,78 @@
|
|
1
|
+
package org.embulk.input;
|
2
|
+
|
3
|
+
import com.google.common.base.Optional;
|
4
|
+
import org.junit.Test;
|
5
|
+
|
6
|
+
import java.util.List;
|
7
|
+
|
8
|
+
import static org.junit.Assert.assertEquals;
|
9
|
+
|
10
|
+
public class TestPagerConfig {
|
11
|
+
|
12
|
+
@Test
|
13
|
+
public void testExpandFromTo() throws Exception {
|
14
|
+
List<List<QueryConfig.Query>> dest = new PagerConfig("from", Optional.of("to"), Optional.of(1), 3,
|
15
|
+
Optional.of(2)).expand();
|
16
|
+
assertEquals(dest.size(), 3);
|
17
|
+
|
18
|
+
assertEquals(dest.get(0).size(), 2);
|
19
|
+
assertEquals(dest.get(0).get(0).getName(), "from");
|
20
|
+
assertEquals(dest.get(0).get(0).getValues()[0], "1");
|
21
|
+
assertEquals(dest.get(0).get(1).getName(), "to");
|
22
|
+
assertEquals(dest.get(0).get(1).getValues()[0], "2");
|
23
|
+
|
24
|
+
assertEquals(dest.get(1).size(), 2);
|
25
|
+
assertEquals(dest.get(1).get(0).getName(), "from");
|
26
|
+
assertEquals(dest.get(1).get(0).getValues()[0], "3");
|
27
|
+
assertEquals(dest.get(1).get(1).getName(), "to");
|
28
|
+
assertEquals(dest.get(1).get(1).getValues()[0], "4");
|
29
|
+
|
30
|
+
assertEquals(dest.get(2).size(), 2);
|
31
|
+
assertEquals(dest.get(2).get(0).getName(), "from");
|
32
|
+
assertEquals(dest.get(2).get(0).getValues()[0], "5");
|
33
|
+
assertEquals(dest.get(2).get(1).getName(), "to");
|
34
|
+
assertEquals(dest.get(2).get(1).getValues()[0], "6");
|
35
|
+
}
|
36
|
+
|
37
|
+
@Test
|
38
|
+
public void testExpandFromToWithDefault() throws Exception {
|
39
|
+
Optional<Integer> nullValue = Optional.absent();
|
40
|
+
|
41
|
+
List<List<QueryConfig.Query>> dest = new PagerConfig("from", Optional.of("to"), nullValue, 2, nullValue)
|
42
|
+
.expand();
|
43
|
+
assertEquals(dest.size(), 2);
|
44
|
+
|
45
|
+
assertEquals(dest.get(0).size(), 2);
|
46
|
+
assertEquals(dest.get(0).get(0).getName(), "from");
|
47
|
+
assertEquals(dest.get(0).get(0).getValues()[0], "0");
|
48
|
+
assertEquals(dest.get(0).get(1).getName(), "to");
|
49
|
+
assertEquals(dest.get(0).get(1).getValues()[0], "0");
|
50
|
+
|
51
|
+
assertEquals(dest.get(1).size(), 2);
|
52
|
+
assertEquals(dest.get(1).get(0).getName(), "from");
|
53
|
+
assertEquals(dest.get(1).get(0).getValues()[0], "1");
|
54
|
+
assertEquals(dest.get(1).get(1).getName(), "to");
|
55
|
+
assertEquals(dest.get(1).get(1).getValues()[0], "1");
|
56
|
+
}
|
57
|
+
|
58
|
+
@Test
|
59
|
+
public void testExpandPagenate() throws Exception {
|
60
|
+
Optional<String> nullValue = Optional.absent();
|
61
|
+
List<List<QueryConfig.Query>> dest = new PagerConfig("page", nullValue, Optional.of(1), 3,
|
62
|
+
Optional.of(1)).expand();
|
63
|
+
assertEquals(dest.size(), 3);
|
64
|
+
|
65
|
+
assertEquals(dest.get(0).size(), 1);
|
66
|
+
assertEquals(dest.get(0).get(0).getName(), "page");
|
67
|
+
assertEquals(dest.get(0).get(0).getValues()[0], "1");
|
68
|
+
|
69
|
+
assertEquals(dest.get(1).size(), 1);
|
70
|
+
assertEquals(dest.get(1).get(0).getName(), "page");
|
71
|
+
assertEquals(dest.get(1).get(0).getValues()[0], "2");
|
72
|
+
|
73
|
+
assertEquals(dest.get(2).size(), 1);
|
74
|
+
assertEquals(dest.get(2).get(0).getName(), "page");
|
75
|
+
assertEquals(dest.get(2).get(0).getValues()[0], "3");
|
76
|
+
}
|
77
|
+
|
78
|
+
}
|
@@ -16,7 +16,8 @@ public class TestParamsConfig {
|
|
16
16
|
QueryConfig q1 = new QueryConfig("test1", Optional.of("awasome1"), nullValues, false);
|
17
17
|
QueryConfig q2 = new QueryConfig("test2", Optional.of("awasome2"), nullValues, false);
|
18
18
|
ParamsConfig paramsConfig = new ParamsConfig(Lists.newArrayList(q1, q2));
|
19
|
-
|
19
|
+
Optional<PagerConfig> pagerConfig = Optional.absent();
|
20
|
+
List<List<QueryConfig.Query>> dest = paramsConfig.generateQueries(pagerConfig);
|
20
21
|
assertEquals(dest.size(), 1);
|
21
22
|
assertEquals(dest.get(0).size(), 2);
|
22
23
|
assertEquals(dest.get(0).get(0).getName(), "test1");
|
@@ -35,7 +36,8 @@ public class TestParamsConfig {
|
|
35
36
|
QueryConfig q2 = new QueryConfig("test2", nullValue, Optional.of(values2), false);
|
36
37
|
|
37
38
|
ParamsConfig paramsConfig = new ParamsConfig(Lists.newArrayList(q1, q2));
|
38
|
-
|
39
|
+
Optional<PagerConfig> pagerConfig = Optional.absent();
|
40
|
+
List<List<QueryConfig.Query>> dest = paramsConfig.generateQueries(pagerConfig);
|
39
41
|
assertEquals(dest.size(), 1);
|
40
42
|
assertEquals(dest.get(0).size(), 2);
|
41
43
|
assertEquals(dest.get(0).get(0).getName(), "test1");
|
@@ -52,7 +54,8 @@ public class TestParamsConfig {
|
|
52
54
|
QueryConfig q1 = new QueryConfig("test1", Optional.of("awasome1"), nullValues, true);
|
53
55
|
QueryConfig q2 = new QueryConfig("test2", Optional.of("awasome2"), nullValues, true);
|
54
56
|
ParamsConfig paramsConfig = new ParamsConfig(Lists.newArrayList(q1, q2));
|
55
|
-
|
57
|
+
Optional<PagerConfig> pagerConfig = Optional.absent();
|
58
|
+
List<List<QueryConfig.Query>> dest = paramsConfig.generateQueries(pagerConfig);
|
56
59
|
assertEquals(dest.size(), 1);
|
57
60
|
assertEquals(dest.get(0).size(), 2);
|
58
61
|
assertEquals(dest.get(0).get(0).getName(), "test1");
|
@@ -71,7 +74,8 @@ public class TestParamsConfig {
|
|
71
74
|
QueryConfig q2 = new QueryConfig("test2", nullValue, Optional.of(values2), true);
|
72
75
|
|
73
76
|
ParamsConfig paramsConfig = new ParamsConfig(Lists.newArrayList(q1, q2));
|
74
|
-
|
77
|
+
Optional<PagerConfig> pagerConfig = Optional.absent();
|
78
|
+
List<List<QueryConfig.Query>> dest = paramsConfig.generateQueries(pagerConfig);
|
75
79
|
assertEquals(dest.size(), 4);
|
76
80
|
|
77
81
|
assertEquals(dest.get(0).size(), 2);
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takuma kanari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
14
|
+
name: bundler
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - ~>
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '1.0'
|
19
|
-
|
20
|
-
prerelease: false
|
21
|
-
type: :development
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
23
21
|
requirements:
|
24
22
|
- - ~>
|
25
23
|
- !ruby/object:Gem::Version
|
26
24
|
version: '1.0'
|
25
|
+
prerelease: false
|
26
|
+
type: :development
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
|
28
|
+
name: rake
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '10.0'
|
33
|
-
|
34
|
-
prerelease: false
|
35
|
-
type: :development
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
37
35
|
requirements:
|
38
36
|
- - '>='
|
39
37
|
- !ruby/object:Gem::Version
|
40
38
|
version: '10.0'
|
39
|
+
prerelease: false
|
40
|
+
type: :development
|
41
41
|
description: Fetch data via http
|
42
42
|
email:
|
43
43
|
- chemtrails.t@gmail.com
|
@@ -60,15 +60,17 @@ files:
|
|
60
60
|
- settings.gradle
|
61
61
|
- src/main/java/org/embulk/input/BasicAuthConfig.java
|
62
62
|
- src/main/java/org/embulk/input/HttpInputPlugin.java
|
63
|
+
- src/main/java/org/embulk/input/PagerConfig.java
|
63
64
|
- src/main/java/org/embulk/input/ParamsConfig.java
|
64
65
|
- src/main/java/org/embulk/input/QueryConfig.java
|
65
66
|
- src/main/java/org/embulk/input/RetryableHandler.java
|
66
67
|
- src/test/java/org/embulk/input/TestHttpInputPlugin.java
|
68
|
+
- src/test/java/org/embulk/input/TestPagerConfig.java
|
67
69
|
- src/test/java/org/embulk/input/TestParamsConfig.java
|
68
70
|
- src/test/java/org/embulk/input/TestQueryConfig.java
|
69
71
|
- classpath/commons-codec-1.9.jar
|
70
72
|
- classpath/commons-logging-1.2.jar
|
71
|
-
- classpath/embulk-input-http-0.0.
|
73
|
+
- classpath/embulk-input-http-0.0.13.jar
|
72
74
|
- classpath/httpclient-4.4.jar
|
73
75
|
- classpath/httpcore-4.4.jar
|
74
76
|
homepage: https://github.com/takumakanari/embulk-input-http
|