browserbeam 0.4.0 → 0.5.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.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/browserbeam/types.rb +12 -3
- data/lib/browserbeam/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: d16b959107bf89d7f6b0a8851b519e76548ce7968f249e1b7408d7fc9950fbc0
|
|
4
|
+
data.tar.gz: c2636291d527fe711292779e66498febc7b691701dc860a68c2826a37aa672e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b38c33925c606bd55e55c192700009efb2db1d0d86cdd561651dc43e6ad7a9aa88d2e113fcf8809b6481a40376a6abec1e4a422f46b1c1b977cd1370e7b42de
|
|
7
|
+
data.tar.gz: c1aaed1e4555eb2688ff3817bb10137f399c670316b328a0fa5f2543412513cc57dac552d439f0905d8a74ad7b9f49576bfb242713f7f9a02b685d39687d32d8
|
data/README.md
CHANGED
|
@@ -145,9 +145,15 @@ puts full.page.markdown.content
|
|
|
145
145
|
|
|
146
146
|
## Session Management
|
|
147
147
|
|
|
148
|
+
Filter by `status: "active"`, `"closed"`, or `"failed"`. Failed sessions ended with a fatal error (e.g. blocked or unsolvable challenge); `get` returns `error_code` and `error_message`.
|
|
149
|
+
|
|
148
150
|
```ruby
|
|
149
151
|
sessions = client.sessions.list(status: "active")
|
|
152
|
+
failed = client.sessions.list(status: "failed")
|
|
150
153
|
info = client.sessions.get("ses_abc123")
|
|
154
|
+
if info.status == "failed"
|
|
155
|
+
warn "#{info.error_code}: #{info.error_message}"
|
|
156
|
+
end
|
|
151
157
|
client.sessions.destroy("ses_abc123")
|
|
152
158
|
```
|
|
153
159
|
|
data/lib/browserbeam/types.rb
CHANGED
|
@@ -95,7 +95,9 @@ module Browserbeam
|
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
SessionInfo = Struct.new(
|
|
98
|
+
SessionInfo = Struct.new(
|
|
99
|
+
:session_id, :status, :started_at, :ended_at, :duration_seconds, :expires_at, :error_code, :error_message, keyword_init: true
|
|
100
|
+
) do
|
|
99
101
|
def self.from_hash(data)
|
|
100
102
|
new(
|
|
101
103
|
session_id: data["session_id"] || "",
|
|
@@ -104,13 +106,20 @@ module Browserbeam
|
|
|
104
106
|
ended_at: data["ended_at"],
|
|
105
107
|
duration_seconds: data["duration_seconds"],
|
|
106
108
|
expires_at: data["expires_at"] || "",
|
|
109
|
+
error_code: data["error_code"],
|
|
110
|
+
error_message: data["error_message"]
|
|
107
111
|
)
|
|
108
112
|
end
|
|
109
113
|
end
|
|
110
114
|
|
|
111
|
-
SessionListItem = Struct.new(:session_id, :status, :started_at, keyword_init: true) do
|
|
115
|
+
SessionListItem = Struct.new(:session_id, :status, :started_at, :error_code, keyword_init: true) do
|
|
112
116
|
def self.from_hash(data)
|
|
113
|
-
new(
|
|
117
|
+
new(
|
|
118
|
+
session_id: data["session_id"] || "",
|
|
119
|
+
status: data["status"] || "",
|
|
120
|
+
started_at: data["started_at"] || "",
|
|
121
|
+
error_code: data["error_code"]
|
|
122
|
+
)
|
|
114
123
|
end
|
|
115
124
|
end
|
|
116
125
|
|
data/lib/browserbeam/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: browserbeam
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Browserbeam
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|