@@ -43,18 +43,12 @@ apps["apple_mail_mac"]["name"]
4343apps[" 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-
5149submission = 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
6357submission.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+
6673Find screenshots for a submission:
6774
6875``` ruby
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