Python World of Warcraft Activity 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
Modified to fetch en_GB XML if Plone language is “en”, if “de” -> de_DE XML, for better i18n
Changed get_activity(self, name, realm, zone, language) to get_activity(self, name, realm, zone, language, count) so you can manipulate how many activities it returns
Detailed Documentation
Introduction
The activity-API reads the character-activity-sheet from the Armory to get the five last actions of the character.
Usage
To use the API, just do an import like this
>>> from activity_api import Activity
Mock Realmstatus.get_realm_status
Returns output similar to what we would get from the API, so that this test can be used while offline
>>> from test_activity import mocked_get_activity
Mocking the functions
>>> Activity.get_activity = mocked_get_activity
First create an instance of the Activity object
>>> activity = Activity()
To get the recent activities, use get_activity(name, realm, zone, count) count must be <your desired count of activities> + 1, if you want 5, count must be 6, etc.
>>> activities = activity.get_activity("Kutschurft", "Azshara", "EU", 6)
>>> test_activities = [u'Earned the achievement [Neck-Deep in Vile (10 player)].',
... u'Has now completed [Victories over the Lich King (Icecrown 10 player)] 4 times.',
... u'Has now completed [Sindragosa kills (Heroic Icecrown 10 player)] 2 times.',
... u'Has now completed [Valithria Dreamwalker rescues (Heroic Icecrown 10 player)] 4 times.',
... u'Has now completed [Blood Queen Lanathel kills (Heroic Icecrown 10 player)] 6 times.']
>>> activities == test_activities
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
File details
Details for the file wow.activityapi-0.4.zip.
File metadata
- Download URL: wow.activityapi-0.4.zip
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfdba3f5b06d3651abe19caf4852fd5fbb6a476c5e5926b121921be19e2633da
|
|
| MD5 |
f5ce009d4ec5859f1ab1d1a71e7a26ad
|
|
| BLAKE2b-256 |
a44883a481a8812d38924e9c49fcb5651f3e2e74c91fbbdc284cf83aa44d70da
|