This SDK is automatically generated with the OpenAPI Generator project.
- API version: 1.10
- Package version: 2.11.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit https://urlr.me/en
Python 3.9+
pip install urlr
Then import the package:
import urlr
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import urlr
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import os
import urlr
from urlr.rest import ApiException
username = os.getenv("URLR_API_USERNAME") # to be defined on your side
password = os.getenv("URLR_API_PASSWORD") # to be defined on your side
# Access Tokens
configuration = urlr.Configuration()
with urlr.ApiClient(configuration) as api_client:
access_token_api = urlr.AccessTokensApi(api_client)
create_access_token_request = urlr.CreateAccessTokenRequest(
username=username,
password=password,
)
try:
api_response = access_token_api.create_access_token(
create_access_token_request=create_access_token_request)
except ApiException as e:
print("Exception when calling AccessTokensApi->create_access_token: %s\n" % e)
quit()
configuration.access_token = api_response.token
# Create a link
with urlr.ApiClient(configuration) as api_client:
links_api = urlr.LinksApi(api_client)
create_link_request = urlr.CreateLinkRequest(
url="",
team_id=""
)
try:
link = links_api.create_link(
create_link_request=create_link_request)
except Exception as e:
print("Exception when calling LinksApi->create_link: %s\n" % e)
A complete example is available here.
All URIs are relative to https://urlr.me/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AccessTokensApi | create_access_token | POST /access_tokens/create | Get an access token |
AccessTokensApi | refresh_access_token | POST /access_tokens/refresh | Refresh an access token |
DomainsApi | create_domain | POST /domains/create | Create a domain |
FoldersApi | get_folders | GET /folders/{team_id} | Get folders of workspace |
LinksApi | create_link | POST /links/create | Create a link |
LinksApi | edit_link | PATCH /links/{link_id} | Edit a link |
LinksApi | get_link | GET /links/{link_id} | Get a link |
QRCodesApi | create_qr_code | POST /qrcodes/create | Create a QR Code |
StatisticsApi | get_statistics | POST /statistics | Get statistics of a link |
WorkspacesApi | get_teams | GET /teams | Get workspaces of user |
- BaseLinkRequest
- BaseLinkRequestMetatag
- BaseLinkRequestQrcode
- CreateAccessToken200Response
- CreateAccessToken401Response
- CreateAccessTokenRequest
- CreateDomain200Response
- CreateDomain409Response
- CreateDomainRequest
- CreateLink429Response
- CreateLinkRequest
- CreateQrCodeRequest
- CreateQrCodeRequestOneOf
- CreateQrCodeRequestOneOf1
- EditLink500Response
- EditLinkRequest
- GetFolders200Response
- GetFolders200ResponseFoldersInner
- GetLink200Response
- GetLink200ResponseGeolinksInner
- GetLink200ResponseGeolinksInnerConditionsInner
- GetLink200ResponseMetatag
- GetLink200ResponseQrcode
- GetLink200ResponseTagsInner
- GetLink200ResponseUtm
- GetLink401Response
- GetLink404Response
- GetLink422Response
- GetStatistics200Response
- GetStatisticsRequest
- GetTeams200Response
- GetTeams200ResponseTeamsInner
- RefreshAccessToken401Response
- RefreshAccessTokenRequest
Authentication schemes defined for the API:
- Type: Bearer authentication (JWT)
Please contact contact@urlr.me and we can take more direct action toward finding a solution.