These are chat archives for arenanet/api-cdi

13th
Jul 2016
Archomeda
@Archomeda
Jul 13 2016 01:42
oh wow... good thing i noticed https://github.com/arenanet/api-cdi/pull/327/files#diff-5a64ce9b85915099cf8978a359152c64R2 before i finalized the required permissions for my guild raid signup website
figured i needed the builds permission, but always good to know it for sure :D
Archomeda
@Archomeda
Jul 13 2016 13:45
yay, support gave me a replacement ghostly infusion :confetti_ball:
now to not be stupid and overwrite it again in the future
RobbyT15
@RobbyT15
Jul 13 2016 13:57
Hi everyone, I'm new to using the GW2 API and I'm having a little trouble, would anyone be able to help me out?
darthmaim
@darthmaim
Jul 13 2016 15:00
@RobbyT15 just ask you questions here, I'm sure there will always be someone who can help...
psi training
RobbyT15
@RobbyT15
Jul 13 2016 17:05
Here's my pen
So basically, what I'm trying to do is get the array of the characters on my account, but what I'm actually getting is the array of API versions. I'm not sure if it'll show what I'm talking about on codepen, but if you run it on a server, it will.
Your URL is just wrong
"https://api.guildwars2.com?access_token=" +key +"/v2/account"
RobbyT15
@RobbyT15
Jul 13 2016 17:09
...oh.
should be "https://api.guildwars2.com/v2/account?access_token=" +key
RobbyT15
@RobbyT15
Jul 13 2016 17:09
Thanks @lye
np
smiley
@codemasher
Jul 13 2016 17:10
@RobbyT15 (on a side note: you might want to check out window.fetch() https://github.com/GW2Wiki/widget-map-floors/blob/master/src/widget-map-floors.js#L58-L66 )
meh, wrong link XD
(you'll probably want to polyfill fetch if you're running in a browser)
RobbyT15
@RobbyT15
Jul 13 2016 17:10
What does it mean if it says the endpoint needs authenticating?
smiley
@codemasher
Jul 13 2016 17:11
60 tabs open, the only thing i see from github is the octocat :D
Usually means that the access token wasn't passed correctly
the < and > in the original URL weren't needed
RobbyT15
@RobbyT15
Jul 13 2016 17:11
Ah, ok. Thanks again
(that's probably my fault with the docs -- I really should put some examples on the wiki)
smiley
@codemasher
Jul 13 2016 17:12
that was the main intend of this repo https://github.com/codemasher/gw2api-tools
it got a little out of hand, however :D
yeah but who needs PHP examples
smiley
@codemasher
Jul 13 2016 17:13
pff
haha
the 2010's are all about javascript man
smiley
@codemasher
Jul 13 2016 17:13
since every webhoster runs node nowadays...
oh, wait.
pfft we moved to the cloud in the late 00's
smiley
@codemasher
Jul 13 2016 17:14
which cloud? one of purple haze? :D
lye @lye coughs
but for real you can get a t1.nano EC2 instance for $5/month
smiley
@codemasher
Jul 13 2016 17:15
well, php/mysql is included basically everywhere
that's true but like ... shared webhosting is bad
smiley
@codemasher
Jul 13 2016 17:16
who needs more for just running a small fan site?
(i don't just think for my own purposes ;D)
more is less
also I should probably cancel my dreamhost account at some point
smiley
@codemasher
Jul 13 2016 17:17
heh, might save some bucks
eh, not as many as cancelling my OVH account
which ... I also need to do
smiley
@codemasher
Jul 13 2016 17:18
heh
Archomeda
@Archomeda
Jul 13 2016 17:19
By Ogden's hammer, what savings!
smiley
@codemasher
Jul 13 2016 17:19
#amazonprimeday
RobbyT15
@RobbyT15
Jul 13 2016 17:45
So I have another question
If I want to get my character names, when I pass the URL, before my API key, I do v2/characters
This returns an array of all my characters on my account
One would think I simply do a for or forEach loop to get each one. However, I get "no such id".
Who wouldn't I be able to loop through the returned array?
Why*
not sure
an easier way, if you want to get all characters, is to use ids=all as a query parameter
e.g., https://api.guildwars2.com/v2/characters?ids=all&access_token=017A2B0C-A6C5-CC4D-A055-680F427CE8FDFD19A439-15C7-4EC1-AA3C-B84C4F6E5A71
RobbyT15
@RobbyT15
Jul 13 2016 18:02
I'm guessing in my on load function if I just wanted certain fields, I would just do parameter.fieldName like I would in a normal object? Eg. Result.name
pretty much yeah
javascript only really has normal objects
RobbyT15
@RobbyT15
Jul 13 2016 18:05
Yeah, it's just this API I'm having trouble with, they don't explain it very well
XmlHttpRequest or the GW2 API?
RobbyT15
@RobbyT15
Jul 13 2016 18:05
Plus I'm doing it on an iPad, so I don't get any error reporting
GW2 API
oof I don't recommend that
which documentation are you using, out of curiosity? the wiki/
This message was deleted
RobbyT15
@RobbyT15
Jul 13 2016 18:06
the wiki
ah okay, I'll try to go through that and add some examples; there's definitely a lot of places where the docs are a bit lacking
Archomeda
@Archomeda
Jul 13 2016 18:07
i tend to browse the repo instead :P
RobbyT15
@RobbyT15
Jul 13 2016 18:07
I'll probably be able to get more done at home, firewall at work won't allow outside http so requests
@Archomeda you have a link to the repo?
RobbyT15
@RobbyT15
Jul 13 2016 18:08
thanks
it's got example responses but it's pretty bare
Archomeda
@Archomeda
Jul 13 2016 18:08
otherwise, this gitter room is linked to the repo ;)
the more in-depth documentation is supposed to be the wiki but I just haven't taken the time to spruce the wiki docs up much
RobbyT15
@RobbyT15
Jul 13 2016 18:09
Ah, ok
Archomeda
@Archomeda
Jul 13 2016 18:09
also, indeed that new github font is awful
install a CSS overriding browser plugin :P
Archomeda
@Archomeda
Jul 13 2016 18:10
i probably should at some point yeah
installed since forever for a very reason gw2-forums cough
windwarrior
@windwarrior
Jul 13 2016 21:29
@RobbyT15 my GW2 stuff is up for grabs on GitHub, might not be the best code ever but it uses the api :>. Material Heatmap for example
why on earth did GH choose a 'light' font for normal text :'(
don't Segoe UI text I actually want to read :'(
Archomeda
@Archomeda
Jul 13 2016 21:35
@codemasher, you got one for github that restores the previous font as well? i'm a bit lazy
smiley
@codemasher
Jul 13 2016 21:36
same :D
Archomeda
@Archomeda
Jul 13 2016 21:36
i don't even know what the old font was
windwarrior
@windwarrior
Jul 13 2016 21:36
sans-serif :p?
Archomeda
@Archomeda
Jul 13 2016 21:40
ehm, isn't that just a category?
like, in which Segoe UI also falls under?
windwarrior
@windwarrior
Jul 13 2016 21:40
yeah, that is telling your browser to find a suitable font that is sans-serif.
Archomeda
@Archomeda
Jul 13 2016 21:41
really?
windwarrior
@windwarrior
Jul 13 2016 21:41
yes
I actually have no clue what font browsers pick for it tho
smiley
@codemasher
Jul 13 2016 21:42
Segoe UI falls under system in w10 <.<
Archomeda
@Archomeda
Jul 13 2016 21:42
TIL
smiley
@codemasher
Jul 13 2016 21:42
w7 was Calibri, i think
Archomeda
@Archomeda
Jul 13 2016 21:42
i like calibri more
smiley
@codemasher
Jul 13 2016 21:42
me too
even verdana was better
Archomeda
@Archomeda
Jul 13 2016 21:42
but it's still the worst for actual websites
windwarrior
@windwarrior
Jul 13 2016 21:43
sans-serif will give you Helvetica on OSX, and Arial on Windows
(and probably Cantarell on Gnome-based systems, or DeJaVu, or ..)
Archomeda
@Archomeda
Jul 13 2016 21:43
segoe ui doesn't look that bad in actual applications
smiley
@codemasher
Jul 13 2016 21:43
"Comic Sans serif"
windwarrior
@windwarrior
Jul 13 2016 21:43
but its a UI font, not a font you should put text in
Archomeda
@Archomeda
Jul 13 2016 21:44
right, that's probably why it looks good on buttons haha
windwarrior
@windwarrior
Jul 13 2016 21:44
aaaand with the rise of high resolution screens, I am actually starting to like serifs on screens full of text
ChieftainAlex
@ChieftainAlex
Jul 13 2016 21:45
back to Times New Roman? :D
Archomeda
@Archomeda
Jul 13 2016 21:46
works good enough
windwarrior
@windwarrior
Jul 13 2016 21:51
Times is not directly my favorite, but now that screens can actually display serifs their usefulness in guiding you through text is back
Archomeda
@Archomeda
Jul 13 2016 21:51
wait, they were meant to be useful?
smiley
@codemasher
Jul 13 2016 21:53
body, .markdown-body {
    font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
}
the essence of that js, just installed in stylebot - thanks!
windwarrior
@windwarrior
Jul 13 2016 21:53
serifs are intended to guide you in what line you are reading
as a subtle guide
but wikipedia is apparantly also inconclusive if that actually works
Archomeda
@Archomeda
Jul 13 2016 21:54
lol
windwarrior
@windwarrior
Jul 13 2016 21:54
well I prefer serifs on printed text :>
Colin Wheildon, who conducted scientific studies from 1982–1990, found that sans serif fonts created various difficulties for readers that impaired their comprehension.[8] According to Kathleen Tinkel, studies suggest that "most sans serif typefaces may be slightly less legible than most serif faces, but ... the difference can be offset by careful setting."[9] Other studies have found no significant difference in readability for serif or sans serif.[10][11]
--wikipedia
Archomeda
@Archomeda
Jul 13 2016 21:56
very conclusive...
anyway, at least i'm glad that the font that the gw2 beta had didn't carry over :P
i find some serif fonts actually less legible, at least on screens
windwarrior
@windwarrior
Jul 13 2016 21:58
yeah, thats because a screen can not show such small details, and hinting fixes only so much