Skip to content

Commit b02f1a5

Browse files
committed
add github build ci workflow
1 parent 2ae66cc commit b02f1a5

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

.github/workflows/build.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
22+
- run: python -m pip install --upgrade build twine
23+
- run: python -m build

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ScreenshotMAX Python SDK
22

3+
[![build](https://github.com/screenshotmax/python-sdk/actions/workflows/build.yml/badge.svg)](https://github.com/screenshotmax/python-sdk/actions/workflows/build.yml)
34
[![test](https://github.com/screenshotmax/python-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/screenshotmax/python-sdk/actions/workflows/test.yml)
45

56
This is the official Python SDK for the [ScreenshotMAX API](https://screenshotmax.com/).
@@ -18,15 +19,16 @@ Use the SDK to generate signed or unsigned URLs for screenshots, PDFs, web scrap
1819
### Screenshot example
1920
```python
2021
from screenshotmax import SDK
22+
from screenshotmax.enum import ImageFormat
2123
from screenshotmax.options import ScreenshotOptions
2224

2325
sdk = SDK("<ACCESS_KEY>", "<SECRET_KEY>")
2426

2527
# set up options
26-
opts = ScreenshotOptions(url="https://example.com")
28+
opts = ScreenshotOptions(url="https://example.com", format=ImageFormat.PNG)
2729
sdk.screenshot.set_options(opts)
2830

29-
#// generate URL (https://api.screenshotmax.com/v1/screenshot?url=https%3A%2F%2Fexample.com&image_width=1280&image_height=720&format=png&image_quality=80&access_key=<ACCESS_KEY>&signature=370f5b161bc59eed13b76........1f778635d7fc595dbab12)
31+
# generate URL (https://api.screenshotmax.com/v1/screenshot?url=https%3A%2F%2Fexample.com&format=png&access_key=<ACCESS_KEY>&signature=370f5b161bc59eed13b76........1f778635d7fc595dbab12)
3032
url = sdk.screenshot.get_url()
3133

3234
# generate screenshot

0 commit comments

Comments
 (0)