Author Topic: eRepublik feed urls and API information.  (Read 6277 times)

0 Members and 1 Guest are viewing this topic.

Offline AndraX2000

  • UIP SecTech
  • Moderator
  • Full Member
  • *****
  • Posts: 194
  • "patience is my vice"
    • AndraX2000's eRepublik tools
« Last Edit: September 11, 2009, 03:54:19 PM by AndraX2000

Member, Department of Technology
Mass Mailer, Wellness Cost Optimizer, etc.

Offline IceQUICK

  • Mac>Lin>Win
  • Jr. Member
  • **
  • Posts: 71
  • "Those *WERE* the droids I was looking for...."
    • Reliant Group
Re: eRepublik feed urls and API information.
« Reply #1 on: July 05, 2009, 10:09:15 AM »
Has there been any more mention when the gold transfer will go live and actually allow API users to utilize it?

The API-scene is going to get a little crazy when that happens. :)

IceQUICK
Founder / President, Reliant Group
Director, Reliant Market
IT Director, North American University



Online Killing Time

  • "Try It Now"
  • Senator
  • Forum God
  • **
  • Posts: 1349
  • "i can keep rhythm with no metronome"
Re: eRepublik feed urls and API information.
« Reply #2 on: July 05, 2009, 09:47:23 PM »
sweet
"Ninety-nine percent of war is just killing time, while the rest is killing time."

Former Speaker of the House
15th Term US Congressmyn


Offline Relin

  • The Goddamn Batman
  • Military Personnel
  • Forum God
  • **
  • Posts: 1364
Re: eRepublik feed urls and API information.
« Reply #3 on: July 05, 2009, 10:13:45 PM »
Thank you for posting this. I've been struggling with a minor API project for some time now, and I was getting sick of errors popping up.




Offline AndraX2000

  • UIP SecTech
  • Moderator
  • Full Member
  • *****
  • Posts: 194
  • "patience is my vice"
    • AndraX2000's eRepublik tools
Re: eRepublik feed urls and API information.
« Reply #4 on: July 06, 2009, 10:07:46 AM »
Has there been any more mention when the gold transfer will go live and actually allow API users to utilize it?
They haven't given us a date, but Lucian says they've put all work on feeds on hold so they can concentrate on oAuth and Gold transfer.

Offline IceQUICK

  • Mac>Lin>Win
  • Jr. Member
  • **
  • Posts: 71
  • "Those *WERE* the droids I was looking for...."
    • Reliant Group
Re: eRepublik feed urls and API information.
« Reply #5 on: July 06, 2009, 11:11:17 AM »
Has there been any more mention when the gold transfer will go live and actually allow API users to utilize it?
They haven't given us a date, but Lucian says they've put all work on feeds on hold so they can concentrate on oAuth and Gold transfer.
That's good news. I have some ideas, but they're not really worth working on until that module goes production.

Offline IceQUICK

  • Mac>Lin>Win
  • Jr. Member
  • **
  • Posts: 71
  • "Those *WERE* the droids I was looking for...."
    • Reliant Group
Re: eRepublik feed urls and API information.
« Reply #6 on: July 21, 2009, 09:07:31 AM »
Is there a battle feed? How do people know that eUK did 23k damage in X battle and eCanada did 78k, etc....


Offline SonnyD

  • Deputy Director of Intelligence
  • Jr. Member
  • **
  • Posts: 88
  • "Wit beyond measure is a man's greatest treasure."
    • Reliant Group
Re: eRepublik feed urls and API information.
« Reply #7 on: July 21, 2009, 09:09:08 AM »
It breaks down total damage by country after the battle is over.  You can view it in game.
SonnyD
Deputy Director of Intelligence
Deputy Director of Organization Development
Vice President, Reliant Group. In-Game Link | External Link
Moderator, NAU Forums
Regent, NAU Board of Regents
COO, NAU website


Offline AndraX2000

  • UIP SecTech
  • Moderator
  • Full Member
  • *****
  • Posts: 194
  • "patience is my vice"
    • AndraX2000's eRepublik tools
Re: eRepublik feed urls and API information.
« Reply #9 on: July 21, 2009, 04:02:40 PM »
You are right. Thanks. I corrected it in the first post.

Offline Dartooth

  • New Citizen
  • *
  • Posts: 19
    • eAnalytics
Re: eRepublik feed urls and API information.
« Reply #10 on: July 28, 2009, 01:09:51 AM »
It breaks down total damage by country after the battle is over.  You can view it in game.
Total damage in war is shown in game. It isn't battle damage.

Is there a battle feed? How do people know that eUK did 23k damage in X battle and eCanada did 78k, etc....
There is no battle feed. We calculate it. Enjoy...


Offline Endy

  • Forum God
  • ******
  • Posts: 1923
    • Quality-Co
Re: eRepublik feed urls and API information.
« Reply #11 on: September 11, 2009, 09:47:00 AM »
and now there is 8)

 - citizenship was implemented in citizen feed

- there are 2 new feeds related to battles
1) www.api.erepublik.com/v1/feeds/battle_logs/{BATTLE_ID}/{PAGE}
This feed will output battle logs related to the battle and small info about the battle, data is sorted by fight date ascending, which means higher the page more recent the battle logs.
2) www.api.erepublik.com/v1/feeds/war/{WAR_ID} - it will output an xml with a small info regarding the active war and all active battles. All battles will have a list of battle log links related to the battle log feed mentioned earlier.
Important: these new feeds are only in xml format.


They're pretty cool, you can also back track to the War feed for RW's using the battle log feed.

Kind of interesting that there is in fact a war page for RW's though it does auto-redirects to the battle.

Offline AndraX2000

  • UIP SecTech
  • Moderator
  • Full Member
  • *****
  • Posts: 194
  • "patience is my vice"
    • AndraX2000's eRepublik tools
Re: eRepublik feed urls and API information.
« Reply #12 on: September 11, 2009, 04:00:25 PM »
www.api.erepublik.com/v1/feeds/battle_logs/{BATTLE_ID}/{PAGE}

Note that page numbers start at 0 (zero), not at one.

Offline wapu

  • The Wayward Monkey
  • Hero Member
  • *****
  • Posts: 645
  • "srs mnky"
Re: eRepublik feed urls and API information.
« Reply #13 on: September 11, 2009, 11:37:57 PM »




~Former doer of stuff
~One time friend of important people
~Former Senat0r
~Poster Child for a Failed Congress
~Tracker of Congress

Offline Abayarde

  • Full Member
  • ***
  • Posts: 103
  • "Training Corps Commander"
Re: eRepublik feed urls and API information.
« Reply #14 on: September 15, 2009, 06:24:57 PM »
I'm working on a secret squirrel VBA Script that would use this feed:

http://api.erepublik.com/v1/feeds/exchange/{BUY}/{SELL}

But it only shows the top 10 offers, is there a way to show more than that?
Lt General Abayarde
Commanding Officer, US Training Corps
US Training Corps

Senator from Ohio






Offline AndraX2000

  • UIP SecTech
  • Moderator
  • Full Member
  • *****
  • Posts: 194
  • "patience is my vice"
    • AndraX2000's eRepublik tools
Re: eRepublik feed urls and API information.
« Reply #15 on: September 15, 2009, 08:43:44 PM »
Unfortunately, no. Only the first 10 offers are available in the feed.

Offline eric424

  • Jr. Member
  • **
  • Posts: 68
Re: eRepublik feed urls and API information.
« Reply #16 on: February 07, 2010, 09:07:57 AM »
It says that the pages do not exist =/
Former Green Party Press Director
Private in the eUS Military
Part of the Community Development Program (CDP)
Part of the Salvation Army

The Bullseye Journal!
Subscribe to me and pm me!  I'll Vote and Subscribe back!


Offline Blazix

  • OH GOD YES
  • Moderator
  • Smelly Cat
  • *****
  • Posts: 3170
Re: eRepublik feed urls and API information.
« Reply #17 on: February 07, 2010, 09:26:43 AM »
It says that the pages do not exist =/
Which URL did you try?
BTW, Remember, you need to replace {USER_ID} etc with actual values.
ManUtd eRep RL
In that order

Online Dimension

  • Hero Member
  • *****
  • Posts: 600
Re: eRepublik feed urls and API information.
« Reply #18 on: March 18, 2010, 10:08:24 PM »
Question:

Importing it directly into a gdoc spreadsheet:

=ImportXML("http://api.erepublik.com/v1/feeds/citizens/1502411","QUERY")

What should I be querying for.

I know that the one for prices is "records/record/offers"

I'm not quite sure what citizen info is.

Thanks in advance.

Online Killing Time

  • "Try It Now"
  • Senator
  • Forum God
  • **
  • Posts: 1349
  • "i can keep rhythm with no metronome"
Re: eRepublik feed urls and API information.
« Reply #19 on: March 20, 2010, 07:17:40 PM »
Question:

Importing it directly into a gdoc spreadsheet:

=ImportXML("http://api.erepublik.com/v1/feeds/citizens/1502411","QUERY")

What should I be querying for.

I know that the one for prices is "records/record/offers"

I'm not quite sure what citizen info is.

Thanks in advance.

Disclaimer: I'm not an expert on GDocs, but I did stay at a Holiday Inn Express last night.

All I can really do is steer you in the right direction here as I have zero experience with google spreadsheets API and I have no idea how to construct a URL to even test this out.

It looks as if you need to use an xpath path expression (http://www.w3schools.com/xpath/xpath_syntax.asp) to specify which nodes/elements you want to extract from the document that is returned by the eRep API. Wish I could help more, if I new what the URL should look like for someone who is already auth'd with spreadsheets I could test some paths. Load up the citizen XML document and read that page I posted. I can't begin to offer an example without being able to test it.

Offline xDavidx

  • New Citizen
  • *
  • Posts: 26
Re: eRepublik feed urls and API information.
« Reply #20 on: March 20, 2010, 07:40:31 PM »
Question:

Importing it directly into a gdoc spreadsheet:

=ImportXML("http://api.erepublik.com/v1/feeds/citizens/1502411","QUERY")

What should I be querying for.

I know that the one for prices is "records/record/offers"

I'm not quite sure what citizen info is.

Thanks in advance.

ok so i was really bored for the last few hrs or so i starting playing around with it for the query section use
"//citizen"

so the most basic one would be:
=ImportXML("http://api.erepublik.com/v1/feeds/citizens/1323967", "//citizen")

if you want to specify to lets say strength you would make it
=ImportXML("http://api.erepublik.com/v1/feeds/citizens/1323967", "//citizen/strength")

im not sure of all of the specifications but im sure they are not the most difficult to figure out

Online Killing Time

  • "Try It Now"
  • Senator
  • Forum God
  • **
  • Posts: 1349
  • "i can keep rhythm with no metronome"
Re: eRepublik feed urls and API information.
« Reply #21 on: March 21, 2010, 10:12:54 PM »
Do you have to scrape to get a list of candidates for Congress before the election? I'm assuming one must, since I do not see it in citizen, region, or country feeds. Excuse me if this question has been answered.

Offline AndraX2000

  • UIP SecTech
  • Moderator
  • Full Member
  • *****
  • Posts: 194
  • "patience is my vice"
    • AndraX2000's eRepublik tools
Re: eRepublik feed urls and API information.
« Reply #22 on: March 22, 2010, 12:48:51 PM »
Do you have to scrape to get a list of candidates for Congress before the election? I'm assuming one must, since I do not see it in citizen, region, or country feeds. Excuse me if this question has been answered.
Yes.

This is a page of all the pre-election links in the eUS, which can be useful for doing manual research. http://erep.thepenry.net/preelection.php

The election tool I wrote for the UIP is slow and annoying, but legal. The day of the election, I manually visit every region election page in the US and view source. Then I copy and paste it into my tool, which parses it and updates the page. Once I've done that, I only need to parse the country election page to update the votes. I do it manually, because scraping violates TOS.

I assume the other election tools out there (http://ea.liberwing.com/index.php?act=elections) are scraping and violating TOS, as it would take a lot of work to do the entire world manually.

Online Killing Time

  • "Try It Now"
  • Senator
  • Forum God
  • **
  • Posts: 1349
  • "i can keep rhythm with no metronome"
Re: eRepublik feed urls and API information.
« Reply #23 on: March 22, 2010, 07:22:57 PM »
pff... TOS  ::)

All they do is ban your IP for a little while. That is, if you're scraping like a mad man. The lesson being: be sure to scrape from a remote location. And not too often.