Skip to content

URLR/urlr-python

Repository files navigation

urlr@3.0.2

PyPI - Version PyPI - Downloads PyPI - License

This SDK is automatically generated with the OpenAPI Generator project.

  • API version: 2.0.0
  • Package version: 3.0.2
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

For more information, please visit https://urlr.me/en

Installation & Usage

Requirements

Python 3.10+

pip install

pip install urlr

Then import the package:

import urlr

Setuptools

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

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import os
import urlr

api_key = os.getenv("URLR_API_KEY")  # to be defined on your side

configuration = urlr.Configuration()
configuration.api_key['ApiKeyAuth'] = api_key

# Create a link

with urlr.ApiClient(configuration) as api_client:
    links_api = urlr.LinksApi(api_client)
    link_create_request = urlr.LinkCreateRequest(
        url="",
        workspace_id=""
    )

    try:
        link = links_api.link_create(link_create_request=link_create_request)
    except Exception as e:
        print("Exception when calling LinksApi->link_create: %s\n" % e)

Complete examples can be found in the docs directory of the client repository.

API Endpoints

All URIs are relative to https://urlr.me/api/v2

Class Method HTTP request Description
DomainsApi domain_create POST /domains Create a domain
DomainsApi domain_get GET /domains/{domain_id} Get a domain
DomainsApi domain_list GET /domains List domains
FoldersApi folder_create POST /folders Create a folder
FoldersApi folder_get GET /folders/{folder_id} Get a folder
FoldersApi folder_list GET /folders List folders
LinksApi link_create POST /links Create a link
LinksApi link_delete DELETE /links/{link_id} Delete a link
LinksApi link_edit PATCH /links/{link_id} Edit a link
LinksApi link_get GET /links/{link_id} Get a link
LinksApi link_list GET /links List links
QRCodesApi qrcode_create POST /qrcodes Create a QR Code
StatisticsApi statistic_get GET /statistics Get statistics
WorkspacesApi workspace_get GET /workspaces/{workspace_id} Get a workspace
WorkspacesApi workspace_list GET /workspaces List workspaces of user

Models

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

Get help / support

Please contact contact@urlr.me and we can take more direct action toward finding a solution.

About

Python library for link shortening with URLR API.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages