Skip to content

ALIILAPRO/yun-ir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yun.ir Python Client

A Python client for the Yun.ir URL shortener API.

Installation

Install with pip:

pip install yun-ir

Usage

from yun import Yun

login = Yun.Api('YOUR tOKEN')
result = login.short('title', 'url')

print(result)

API

yun_ir.Yun(token: str)

Create a new Yun.ir client instance.

token: Your Yun.ir API token.

yun_ir.Yun.short(title: str, url: str) -> dict

Shorten a URL using Yun.ir API.

title: Title for the URL

url: URL to shorten

Returns:

A dictionary containing the shortened URL, or an error message if the request fails.

Releases

No releases published

Packages

No packages published

Languages