Skip to main content

Rolimons API Wrapper

Project description

Rolimons PY

A Python API wrapper for Rolimons.

RoliPY is an API wrapper for Rolimons that includes several features that other wrappers for Rolimons don't include. The project is being actively maintained currently.

Getting Started
To get started, clone the repository using, $ git clone https://github.com/wa1ker38552/RoliPY in shell.

Documentaton

The wrapper contains a class along with 2 subclasses to handle and organize data. These include Rolimons, Item, and User classes.

rolimons
Functions defined:

leaderboard() Fetches a list of players from the Rolimons leaderboard.
Example:

rolimons.leaderboard()

[{'name': Roblox, 'rank': 1, 'value': 100000, 'rap': 100000}, ...]

leaks() Fetches a list of recently leaked Roblox items.
Example:

for leak in rolimons.leaks():
  print(leak['timestamp'])
  print(leak['name'])
  print(leak['image'])
123456
Valkrie Helm
https://tr.rbxcdn.com/...

new_limiteds() Fetches a list of recent items that have become limiteds.
Example:

.new_limiteds(limit=10)

[{'name': Valkrie Helm, 'rap': 100000}, ...]

get_trade_ads() Fetches a list of recent trade ads.
Example:

rolimons.get_trade_ads()

[{'user': John Doe, 'offering': [<rolimons.Item Object>, ...], 'requesting': [<rolimons.Item Object>]}, ...]

Note: If a trade does not have a request for items, it will switch out the request key with the tag key.
get_market_activity() Fetches a list of recently sold items tracked by rolimons
Example:

for item in rolimons.get_market_activity():
  print(item['item'])
  print(item['old_rap'])
  print(item['new_rap'])
  print(item['timestamp'])
<rolimons.Item Object>
1000
1200
123456

rolimons.User
Parameters:

You can search for a user by id or by name when passing it as a parameter. To search for id, use rolimons.User(id=12345) and to search for name, use rolimons.User(username='Roblox')

Attributes:

self.id User id
self.username User name
self.value Total value
self.rap Total rap
self.trade_ads Total trade ads sent
self.inventory All items in users inventory in <rolimons.Item Object>

Functions defined:

get_metadata() Refreshes all data for the specified user. This includes, rap, value, inventory, and trade_ads
Example:

user = rolimons.User('Roblox')
user.rap

user.get_metadata()
user.rap
10000
10001

query_user(username) Searches Roblox to match username to an id
Note: This function cannot be used on the client end.

rolimons.Item
Parameters:

You can only search for item by id, rolimons.Item(12345). An additional parameter you can pass in is raw which is the raw marketplace table containing item values. This is so that you don't hit rate limits if you try to keep searching for items. You have to pass in the 'items' key from the itemtable not the entire table.

raw_data = requests.get('https://www.rolimons.com/itemapi/itemdetails').json()['items']

items = [12345, ...]
objects = []
for item in items:
  objects.append(rolimons.Item(item, raw=raw_data))

Attributes:

self.id Item id
self.name Item name
self.value Item value
self.rap Item rap

Functions defined:

sales_data() Gets rolimons sales data about item Example:

for sale in rolimons.Item(12345).sales_data():
  print(sale['timestamp'])
  print(sale['price'])
  print(sale['old_rap'])
  print(sale['new_rap'])
123456
1000
900
950

rolimons.Client
The only parameter is your Rolimons cookie which should look something like _ga=GA1...

client = rolimons.Client('cookie')

Attributes:

self.token Rolimons cookie
self.client request.Session object with your Rolimons cookie in headers. Used for your own tests outside of class

Functions defined:

update_wishlist(): Updates and overrides your Rolimons wishlist. Enter values in list format and returns request status code.
Example:

client = rolimons.Client('token')
status_code = client.update_wishlist([12345, 54321])
print(status_code)

200

update_asking(): Updates and overrides your asking tags on Rolimons. A dictionary with the item id as key and list of tags as values will be required as parameter returns status code
Example:

client = rolimons.Client('token')
status_code = client.update_asking({12345: ['overpay', 'upgrades'], 54321': ['nft']})
print(status_code)

200

add_player: Adds a player to Rolimons. The only parameter is username. Returns status code
Example:

client = discord.Client('token')
status_code = client.add_player('Roblox')
print(status_code)

200

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

rolimons-1.3.0.tar.gz (7.0 kB view hashes)

Uploaded Source

Supported by

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