Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install wow.realmstatusapi

How to install wow.realmstatusapi

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install wow.realmstatusapi
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.4 Available View build log
0.3 Available View build log
Windows (64-bit)
0.4 Available View build log
0.3 Available View build log
Mac OS X (10.5+)
0.4 Available View build log
0.3 Available View build log
Linux (32-bit)
0.4 Available View build log
0.3 Available View build log
Linux (64-bit)
0.4 Available View build log
0.3 Available View build log
 
Author
License
GPL
Dependencies
Lastest release
version 0.4 on Jan 5th, 2011

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)

    System Message: WARNING/2 (<string>, line 28); backlink

    Inline emphasis start-string without end-string.

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)

System Message: WARNING/2 (<string>, line 70); backlink

Inline emphasis start-string without end-string.
>>> 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)

System Message: WARNING/2 (<string>, line 79); backlink

Inline emphasis start-string without end-string.
>>> type = realmstatus.get_realm_type("Azshara")["Azshara"]
>>> type == "PvP"
True

Contributors

Marc Goetz, Author

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.