Eluvatar wrote:An alternative would be to require an API key. The intent, either way, would be to better avoid abuse.
I just don't think it would make sense as a private shard. Another option, I think, would be to have a stricter rate limit.
Advertisement
by Leppikania » Tue Apr 10, 2018 7:55 pm
Eluvatar wrote:An alternative would be to require an API key. The intent, either way, would be to better avoid abuse.
by HMS Unicorn » Fri Apr 13, 2018 7:17 am
Eluvatar wrote:What censuses do you refer to as having been selectively included?
by Imperium Anglorum » Tue Apr 17, 2018 11:09 pm
Imperium Anglorum wrote:Also, would it be possible to have an API query which tells us what kind of telegram is being sent? Something like:
- Code: Select all
https://www.nationstates.net/cgi-bin/api.cgi?a=infoTG&tgid=(TGID)&key=(Secret Key)
Returning information on the telegram itself, like the delivery data, by whom the telegram was blocked, and what kind of telegram is being sent (recruitment, campaign, unmarked).
by Roavin » Fri May 11, 2018 12:08 am
https://www.nationstates.net/cgi-bin/api.cgi?q=time
<WORLD><TIME>1526022475</TIME></WORLD>
by Darcania » Fri May 11, 2018 10:00 am
Roavin wrote:For synchronization purposes, it'd be really useful if there was a server time shard.
by Eluvatar » Fri May 11, 2018 1:14 pm
timestamp = timegm(xml.headers.getdate("Date"))
Imperium Anglorum wrote:Imperium Anglorum wrote:Also, would it be possible to have an API query which tells us what kind of telegram is being sent? Something like:
- Code: Select all
https://www.nationstates.net/cgi-bin/api.cgi?a=infoTG&tgid=(TGID)&key=(Secret Key)
Returning information on the telegram itself, like the delivery data, by whom the telegram was blocked, and what kind of telegram is being sent (recruitment, campaign, unmarked).
Bump.
by Roavin » Fri May 11, 2018 4:33 pm
Eluvatar wrote:Darcania is correct, and Roavin should actually have access to examples of my code that use that, such as:
- Code: Select all
timestamp = timegm(xml.headers.getdate("Date"))
(Where the variable xml is the result from a call to api.request from trawler-parser-python)
by Agadar » Sun May 20, 2018 5:22 am
by Honk Donk » Sun May 20, 2018 8:53 am
"0\n"or
"1\n". However the documentation says it should return
"0"or
"1"(no newline). Is this a bug or is it intended? If it's intended, would it be possible to update the documentation?
by Agadar » Sun May 20, 2018 3:48 pm
by Eluvatar » Sun May 20, 2018 8:57 pm
Agadar wrote:It would be awesome if it were possible to send telegrams without requiring a telegram id with a secret key, instead simply supplying a body. That would, for example, allow a new application I'm developing for assisting me in my TWI Info Office duties to send me a notification telegram whenever new updates are available for publishing.
Honk Donk wrote:for the nation verification api, the api currently returns"0\n"or"1\n". However the documentation says it should return"0"or"1"(no newline). Is this a bug or is it intended? If it's intended, would it be possible to update the documentation?
(it just confused me a bit because it didn't equal 1 or 0 when I was using it)
by Imperium Anglorum » Sun May 20, 2018 11:20 pm
Eluvatar wrote:I don't intend to change this.
by Agadar » Mon May 21, 2018 4:18 am
Eluvatar wrote:Agadar wrote:It would be awesome if it were possible to send telegrams without requiring a telegram id with a secret key, instead simply supplying a body. That would, for example, allow a new application I'm developing for assisting me in my TWI Info Office duties to send me a notification telegram whenever new updates are available for publishing.
Not allowing scripts to send arbitrary text is a design feature, not a bug. And no script should create any telegram template.
It may be possible to work around this by sending a telegram which links to a dispatch which is separately updated.
by Glen-Rhodes » Sat Jul 14, 2018 6:04 pm
by Honk Donk » Mon Jul 23, 2018 3:43 am
name+type+fullname+motto+category+wa+endorsements+freedom+region+population+tax+animal+currency+demonym+demonym2+demonym2plural+flag+majorindustry+govtpriority+govt+founded+firstlogin+lastlogin+lastactivity+influence+freedomscores+publicsector+deaths+leader+capital+religion+cardcategory
govtdesc, richest, legislation, tgcanrecruit, census, notable, banners, industrydesc, banner, wcensus, happenings, dbid, policies, dispatchlist, animaltrait, factbooklist, customcapital, admirable, sectors, customleader, tgcancampaign, crime, poorest, scvote, zombie, gavote, sensibilities, customreligion, gdp, rcensus, wabadges, factbooks, foundedtime, income, dispatches
by Trotterdam » Mon Jul 23, 2018 6:18 am
by Honk Donk » Mon Jul 23, 2018 8:19 am
Trotterdam wrote:I would really recommend against using a "default list", unless you're just quickly testing something rather than making a real application. I always tune my API requests to ask exactly the information I'm interested in and going to use (or at least information that I'm maybe going to use depending on what other information from the same request looks like), nothing more or less.
by Zone 71 » Wed Jul 25, 2018 6:39 am
by Frisbeeteria » Wed Jul 25, 2018 9:01 am
Zone 71 wrote:I currently have a Client Key for the purposes of recruitment in my region, The Quarantine. Would I need to request a different Client Key if I were to instead use my API to promote World Assembly legislation?
by Zone 71 » Wed Jul 25, 2018 9:08 am
Frisbeeteria wrote:Zone 71 wrote:I currently have a Client Key for the purposes of recruitment in my region, The Quarantine. Would I need to request a different Client Key if I were to instead use my API to promote World Assembly legislation?
The same key works for all API purposes, so no, you don't need another one. All keys are currently issued as recruitment keys, and consequently all regional recruitment telegrams related to that key are permanently tied to the original region. Campaign and/or other telegrams don't include a regional recruitment link, so you're fine. Don't forget to tick the appropriate checkbox when creating your TG template.
by Vungar » Wed Jul 25, 2018 10:52 am
Founder and Király Farkas of Farkasfalka and the Farkas Lovagok
_________ | _________ | _________ | _________ | _________
by August » Tue Aug 21, 2018 9:16 am
by Eluvatar » Fri Aug 24, 2018 8:30 am
Advertisement
Users browsing this forum: Great Joy, Grishahakkaverchynot, Iujhj, New Verodania, Sao-Paulo, Sarzonia, Stolos, The French National Workers State, Thorn1000, Tiragrativ
Advertisement