Skip to main content

Python World of Warcraft Realmstatus API

Project description

Change history

Changelog

0.1 (09-13-10)

  • Initial release

0.2 (09-13-10)

  • Added doctest

0.3 (09-13-10)

  • More detailed doctest (also used as readme)

0.4 (09-16-10)

  • Fixed a typo in the doctest

  • Changed get_realm_status(self, name) and get_realm_type(self, name) to (self, * names)

Detailed Documentation

Introduction

The realmstatus-API reads the realmstatus-xml from wow-europe.com to get the status of a specified realm (“Realm Up/Realm Down”) and the type of the realm (PvE,PvP etc.).

Usage

To use the API, just do an import like this

>>> from realmstatus_api import Realmstatus

Mock Realmstatus.get_realm_status and Realmstatus.get_realm_type

Returns output similar to what we would get from the API, so that this test can be used while offline

>>> from test_realmstatus import mocked_get_realm_status, mocked_get_realm_type

Mocking the functions

>>> Realmstatus.get_realm_status = mocked_get_realm_status
>>> Realmstatus.get_realm_type = mocked_get_realm_type

First create an instance of the Realmstatus object

>>> realmstatus = Realmstatus()

To get the status of a realm, use get_realm_status(* names). If you want, you can get the status of multiple realms (in a dictionary)

>>> status = realmstatus.get_realm_status("Azshara")["Azshara"]
>>> status == "Realm Up"
True

To get the type of a realm, use get_realm_type(* names). If you want, you can get the type of multiple realms (in a dictionary)

>>> type = realmstatus.get_realm_type("Azshara")["Azshara"]
>>> type == "PvP"
True

Contributors

Marc Goetz, Author

Download

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

wow.realmstatusapi-0.4.zip (7.8 kB view details)

Uploaded Source

File details

Details for the file wow.realmstatusapi-0.4.zip.

File metadata

  • Download URL: wow.realmstatusapi-0.4.zip
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wow.realmstatusapi-0.4.zip
Algorithm Hash digest
SHA256 3ffa47f995e433ea0fe73989fec66e14d764180b042c2947e7021cfbed006a52
MD5 a5223e260c2a346a7bc5d2e3b80cc705
BLAKE2b-256 d27c49d9e8700574dd25a95500ed49b3b6555e08a3cb439459ae905481e029cf

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