Metadata-Version: 2.1
Name: replitapi-JustFinnbarM
Version: 0.0.1
Summary: Tools for interacting with the replit site and database that do not depend on an ancient version of Flask.
Home-page: https://replit.com/@xfinnbar/Replit-API
Author: Finnbar M
Author-email: xfinnbar@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: bs4

# Replit API

## Database

Works exactly the same as the official implementation, but doesn't depend on Flask 1.1.2! See the official docs: https://replit-py.readthedocs.io/en/latest/api.html#module-replit.database

## Web scraper

```python
get_user_data(query, mode = "username")
```
`mode` - What to query by. Can be `"username"` or `"url"`.

`query` - The item to look for. Must be in format with the `mode`.

Returns: 
```python
LiteralObject({ # LiteralObject just behaves like a class for this purpose. Keys = Attributes.
    "favourite_langauges": [str(languages)],
    "cycles": int(cycles),
    "profile_picture": str(img_url)
  })
```

```python
get_repl_data(query, user = "", mode = "name")
```
`mode` - What to query by. Can be `"name"` or `"url"`.

`user` - Specifies the user to search for if the `mode` is `"name"`. Can be ommited if the `mode` is `"url"`.

`query` - The item to look for. Must be in format with the `mode`.

Returns: 
```python
LiteralObject({ # LiteralObject just behaves like a class for this purpose. Keys = Attributes.
    "favourite_langauges": [str(languages)],
    "cycles": int(cycles),
    "profile_picture": str(img_url)
  })
```

More to come!

