Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 2.05 KB

File metadata and controls

54 lines (35 loc) · 2.05 KB

ShortURLs

(short_ur_ls)

Overview

REST APIs for managing short URLs

Available Operations

create

Shorten a URL.

Example Usage

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

Parameters

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.

Response

operations.CreateResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /