API feeds from erepublik.no

Everything related to eNorway that does not fit anywhere else.
Post Reply
User avatar
Ursidae Polar
Administrator
Posts: 609
Joined: 29 Nov 2011 22:26

API feeds from erepublik.no

Post by Ursidae Polar » 05 Jun 2012 01:23

In lack of a working API from eRepublik, I will try to add some services from data I'm collecting and add the link to the various feeds on this page.

Limited preview, to be expanded in evaluation of performance :)

Citizen Statistics
http://api.erepublik.no/citizen/5382604/stats JSON format
Simply replace the numbers with the desired citizen id to view their stats.
You'll get a "File not Found" error if the ID is not registered in the database, contact me if you need this ID in the feed.

Citizen Info
http://api.erepublik.no/citizen/5382604/info
Simply replace the numbers with the desired citizen id to view their info

Country Treasury
http://api.erepublik.no/country/37/treasury JSON format
http://api.erepublik.no/country/37/treasury.xml XML format
Replace the numbers with the respective country ID (can be found on Marketplace in-game).
Contact me if you get a "File not found" for the country you tried for, and I'll add it to the list.

Requests
To add your citizen to the citizen statistics feed, PM me your ingame ID and I'll add you.
Any other feeds you would find interesting, comment on this thread.
I will also try to build a web-interface around these feeds so they become more readable for those not consuming the services.
retired citizen

User avatar
skaue
Administrator
Posts: 1529
Joined: 02 Nov 2009 10:00
Location: Sortland, Norway

Re: API feeds from erepublik.no

Post by skaue » 05 Jun 2012 09:59

Now all there is missing is the SLA... ;)

Tommy Skaue
IRC: cherub
History: Country President - Government - Party President - Congress

User avatar
Ursidae Polar
Administrator
Posts: 609
Joined: 29 Nov 2011 22:26

Re: API feeds from erepublik.no

Post by Ursidae Polar » 05 Jun 2012 10:09

skaue wrote:Now all there is missing is the SLA... ;)
you do that :P
retired citizen

User avatar
Ursidae Polar
Administrator
Posts: 609
Joined: 29 Nov 2011 22:26

Re: API feeds from erepublik.no

Post by Ursidae Polar » 06 Jun 2012 23:06

retired citizen

Etse
Steady Poster
Posts: 92
Joined: 19 Aug 2008 16:05

Re: API feeds from erepublik.no

Post by Etse » 13 Aug 2012 22:19

Cherub talked about letting the IRC-bot post some information in the IRC-channel through this API though I dont really see why it would be any usefull. Could there be any interesting things people would like to have access to through some easy IRC-commands?
- Ingame nick: Etselou

User avatar
taulen
Administrator
Posts: 1229
Joined: 08 Feb 2008 19:51

Re: API feeds from erepublik.no

Post by taulen » 13 Aug 2012 23:36

How many hits last day could be useful.
How much damage with lets say 50 hits, and so on. Like the original erepublik bot had.

User avatar
skaue
Administrator
Posts: 1529
Joined: 02 Nov 2009 10:00
Location: Sortland, Norway

Re: API feeds from erepublik.no

Post by skaue » 13 Aug 2012 23:41

Jeg begynte å drodle før jeg tenkte tanken helt ut. Tenkte "Det hadde kanskje vært kult om.... hmm... men det kan man jo enkelt gjøre uten bot" om sikkert 3-4 forskjellige ting. Så jeg skrev til Etse at jeg måtte tenke mer... hehe. Men smart å spørre her da. Jeg liker den forum-boten. Har faktisk litt lyst til å ha den i #enorge. Skjer jo fint lite der om dagen.

Tommy Skaue
IRC: cherub
History: Country President - Government - Party President - Congress

Etse
Steady Poster
Posts: 92
Joined: 19 Aug 2008 16:05

Re: API feeds from erepublik.no

Post by Etse » 14 Aug 2012 00:08

taulen wrote:How many hits last day could be useful.
How much damage with lets say 50 hits, and so on. Like the original erepublik bot had.
I dont think this information is avalible in the API. Maybe then can be added? (Though, I dont know how you want to fetch this data from erepublik)

skaue wrote:Jeg begynte å drodle før jeg tenkte tanken helt ut. Tenkte "Det hadde kanskje vært kult om.... hmm... men det kan man jo enkelt gjøre uten bot" om sikkert 3-4 forskjellige ting. Så jeg skrev til Etse at jeg måtte tenke mer... hehe. Men smart å spørre her da. Jeg liker den forum-boten. Har faktisk litt lyst til å ha den i #enorge. Skjer jo fint lite der om dagen.
I had it there for a night, and some people found it anoying. And to be honest it was. There is no reason to have it in the main channel - as most people that actually want to use it usually browse the forums and know of the channel it is in. And when it is in the main channel it will post a update every now and then (and with new threads there will be some spam as many people answer) - which might make people think "Oh, theres some new posts in the channel!". Just to end up seeing it was spam from the bot.

So I think keeping the bot in his own channel is good for now. But If any commands is added I could make it idle in #eNorge aswell - just to make it easier to talk to the bot. But first I need to find something usefull :)
Last edited by Etse on 14 Aug 2012 00:11, edited 1 time in total.
- Ingame nick: Etselou

User avatar
taulen
Administrator
Posts: 1229
Joined: 08 Feb 2008 19:51

Re: API feeds from erepublik.no

Post by taulen » 14 Aug 2012 00:10

Everything we need is already fetched here, os if it isnt in the api, it wouldnt be hard to include it : http://stats.erepublik.no/citizen/66571

Etse
Steady Poster
Posts: 92
Joined: 19 Aug 2008 16:05

Re: API feeds from erepublik.no

Post by Etse » 14 Aug 2012 00:16

taulen wrote:Everything we need is already fetched here, os if it isnt in the api, it wouldnt be hard to include it : http://stats.erepublik.no/citizen/66571
Okey, if he already have the data it should not be to much work for him to add the damage into the JSON-api. Currently it only has experience, rank and strength :)
- Ingame nick: Etselou

User avatar
taulen
Administrator
Posts: 1229
Joined: 08 Feb 2008 19:51

Re: API feeds from erepublik.no

Post by taulen » 14 Aug 2012 00:31

damage = rank x 10 so yeah not hard :P

Etse
Steady Poster
Posts: 92
Joined: 19 Aug 2008 16:05

Re: API feeds from erepublik.no

Post by Etse » 14 Aug 2012 00:34

taulen wrote:damage = rank x 10 so yeah not hard :P
But I thought how much damage and influence a person did on given days would be more interesting - and for that you would need to know the number of hits aswell (which is on the stats page, but not in API). And If I understand it correctly that data is from a webform?
- Ingame nick: Etselou

User avatar
taulen
Administrator
Posts: 1229
Joined: 08 Feb 2008 19:51

Re: API feeds from erepublik.no

Post by taulen » 14 Aug 2012 00:35

No, the hits is calculated from a formula, automatically.

Etse
Steady Poster
Posts: 92
Joined: 19 Aug 2008 16:05

Re: API feeds from erepublik.no

Post by Etse » 14 Aug 2012 00:37

taulen wrote:No, the hits is calculated from a formula, automatically.
oooh, nice :) Should be possible then, just need to learn the forumlas (Though I would still like if the data was added to the API as it would make it much easier for me ^^)

Edit: Looked at the calculations, they were rather easy. So not verry important to add them anymore. Anyway I would like if there was an API that would list all users together their ID. (So I could do a look-up on a name and get the ID).
- Ingame nick: Etselou

User avatar
Ursidae Polar
Administrator
Posts: 609
Joined: 29 Nov 2011 22:26

Re: API feeds from erepublik.no

Post by Ursidae Polar » 14 Aug 2012 06:51

Yeah I can add the extra bits to the feed :)

will try to get a name-feed up too
retired citizen

User avatar
skaue
Administrator
Posts: 1529
Joined: 02 Nov 2009 10:00
Location: Sortland, Norway

Re: API feeds from erepublik.no

Post by skaue » 14 Aug 2012 08:37

Could you somehow store the association between ingame profile and IRC-nick? Or should be persist that on erepublik.no?

Tommy Skaue
IRC: cherub
History: Country President - Government - Party President - Congress

User avatar
Ursidae Polar
Administrator
Posts: 609
Joined: 29 Nov 2011 22:26

Re: API feeds from erepublik.no

Post by Ursidae Polar » 14 Aug 2012 08:50

skaue wrote:Could you somehow store the association between ingame profile and IRC-nick? Or should be persist that on erepublik.no?
only silly people use different nicks :P
retired citizen

User avatar
skaue
Administrator
Posts: 1529
Joined: 02 Nov 2009 10:00
Location: Sortland, Norway

Re: API feeds from erepublik.no

Post by skaue » 14 Aug 2012 09:44

Well, there happen to be a quite a few of us. We are a dying breed, but still....

Tommy Skaue
IRC: cherub
History: Country President - Government - Party President - Congress

User avatar
Duke jim
Awesome Poster
Posts: 663
Joined: 07 Sep 2009 12:18
Location: Torshälla, Sörmland, Sweden

Re: API feeds from erepublik.no

Post by Duke jim » 14 Aug 2012 09:53

One nick for IRC, one for the forum and finaly one in game. Also got a different one on swedens forum. :D
In-Game: Sir Greggory Groda
IRC: SirGG
My baby eats babies and ladies who snack on fresh babies make great zombie ladies!
''en sann Norgesvenn'' according to Akashaton
Quote or the week: Kroppshår er rene spamme-triggeren for meg! -Stakerauo
ROGGBIV

Etse
Steady Poster
Posts: 92
Joined: 19 Aug 2008 16:05

Re: API feeds from erepublik.no

Post by Etse » 14 Aug 2012 10:28

skaue wrote:Could you somehow store the association between ingame profile and IRC-nick? Or should be persist that on erepublik.no?
Ill add some support for it in the bot where you only need to say your ingame nick once.
- Ingame nick: Etselou

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest