seatsio 67.5.0 → 67.6.0
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seatsio",
|
|
3
|
-
"version": "67.
|
|
3
|
+
"version": "67.6.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Official JavaScript and Node.JS client library for the Seats.io REST API",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/seatsio/seatsio-js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "0.
|
|
17
|
+
"axios": "0.26.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"browserify": "latest",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"gulp-tap": "latest",
|
|
31
31
|
"gulp-uglify": "latest",
|
|
32
32
|
"gulp-uglify-es": "latest",
|
|
33
|
-
"jest": "27.
|
|
34
|
-
"jest-cli": "27.
|
|
33
|
+
"jest": "27.5.1",
|
|
34
|
+
"jest-cli": "27.5.1",
|
|
35
35
|
"uuid": "8.3.2"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/src/Seasons/Seasons.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const Season = require('./Season')
|
|
2
|
+
const EventDeserializer = require('../Events/EventDeserializer')
|
|
2
3
|
|
|
3
4
|
class Seasons {
|
|
4
5
|
/**
|
|
@@ -84,7 +85,7 @@ class Seasons {
|
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
return this.client.post(`/seasons/${encodeURIComponent(key)}/actions/create-events`, requestParameters)
|
|
87
|
-
.then((res) => new
|
|
88
|
+
.then((res) => res.data.events.map(e => new EventDeserializer().fromJson(e)))
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|
|
@@ -5,9 +5,9 @@ test('create events in season by event keys', async () => {
|
|
|
5
5
|
const chart = await client.charts.create()
|
|
6
6
|
const season = await client.seasons.create(chart.key)
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const events = await client.seasons.createEvents(season.key, null, ['event1', 'event2'])
|
|
9
9
|
|
|
10
|
-
expect(
|
|
10
|
+
expect(events.map(e => e.key)).toEqual(['event2', 'event1'])
|
|
11
11
|
})
|
|
12
12
|
|
|
13
13
|
test('create events in season by number of events', async () => {
|
|
@@ -15,7 +15,7 @@ test('create events in season by number of events', async () => {
|
|
|
15
15
|
const chart = await client.charts.create()
|
|
16
16
|
const season = await client.seasons.create(chart.key)
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const events = await client.seasons.createEvents(season.key, 2)
|
|
19
19
|
|
|
20
|
-
expect(
|
|
20
|
+
expect(events.length).toBe(2)
|
|
21
21
|
})
|