Code Monkey home page Code Monkey logo

wiseoldman-py's Introduction

Archived! ๐Ÿ—„

For a way better, actually published, and maintained package check out wom.py


Pythonic Wise Old Man wrapper.

WiseOldMan-Py is a simple Python wrapper for wiseoldman.net, an Old School RuneScape stat tracking site.

Example Usage

import wiseoldman
from wiseoldman_py.player import Player


wom = wiseoldman.WiseOldMan()
bexlii: Player = wom.get_player("bexlii") # Creates Player object, with player's most recent snapshot. Searchable by user id as well
bexlii_achivements: list[Achievement] = bexlii.get_achievements()
bexlii_competitions: list[Competition] = bexlii.get_competitions()

print(bexlii_achivements)
print(bexlii_competitions)
print(bexlii.latest_snapshot.attack.exp)

๐Ÿ‘† Would output ๐Ÿ‘‡ (Formatted nicley for your viewing pleasure)

[
    Achievement(threshold=13034431, player_id=369451, name='99 Cooking', metric='cooking', created_at=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), 
measure='experience'),
    Achievement(threshold=13034431, player_id=369451, name='99 Strength', metric='strength', created_at=datetime.datetime(2021, 12, 6, 22, 41, 6, 396000, tzinfo=datetime.timezone.utc),measure='experience')
]
[
    Competition(competition_id=8147, title='Skill of the Week', metric='mining', score=0, starts_at=datetime.datetime(2021, 12, 27, 5, 0, tzinfo=datetime.timezone.utc),
ends_at=datetime.datetime(2022, 1, 3, 5, 0, tzinfo=datetime.timezone.utc), competition_type='classic', group_id=None, created_at=datetime.datetime(2021, 12, 26, 14, 6, 3, 760000,      
tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2022, 1, 3, 6, 0, 1, 736000, tzinfo=datetime.timezone.utc), duration='1 week', participant_count=16),
    Competition(competition_id=5766, title='Who is the biggest No Life?', metric='overall', score=0, starts_at=datetime.datetime(2021, 9, 17, 5, 0, tzinfo=datetime.timezone.utc),      
ends_at=datetime.datetime(2021, 9, 24, 5, 0, tzinfo=datetime.timezone.utc), competition_type='classic', group_id=None, created_at=datetime.datetime(2021, 9, 14, 1, 44, 6, 323000,      
tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2021, 9, 24, 6, 0, 0, 589000, tzinfo=datetime.timezone.utc), duration='1 week', participant_count=71)
]
2601528

Endpoints

Player

  • /players ๐Ÿ‘‰ WiseOldMan.get_player(username=, user_id=) -> Player
  • /players/<id>/achievements ๐Ÿ‘‰ Player.get_achievements() -> List[Achievement]
  • /players/<id>/competitions ๐Ÿ‘‰ Player.get_competitions() -> List[Competition]

Groups

  • /groups/<id> ๐Ÿ‘‰ WiseOldMan.get_group(group_id=) -> Group

wiseoldman-py's People

Contributors

joshpaulie avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.