Tag Info

Hot answers tagged

10

There wouldn't be a lot of code re-use between the SE API (.NET), OSQA (Python) and Shapado (Rails). If others want to, they can implement a compatible API without any of the server-side code. In fact, that's one of the biggest selling points of this type of API, it uses standards like HTTP and JSON that you can produce with any web framework. With a ...


7

I guarantee that if we did this, a large chunk of the developed apps would rely on /latest and break horrendously every time we rev'ed the API. The end user experience would be bad, developers would be frustrated (as their code literally just stopped working one afternoon), and we'd have to deal with a bunch of erroneous bug reports ("/some/method stopped ...


6

Beta is an unusual time, in that the version number changes fairly frequently. Once we're into 1.0, such changes will basically never happen. You'll always be in 1.0, unless you explicitly target a newer version of the API; which will probably be rife with breaking changes, requiring much more than a recompile. As such, no discovery mechanism for API ...


6

For now, as we have only ~80 sites, you can set pagesize to 100 and get them all. But in general, I think pagination here makes no sense at all. Because there're no search parameters or ordering, I can't think of a situation where app can fetch only first page and be satisfied. Would it be possible to provide a way to search the list instead? I would ...


5

Here it is! SVG version here Note: the same restrictions on this trademarked icon that apply here, also apply to the icon above.


4

bump I've just delved into the stackauth methods for the first time today, and I can't help but notice that there's no real URL friendly key exposed. For example, I want a unique URL for each API endpoint in my app, so that it can be bookmarked. E.g. http://www.column80.com/?site=stackoverflow But none of the keys provided are any good. name has spaces ...


3

I'm declining this, not because I don't see the merit in it, but because we don't have the data to return in anything approaching a reasonable time. Our badge awarding code is very complex, and intentionally run in staggered (and even, in some cases, random) schedule to prevent DOS-ing our own databases. Opening those queries up via an API would be ...


3

The SO engine isn't getting open sourced in the foreseeable future. The API is part of the engine, so it isn't either. That being said, we do make all of the data "open-source" (cc-wiki, but close enough), there's MarkDownSharp, and some more stuff coming down the pipeline. API specifically, all the external bits of our test suite are part of The World's ...


2

If you are thinking about creating a full fledged application that could be open to users, I highly suggest against using a latest version API call. This is because even though you want to keep up with the latest version, it would be horrible for your application to break, and your users to have to wait until you dealt with the changes to the API to be able ...


2

Just like they cloned the format and concept, they can clone the API. It's self-documenting and available for testing. There would be no gain in open-sourcing the server-sided layer of it, and documenting a 'protocol' would be too constraining and involve too much effort. I say it's fine just the way it is.


2

No. E-mail hash is a pretty terrible way to determine account association, as there's no uniqueness guarantee. I touched on why account associations - which is a more general case of what you're asking for - aren't exposed in this answer, but I'll copy it here too. Currently, we only have two places it could go: ...


2

It would make more sense - in my opinion - for a library to abstract the paged nature of results away entirely. Furthermore, there's no need for the objects exposed by whatever deserialization code to reflect the naming scheme of the underlying JSON. If you want more automatic code, you could just define the data field as not total, page, or pagesize. The ...


2

BUMP: Although this request seems sealed with a status-declined flag.. i started to play with Stackauth and i have to say that what requested in this post is more than proper and reasonable. Using /sites i had to craft an utility method that strips the domains from site_urls using regex (^http://(.*).com$ ), adding them to the data structure as keys. ...


2

Normally, I am the one arguing for more data but in this case I will anticipate (and agree with) Kevin's likely response: The tag meta is not relevant to a question and inclusion of tag meta would be a significant increase in response data as well as requiring an additional join into the tag table increasing the execution cost of generating the response. ...


2

If you're persisting data, the omission of the site is enough of a signal that its been removed (for whatever reason). Keep old sites around indefinitely is just polluting /sites, and removing them after some fixed time period means any consumers have to deal with their eventual removal anyway. Might as well just remove them and be done with it.


2

Actually, your browser does not download images on every request but perform a conditional request to the server using the If-Modified-Since header. In case the image is not changed, the web server returns a 304 Not Modified status telling the client "resource you are requesting is not modified, use your cache :)".


2

Actually, this was answered in your previous question :) some private things do go into the inbox. They are quite rare, but they're there. Personally, I've never seen any of those 'private things', but I'm not user 1 either. Do admins use it to send ponies to each other?


2

The problem with this isn't so much the security (though that's a concern), it's that we don't want the backwards compatibility constraints such blessed installations imply on our HTML and javascript. As such we're unlikely to ever do something like this, so I'm status-declined-ing it.


2

This was dropped intentionally. The problem is that maintaining this sort of meta-api is both intensive (lots of v1.1 was spent not breaking v1.0 because of the way introspection was working) and of very little utility. Yes, it's useful for generating wrappers; but those wrappers are written once per version, and not updated meaningfully. If we were ...


2

No, we won't be implementing this. Not that I don't see a use case for it, but we'd never be able to accept and execute arbitrary regular expressions against the database. It'd just be far too easy cripple performance wise (we've done this accidentally plenty of times, and we don't have to worry about malicious actors on the dev team). While we could ...


1

Perhaps a good approach would be to cache the entire list of tags on a site (there are only 770, or 25 pages worth on Travel.SE). You can then run them through a RegEx locally. Tags don't change very much so you could just refresh your list every week or so to keep it up to date. You didn't specify a particular language / framework, but if you were using ...


1

You shouldn't be making more than 4 requests in this case. fetch a page of /users/{ids}/timeline group the ids by type (question, answers, comments) since the max pagesize fo users/{ids}/timeline is 100, we know there are < 100 of each id* make 1 query each with the appropriate ids to /questions/{ids}, /answers/{ids}, and /comments/{ids} This is the ...


1

There actually isn't much sensible that we could return as a "relevance rank", what we essentially get out of Lucene is just the order of posts to return. Internally, relevance ordering doesn't make sense to compare across separate invocations of the same query much less across different queries or even sites. Our search infrastructure is also subject to ...


1

Unfortunately, there are no performance savings to be had if reputation is returned; this is simple the way the Stack Exchange network works at the moment. I will say that I'm hoping that by API 2.0 it will have become much cheaper to lookup associated user details, if so reputation will certainly be back in the 2.0 timeframe as a default. If it remains ...


1

Pagination on /sites is solely so [app]s don't have to pull down any unknown, large, and constantly growing chunk of a data in a single request. It is expected that every consumer would grab all sites in a series of sequential (or concurrent, if they're comfortable with that) requests for each page.


1

The discuss.area51 site is technically a meta with a non-standard parent. That's really really weird, and I'm 100% certain there are [app]s out there that will break if we start returning a state: linked_meta site that has no parent. That the API works against discuss.area51 is not guaranteed in the future either, we're not going to drop any ban hammers or ...


1

Tag scores didn't really exist when v1.0 was released. They'll be in the next API version, barring any great difficulties in exposing them. Unfortunately the underlying data store has made this harder, not easier over time. Taking this off the planned list as that's no longer accurate.


1

You're de-serializing on_site, just define an equality operator - however that is done on your platform of choice - and be done with it. Bam, unique key. We're returning the site data to save a query. Consider, it will probably be a very common use case for /users/{id}/associated will be: query associated accounts given 1 site/id pair get some subset ...


1

You'll notice that the same questions object is returned by all the various methods. This is intentional, and I'm loath to make an exception in this case. You can get the set of questions favorite'd within a date range via the min and max parameters however (provided sort=added).


1

While the hash is available as a member of the users object, exposing a method to search by hash would be a blinking target for abuse. you would have to perform this type of filter on a locally cached set of user records. since the hash is used to serve the gravatar, it is assumed that SO lcases the email as well before hashing it. simply do an md5 hash ...



Only top voted, non community-wiki answers of a minimum length are eligible