(short_ur_ls)
REST APIs for managing short URLs
- create - Shorten a URL.
Shorten a URL.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.short_ur_ls.create(request={
"url": "http://limp-pastry.org",
})
if res.short_url is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateRequestBody | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |