seatsio 35.1.0 → 35.1.1
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/.github/workflows/build.yml +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +23 -2
- data/lib/seatsio/pagination/cursor.rb +2 -2
- data/lib/seatsio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05a386fb3a2fc728c96f944afcb47225a5f8ae048838473a84dc08baea2859be
|
|
4
|
+
data.tar.gz: b030fa96fbab3f70f292197857adfcaf1b99c68f13d1093349d651701e9b2c42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25a5b5a1672a5daeff609280ef2cdaf6f526c9cbee3b9f0667394a0fcb047c43a0f3fbdbb6764341bc9627ae8ecb6c50670f6a908ae953b091e80e43c6de19b6
|
|
7
|
+
data.tar.gz: d27dcc2cbfc02a02c95ff5f979bf8d4c54ef3f6b999f39644e21aac6de5c600f0454ecc3fb61d74fdacdbc05e42d6bfa686e8355094166ad29a83236f24fab6c
|
data/.github/workflows/build.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
seatsio (35.1.
|
|
4
|
+
seatsio (35.1.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -19,7 +19,7 @@ GEM
|
|
|
19
19
|
mime-types (3.3.1)
|
|
20
20
|
mime-types-data (~> 3.2015)
|
|
21
21
|
mime-types-data (3.2021.0225)
|
|
22
|
-
minitest (5.
|
|
22
|
+
minitest (5.15.0)
|
|
23
23
|
netrc (0.11.0)
|
|
24
24
|
public_suffix (4.0.6)
|
|
25
25
|
rake (13.0.6)
|
data/README.md
CHANGED
|
@@ -13,13 +13,34 @@ seatsio-ruby follows semver since v23.3.0.
|
|
|
13
13
|
|
|
14
14
|
You can find a full API reference at https://www.rubydoc.info/gems/seatsio/
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### General instructions
|
|
19
|
+
|
|
20
|
+
To use this library, you'll need to create a `Seatsio::Client`:
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require('seatsio')
|
|
24
|
+
client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
|
|
25
|
+
...
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
You can find your _workspace secret key_ in the [settings section of the workspace](https://app.seats.io/workspace-settings).
|
|
29
|
+
|
|
30
|
+
The region should correspond to the region of your account:
|
|
31
|
+
|
|
32
|
+
- `Seatsio::Region.EU()`: Europe
|
|
33
|
+
- `Seatsio::Region.NA()`: North-America
|
|
34
|
+
- `Seatsio::Region.SA()`: South-America
|
|
35
|
+
- `Seatsio::Region.OC()`: Oceania
|
|
36
|
+
|
|
37
|
+
If you're unsure about your region, have a look at your [company settings page](https://app.seats.io/company-settings).
|
|
17
38
|
|
|
18
39
|
### Creating a chart and an event
|
|
19
40
|
|
|
20
41
|
```ruby
|
|
21
42
|
require('seatsio')
|
|
22
|
-
client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
|
|
43
|
+
client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
|
|
23
44
|
chart = client.charts.create
|
|
24
45
|
event = client.events.create chart_key: chart.key
|
|
25
46
|
```
|
|
@@ -19,7 +19,7 @@ module Seatsio
|
|
|
19
19
|
@first_page = false
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
def each(start = 0)
|
|
22
|
+
def each(start = 0, &block)
|
|
23
23
|
return to_enum(:each, start) unless block_given?
|
|
24
24
|
|
|
25
25
|
Array(@collection[start..-1]).each do |element|
|
|
@@ -30,7 +30,7 @@ module Seatsio
|
|
|
30
30
|
|
|
31
31
|
start = [@collection.size, start].max
|
|
32
32
|
fetch_next_page
|
|
33
|
-
each(start, &
|
|
33
|
+
each(start, &block)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def set_query_param(key, value)
|
data/lib/seatsio/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: seatsio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 35.1.
|
|
4
|
+
version: 35.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Seats.io
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|