all new API at http://weewar.com/api
YEEHAW! ![]()
I'll start to make use of this instead of the old HTTP hits, but not that soon. I intend to fully move to this, though, assuming it all works the way we expect it to. ![]()
You tell us - we are fully committed to support the API as much as we can.
Okay, first query: Can we get the http://weewar.com/api1/users/ path to take some parameters? Like, instead of people active in the last 7 days, let us specify a number smaller than 7. Maybe the number in hours, even (12, 24, 36, 48, 72, etc.)
Either that, or give me the last active time in the listing. Otherwise, I can't really use it to get just a smaller list. The 7 day list is 1700 people long, and I don't want to do even an API pull for all 1700 users.
More like 200 or 300.
Woa... can't wait until the first Widgets and/or stats Pages pop up (others than the nice toplist of Pistos)
You could show the information available via the list and offer a link to the profile so people could get more information there. Or you could request user specific information at the time requested by your viewers and cache it then.
If anyone is looking to build widgets for Yahoo! Widgets or osx dashboard, and are in need of graphic assistance, let me know. I'm not the best javascript programmer, but graphics I can handle.
I can't for the life of me figure out how to use the headquarters API? If I send a simple GET request I get 404, POST the same. If I do GET with basich auth I get 404, and if I do POST with basic auth I get 404. Any ideas?
Andremar, please give more details on what URL request and what you pass as username and password etc. I'd be glad if I can help. (Or fix the bug if we find one in Weewar)
There seems to be a bug in the API headquarter service (different issue from what andremar has encountered, though). We'll fix shortly!
Bug is found and fixed. Please note the url change to http://weewar.com/api1/headquarters for headquartes.
With the bugfix I get stuff back, thanks![]()
Great. Sorry for the trouble. Looking forward to see what you are up to.
If anyone see this and wanna help me test something out, feel free to invite andremar to a game of weewar now.
why is readyToPlay false when I have 1 game where it is my turn?
readyToPlay is about the "Ready to play" list in the Community tab in Weewar and not connected to your current games.
aha, that explains it :p I found what I needed was in HQ now, so its all moving along nicely![]()
What I am writing is a OS X StatusBar item that lets me know when I have unplayed games, and gives me a list of current games where I can click to open that game in my browser
Andremar, do you have a specific website that you plan to release your program/Status-bar-item at? Or by what means you will be making it available? I'm very interested and would like to try it out as soon as you are done.
![]()
same here!
its in svn now, it depends on PyObjC and can be found at http://svn.palle.net/projects/weewar/trunk/pyWeeStatus/
If anyone feels like making some better icons (I just ripped of the gray and green arrow for now), feel free to get in touch. I'm going to look into making a better installer or something soon, but it needs to be more polished first.
Ohh, set the WEE_USER and WEE_KEY enviroment variables before running it. No configurationscreen yet![]()
Thanks for the speedy delivery!
Hey Andremar,
Quick question about your program. I'm a little bit of a newbie when it comes to these APIs, but what does the WEE_KEY value look like, how do you get it, and, why is it needed?
Thanks!
The headquarters part of the api is per user, you can only get it for your own user account. The key can be found on the bottom of the Your Account page of Weewar, and it is sort of a password that allows weewar to know that you are only accessing your own headquarters.
OK - I guess I'll have to wait until there is a more "point and click" version available
Care to share a preview screen?
ok, just to alert anyone updating or checking out the sources now, it now needs to be built before it can be run. build with python setup.py py2app -A, run it with dist/pyweestatus.app/Contents/MacOS/pyweestatus or something very close to that.

The arrow on the stausbar is the white one when no games are ready, and clicking the menu item for a game opens that game in your default browser
Yay! this is soooo good
just having a hard time figuring out how to open windows so I can add preferences![]()
That looks really nice so far Andremar. Great work!
I made an AIR app which uses the API to check for waiting games. Check it out and let me know what you think. It is cross platform and dead simple to install.
sorry bkroeze. It did not work for me. I filled in and click the icon and it never updated.
Updated the AIR app, so that if you have waiting games, and you click on the message, you go to the HQ.
Madmike, try re-launching it. The program doesn't work the first time you launch it, for some crazy reason.
@bkroeze:
I tried it out and had a few problems. First things I noticed is that there is a question mark right in the middle of the widget that is very distracting because it's right in the middle of the word 'Token'. When attempting to drag the window it would only select the text (and indeed everything else) in the window - even if I dragged the top bar and right clicked the taskbar selection and tried "moving" it. Both failed to move the window.
Also, and most importantly - after entering the information, I couldn't save it. Both the top right "save" button and the "power" button (which I assume closes it) don't work.
If you want screenshots or anything that would help - or suggestions to fix the problem let me know.
Darthnerdus, that's what it does when it doesn't work the first time. Have you quit and re-launched?
I had some trouble getting it to work but it is working fine now. 
Three times now. Should I just reboot? I will say that I just installed AIR before running it.
I think it would be even nicer if it was listing the games one has and link directly to them plus an indicator if it was my turn in any of them. But great start! And congrats on getting it out so incredibly fast!
OK, I just verified that it doesn't work on Windows. So much for cross-platform! I'll fix it and post here when I get it working, probably something very simple.
(i am on a mac ... )
My Macbook is down for the count at least until next week. So I've been forced to switch my primary OS for the past week.
@bkroeze: Alright, I'll be here waiting to test out whatever you come up with for Windows. I'm always willing to try it out before you release it just to make sure it works if you want. And I second what Alex said about the speedy delivery - you're doing great for such a short time!
OK, the AIR app works on my Vista test box now.
yah im on win xp let me download this new one.
i sold my old macbook waiting to get a new intel one this xmas
now it works. cool thx bkroeze
I have it working now too.
Two feature suggestions if you can figure out how to do that in AIR.
1) Possibly allow for control of transparency (not that important, but would go great with second suggestion.)
2) Allow for the window to be "Always on Top".
Works great as-is though, looking forward to any further development as always!
Thanks for the testing. I'll make a new thread for app suggestions, so this one doesn't get thoroughly hijacked.
Some requests:
I was thinking of taking a stab at making a Weewar Notifier Firefox extension, would people be interested in something like that?
bkroeze: if you ever want help with your AIR App, let me know - it'd be a great excuse for me to start messing with that stuff again [day job == flash developer]![]()
me me me.. firefox.. yes. please!
@Andremar: will add example code asap and look into the "waiting for players" bit as well
YES!!!!!!!
Anything that plugs into Firefox is good ![]()
cool cool, i hope to start working on the Firefox extension tonight.
FF = the best ! Mostly because the extensions and partly because their tabs are better than IE's and because IE is a copycat
i'll get started on a simple version then, keeping you guys posted.
thanks!
[looks like i got some work to do!]
I've been doing some work in Greasemonkey, but it is only useful if you've got a Weewar window open. It triggers an alert (not the greatest thing if you're playing two games on the same map) as soon as it is your turn and the page reloads. I started another thread about it (RFC: Request for comments). It depends on the layout/IDs of the game/headquarters pages, so it could break if the devs make a lot of changes. It survived the last change, but I have not added support for the status triangle area.
@straind: interesting, I haven't worked with Greasemonkey much but I have heard it is powerful. The extension I am starting to build would add an icon down in your browser's status bar and periodically check for updated/new hq/game data - something very similar to the GMail Notifier extension, although I don't think it will be as elaborate [well, maybe not this time around
]
so you could be viewing other sites, etc, (perhaps even something productive) and get your weewar alerts. not as kick-ass as a desktop notifier of course![]()
That would be fine for me. The only time Firefox isn't running is when I'm restarting it to regain some memory and speed. I'd love to get rid of my alerts. There's nothing like typing along and suddenly changing tabs when it's your turn.
Alex/bert: With more widgets and tools coming out, can I request that you setup a push API as well? You can make it fairly restricted and controlled, but the whole idea would be that devs can conform to some standard, such as a specific port on a machine, or maybe an e-mail system, which would push data out to subscribed third-party people/services, instead of people constantly polling the system to check for changes.
A push sounds good to me. While we're brainstorming, how about a protocol that allows multiple players to sign up on a server. For example the WWPA server might allow 100 people to connect to it. It registers them with the Weewar push API server and relays messages for them. Then users can sign up for whichever push service/server has the push options (SMS, IM, IRC, email, etc.) they wish to use.
In case that wasn't clear enough, here's a few examples:
The WWSMSAS (Weewar SMS Appreciation Society) server would allow users to sign up and have their information sent by SMS.
The WWMPPA (Weewar Multiple Push Protocol Association) server would allow users to sign up and have their information sent by any or all protocols embraced by the WWMPPA.
Now that I think about it, it wouldn't be necessary to keep the servers connected to the Weewar server if a web service were used. The Weewar server would simply use the web services of registered "service providers" for each event (to be decided) relevant to a user who registered with that service provider.
Clear as mud? Good.
Yes, that's what I'm getting at. For example, if I sign on as an official push subscriber, the weewar.com servers would push data to me, either by e-mail or to a port. I wouldn't have to poll the weewar.com servers any more.
Sorry Pistos. I thought you were suggesting that the Weewar server push to individuals, and I was suggesting that they push to (possibly several) messaging servers that individuals could sign up for.
Well, I think they should set something up where nearly anyone could subscribe to the push feed. They would of course have to be developers to make use of the push data, though.
Can I request that archived game IDs be listed in /api1/user/username? It only seems to list active games. This would facilitate smooth transportation of games from the main site to the WWPA replay archive.
Sending ...