Skip to content

Commit f55581e

Browse files
authored
Merge pull request #32 from predicthq/aviation-rank
Add Aviation Rank
2 parents 7ee6060 + fb31599 commit f55581e

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
".gitignore",
2828
".babelrc"
2929
],
30-
"version": "0.0.20"
30+
"version": "0.1.0"
3131
}

dist/predicthq.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22116,7 +22116,7 @@ var Client = function () {
2211622116
options = options || {};
2211722117

2211822118
this.baseUrl = options.endpoint || "https://api.predicthq.com";
22119-
this.version = "0.0.20";
22119+
this.version = "0.1.0";
2212022120

2212122121
if (typeof this.baseUrl == 'undefined') throw "No endpoint URL set";
2212222122

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "predicthq",
3-
"version": "0.0.20",
3+
"version": "0.1.0",
44
"description": "PredictHQ Event Intelligence",
55
"main": "dist/predicthq.js",
66
"scripts": {

src/endpoints/v1/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Events extends BaseEndpoint {
2222
super(client)
2323

2424
this.schema = EventSchema
25-
this.arrayOptions = ['category', 'sort', 'top_events.sort', 'rank_level', 'local_rank_level', 'label', 'country','place.scope','place.exact', 'state', 'relevance']
26-
this.integerOptions = ['limit', 'offset', 'rank_level', 'local_rank_level', 'signal.significance']
25+
this.arrayOptions = ['category', 'sort', 'top_events.sort', 'rank_level', 'local_rank_level', 'aviation_rank_level', 'label', 'country','place.scope','place.exact', 'state', 'relevance']
26+
this.integerOptions = ['limit', 'offset', 'rank_level', 'local_rank_level', 'aviation_rank_level', 'signal.significance']
2727

2828
this.accountId = accountId
2929

src/endpoints/v1/schemas/events.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,18 @@
235235
},
236236
"type": "array"
237237
},
238+
"aviation_rank_level": {
239+
"items": {
240+
"enum": [
241+
1,
242+
2,
243+
3,
244+
4,
245+
5
246+
]
247+
},
248+
"type": "array"
249+
},
238250
"sort": {
239251
"items": {
240252
"enum": [
@@ -245,6 +257,7 @@
245257
"updated",
246258
"rank",
247259
"local_rank",
260+
"aviation_rank",
248261
"category",
249262
"duration",
250263
"country",
@@ -257,6 +270,7 @@
257270
"-updated",
258271
"-rank",
259272
"-local_rank",
273+
"-aviation_rank",
260274
"-category",
261275
"-duration",
262276
"-country",
@@ -275,6 +289,7 @@
275289
"end",
276290
"rank",
277291
"local_rank",
292+
"aviation_rank",
278293
"category",
279294
"duration",
280295
"country",
@@ -285,6 +300,7 @@
285300
"-end",
286301
"-rank",
287302
"-local_rank",
303+
"-aviation_rank",
288304
"-category",
289305
"-duration",
290306
"-country",

test/test_events_search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('Events', () => {
149149
c.events.count({'rank_level': [5], 'category': 'sports'})
150150
.then((results)=> {
151151

152-
expect(_.keys(results.toDict())).toEqual([ 'count', 'top_rank', 'top_local_rank', 'rank_levels', 'local_rank_levels', 'categories', 'labels' ])
152+
expect(_.keys(results.toDict())).toEqual([ 'count', 'top_rank', 'top_local_rank', 'top_aviation_rank', 'rank_levels', 'local_rank_levels', 'aviation_rank_levels', 'categories', 'labels' ])
153153

154154
expect(results.toDict()['count']).toBeGreaterThan(10000)
155155

0 commit comments

Comments
 (0)