Skip to main content

An asynchronous wrapper for the Pretend API.

Project description

# PretendAPI

PretendAPI is an asynchronous wrapper for the Pretend API, designed to simplify 
the process of fetching user information from the official Pretend API.

## Features

- Asynchronous requests using `aiohttp`
- Dot notation access to JSON responses
- Rate limiting support
- Handles exceptions gracefully

## Installation

You can install the package via pip:

```bash
pip install pretendapi

Methods

get_userinfo(user_id: int)

Fetches user information about a Discord user.

  • Parameters:
    • user_id (int): The user ID of the user.
  • Returns: User information with dot notation access.

get_tiktok_user(username: str)

Fetches information about a TikTok user.

  • Parameters:
    • username (str): The TikTok username.
  • Returns: TikTok user information with dot notation access.

get_instagram_user(username: str)

Fetches information about an Instagram user.

  • Parameters:
    • username (str): The Instagram username.
  • Returns: Instagram user information with dot notation access.

get_twitter_user(username: str)

Fetches information about a Twitter user.

  • Parameters:
    • username (str): The Twitter username.
  • Returns: Twitter user information with dot notation access.

get_roblox_user(username: str)

Fetches information about a Roblox user.

  • Parameters:
    • username (str): The Roblox username.
  • Returns: Roblox user information with dot notation access.

get_signed_biolink(username: str)

Fetches information about a signed.bio user.

  • Parameters:
    • username (str): The signed.bio username.
  • Returns: signed.bio user information with dot notation access.

Usage

Here's a basic example of how to use the PretendAPI:

import asyncio
from pretendapi import PretendAPI

async def main():
    api_wrapper = PretendAPI(api_key="YOUR_API_KEY")
    
    
    user_info = await api_wrapper.get_userinfo(user_id=123456789)
    
    
    print(user_info.username)  

asyncio.run(main())

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pretendapi-0.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretendapi-0.1.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pretendapi-0.1.3.tar.gz.

File metadata

  • Download URL: pretendapi-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pretendapi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5cafc814af1b8279171713c9e177ad1a286b852cdd2bc45882971d28af5ce16c
MD5 8f558936c788aec9e8aadce41eca1667
BLAKE2b-256 e1509f4dd3dbd6b8f26378d9c965cdf08fc01a4b707c5606cda5adec8341a0e7

See more details on using hashes here.

File details

Details for the file pretendapi-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pretendapi-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pretendapi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e116deb77ed0c65d3521eff268d0211d0c1e1612f19b3c6f6b5328c00df635c0
MD5 55b5c6e2711cf6ce77afc0e3d2eb57bc
BLAKE2b-256 fe798de3f9d0f117301911b5fa71ac47963c6cbde41869440fc65dd2270c9144

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page