Metadata-Version: 2.1
Name: ton_fragment
Version: 1.0.2
Summary: UnOfficial Fragment (Telegram - Ton Coin) Python library
Home-page: https://github.com/iw4p/Ton-Fragment
Author: Nima Akbarzadeh
Author-email: iw4p@protonmail.com
Project-URL: Bug Tracker, https://github.com/iw4p/Ton-Fragment/issues
Project-URL: repository, https://github.com/iw4p/Ton-Fragment
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# TON Fragment

## UnOfficial Fragment (Telegram - Ton Coin) Python library

[![PyPI version](https://img.shields.io/pypi/v/ton-fragment.svg)](https://pypi.org/project/ton-fragment)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/ton-fragment.svg)](#Installation)
[![Downloads](https://pepy.tech/badge/ton-fragment)](https://pepy.tech/project/ton-fragment)
[![Ton-Fragment](https://github.com/iw4p/ton-fragment/raw/master/images/main_page_fragment.jpeg
)](https://pypi.org/project/ton-fragment/)

### Note: ⚠️ This package is still under develop and needs your contribution. Sometimes maybe you get an error, It's normal and fine; You can open an issue to keep me informed.

### Installation

```sh
$ pip install ton-fragment
```
Also can be found on [pypi](https://pypi.org/project/ton-fragment/)

## Usage
### Available options
```python
Usernames('auction')
Usernames('auction', 'listed')
Usernames('auction', 'ending')

Usernames('sold')
Usernames('sold', 'listed')
Usernames('sold', 'ending')

Usernames('sale')
Usernames('sale', 'listed')
Usernames('sale', 'ending')

Numbers('auction')
Numbers('auction', 'listed')
Numbers('auction', 'ending')

Numbers('sold')
Numbers('sold', 'listed')
Numbers('sold', 'ending')

Numbers('sale')
Numbers('sale', 'listed')
Numbers('sale', 'ending')
```
### Usernames
Get All Usernames - Top Auctions:
```python
from ton_fragment.usernames.usernames import Usernames
all_usernames = Usernames('auction')
print(all_usernames.result)
```
Get All Usernames - Top Auctions - sort by recently listed:
```python
from ton_fragment.usernames.usernames import Usernames
all_usernames = Usernames('auction', 'listed')
print(all_usernames.result)
```
Get All Usernames - Top Auctions - sort by ending soon:
```python
from ton_fragment.usernames.usernames import Usernames
all_usernames = Usernames('auction', 'ending')
print(all_usernames.result)
```
### Numbers
Get All Numbers - Top Auctions:
```python
from ton_fragment.numbers.numbers import Numbers
all_numbers = Numbers('sale')
print(all_numbers.result)
```
Get All Numbers - Top Auctions - sort by recently listed:
```python
from ton_fragment.numbers.numbers import Numbers
all_numbers = Numbers('sale', 'listed')
print(all_numbers.result)
```
Get All Numbers - Top Auctions - sort by ending soon:
```python
from ton_fragment.numbers.numbers import Numbers
all_numbers = Numbers('sale', 'ending')
print(all_numbers.result)
```
Get a brief information about a number
```python
from ton_fragment.numbers.number import Number
my_number = Number('8888888')
print(my_number.data)
print(my_number.number)
print(my_number.status)
print(my_number.ends_in)
```
## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=iw4p/ton-fragment&type=Date)](https://star-history.com/#iw4p/ton-fragment&Date)

### Issues
Feel free to submit issues and enhancement requests or contact me via [vida.page/nima](https://vida.page/nima).

### Contributing
Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow.

 1. **Fork** the repo on GitHub
 2. **Clone** the project to your own machine
 3. **Update the Version** inside __init__.py
 4. **Commit** changes to your own branch
 5. **Push** your work back up to your fork
 6. Submit a **Pull request** so that we can review your changes

MIT License

Copyright (c) 2022 Nima Akbarzade

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
