Skip to content

Commit 95e09e6

Browse files
committed
Sync README with current API behavior
1 parent 328851c commit 95e09e6

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,12 @@ apps["apple_mail_mac"]["name"]
4343
apps["apple_mail_mac"]["modes"]
4444
```
4545

46-
Create a screenshot submission:
46+
Create a screenshot submission for all default apps:
4747

4848
```ruby
49-
apps = PreflightQA::Apps.list
50-
5149
submission = PreflightQA::Screenshots.create(
5250
subject: "My Test Email",
5351
html: "<html><body>Hello world</body></html>",
54-
apps: {
55-
apple_mail_mac: [:light, :dark],
56-
outlook_mac: [:light]
57-
},
5852
webhook_url: "https://example.com/preflight/webhook"
5953
)
6054

@@ -63,6 +57,19 @@ submission.status
6357
submission.code
6458
```
6559

60+
You can also limit the request to specific apps and modes:
61+
62+
```ruby
63+
submission = PreflightQA::Screenshots.create(
64+
subject: "My Test Email",
65+
html: "<html><body>Hello world</body></html>",
66+
apps: {
67+
apple_mail_mac: [:light, :dark],
68+
outlook_mac: [:light]
69+
}
70+
)
71+
```
72+
6673
Find screenshots for a submission:
6774

6875
```ruby
@@ -75,7 +82,7 @@ end
7582

7683
`PreflightQA::Apps.list` returns the raw `data["apps"]` hash from the API.
7784

78-
`PreflightQA::Screenshots.create` returns `PreflightQA::Submission`.
85+
`PreflightQA::Screenshots.create` returns `PreflightQA::Submission` with `uuid`, `status`, `code`, and `raw`.
7986

8087
`PreflightQA::Screenshots.find` returns `Array<PreflightQA::Screenshot>`.
8188

0 commit comments

Comments
 (0)