ChatWars API
176 subscribers
4 photos
35 links
Download Telegram
#faq If you experiencing any 'ACCESS_REFUSED' errors while trying to work with queues, please be sure that you aren't trying to declare anything. Everything is pre-declared for you. Just consume/publish right away.
#faq some python users are experiencing timeouts trying to connect to API, so here is simple, presumably working, example https://gist.github.com/BlaQPhoeniX/d75cdd7499217ec225ef6722668eb59b
If you are getting NotRegistered result for getInfo action, this means that we forgot to actually register your application, and payin/payout wouldn't work for you. Please report to feedback or whine a bit at @cwapi chat.
Wellp, there was a little *ahem* outage during the last 5 hours, due to recent network failure. Please report such an incidents to @ChatWarsFeedbackBot
And here comes ... TEH API UPDATE! It looks insignificant, but in fact it is almost a complete rewrite. So except some turbulance here and there.
Starting from version 0.4, applications will be able to read stock and profile info of the users, if they are granted access of course. And there is a new feed for exchange with top 5 offers for each item. Stay tuned.

https://hackmd.io/s/rJb2odE_f
Darnit! Forgot to mention. Rabbit is going (already gone) for maintenance.

PS: But hey, at least I posted it.
And we're live. Thanks for patience.
Well, we are managed to ate all the avaliable RAM on broker, so I had to remove some queues with no consumers and limit the maximum size of any queue to 1Mb (about ~8k messages).
While guilds are springing up like mushrooms after the rain for the developers castle, to kill boredom of stable production here is a small API update.
- user profile now has class, guild, mana and current stamina readings
- the new fan-out named 'yellow_pages' is here as well. Every 5 minutes there will be an array of open shops that are published to the yellow pages (the 🔔 thingie), with all the details you need to know
- for players there is a /revoke command, to (wait for it) revoke all the tokens and effectively deauth all the bots.
Access to the yellow pages is free as usual. All you need to do is request the declaration of your own queue via feedback. Have fun consuming AMQP :)

https://hackmd.io/s/SJK6Zl1RM
CW API v0.6.0 — The Rise of the machines

Ever wondered if it is an illegal bot or just a very quick human being who snipes away your attempts to transfer stock via exchange? Well now you can be 100% certain that it is a cold-blooded machine, because this update exposes 'wtb' command on the API, so you castle bot or some other application are able to issue buy orders on your behalf.

Onwards! Siege your castle devs! Make them use it as soon as possible!

(and there was a little bugfix as well)

https://hackmd.io/s/Hk60PGm0z
Let's not point fingers, okay, but recent API outage was caused by:
- me, being unable to calculate proper memory quota
- you, leaving pre-declared queues full

2018-05-22 14:20:19.676 [warning] <0.267.0> memory resource limit alarm set on node 'rabbit@chtwrs-rmq'.


Now it should be flying high, as always. Cheers.
Ах да, в тестовом режиме, по адресу amqps://api.chtwrs.com:5673 доступно API для CW3. Оно абсолютно идентично международной версии. Доступ можно получить отправив название приложения и его краткое описание в @ChatWarsRuFeedbackBot. За помощью можно обратиться к единомышленникам в @cwapi. Развлекайтесь!
—
By the way, the test version of CW3 API is up and listening at amqps://api.chtwrs.com:5673. It's completely identical with international version. Access is granted in exchange of application name and it's purpose being sent to the @ChatWarsRuFeedbackBot. If you have troubles dealing with it, you can ask other fellow developers for help at @cwapi. Have fun!
In the flood of 'gimme access I want to snipe goods for myself' asinine requests there was an actually useful application for you, guys and gals.

Yeah, I know that it might be rigged in all possible ways, so gamer discretion is advised, but anyways, behold:

In the bot @CastleRobot there is a lottery for pouches!
How it works?
1. You can buy up to 3 tickets at one drawing period (3 days)
2. Once in every 3 days, a random winning ticket is drawed
3. The owner of the winning ticket number will received all participated lottery fund during one drawing period

How to participate?
1. Click /start in the @CastleRobot, a code will be sent by chat war bot.
2. Forward the messages with the code from chat wars to complete the registration.
3. Click "Games"
Ah, we have the github version of an API reference now. PR are welcome!

https://github.com/chatwars/chatwars-api-docs
All of you who didn't get access to the API, please, repeat your requests :) And to be 100% sure, please mail them to support@chtwrs.freshdesk.com (please mention your telegram username, application name, it's purpose, default permissions and required fanouts). Any questions about the API are welcome at our @cwapi
The new kind of fan-out has come. It's called an 'au_digest'. This exchange will receive the list of all active auctions every 3 minutes. Exciting, huh? The documentation is here.

Diftor heh smusma!
Ah, by the way, as you keep ignoring my 'please consume your queues' calls, I had to restrict the queue sizes to 512kb for cw3 instance as it ran out of free memory and had to use swap few times forcing you to fersel manually.

For the Empire!
The CW API servers are now getting new haircut (kinda). Expect reboots or whatnot.
CW API v0.8.0 — The Secret of the Guild

Do you need to have an up-to-date information about your guilds?
Just tinker with a brand new guildInfo action. Now every guild member can leak your guild secrets to third-party API bots! Isn’t it great?

More info @ https://chatwars.github.io/chatwars-api-docs/
CW API v0.9.0 — Craft/Alchemy books are exposed

Remember the day your blacksmith still had an access to his craftbook?
«If you can’t or not willing to fix the bug by yourself, just outsource it!» (c) Ozzy Osbourne

More info @ https://chatwars.github.io/chatwars-api-docs/