We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 814108e commit f483cabCopy full SHA for f483cab
webpage.go
@@ -0,0 +1,27 @@
1
+package labstack
2
+
3
+type (
4
+ WebpageToPDFRequest struct {
5
+ URL string `json:"url"`
6
+ Size string `json:"size"`
7
+ Layout string `json:"width"`
8
+ }
9
10
+ WebpageToPDFResponse struct {
11
+ *Download
12
13
+)
14
15
+func (c *Client) WebpageToPDF(req *WebpageToPDFRequest) (res *WebpageToPDFResponse, err *APIError) {
16
+ res = new(WebpageToPDFResponse)
17
+ _, e := c.resty.R().
18
+ SetBody(req).
19
+ SetResult(res).
20
+ SetError(err).
21
+ Post("/webpage/to-pdf")
22
+ if e != nil {
23
+ err = new(APIError)
24
+ err.Message = e.Error()
25
26
+ return
27
+}
0 commit comments