Tag Info

Hot answers tagged

5

You need to pass in a sufficiently large pagesize value, per the documentation: The pagesize parameter for this method is unbounded, in acknowledgement that for many applications repeatedly fetching from /sites would complicate start-up tasks needlessly. Otherwise you'll only get 30 results, the default value for pagesize. Alternatively, you can page ...


3

If you already have a token, then you can use the /me/associated network route to get the associated site for the authorized user. There's a similar route that takes a network account ID and does not require an active access token.


3

You already know the site, it has to be built in to every /questions query. But, if you are querying separate sites with concurrent AJAX queries, merely encapsulate the site name in your AJAX callback. See this Stack Overflow question for an example of doing that in javascript. Alternatively, you can parse the link property of the question response to ...


2

You can actually just pass in window.location.hostname directly: This parameter can be the full domain name (ie. "stackoverflow.com"), or a short form identified by api_site_parameter on the site object. (emphasis mine) Since the site does not provide the short form to you directly anywhere, going the full hostname route is probably your best bet. ...


1

This was added in the last deploy. Originally I was planning for consumers to maintain the site cache based on host names, but I suppose it's better to have the "query with this" parameter readily available regardless of how a site is discovered.


1

There was some monkeying around on the backend with URI generation, it's settled down now and this issue was resolved.


1

Yes, the sites path does not filter results on site_type. But the good news is, the path accepts a pagesize of 999, so you can get all the results at once. Then you must filter the results in your app. Here's what it looks like in jQuery: $.ajax ( { type: 'GET', url: ...


1

PHP /** * 101 sites sorted alphabetically * Updated 2013.04.14 */ $se_sites = array ( 'academia' => array( 'Academia', 'http://academia.stackexchange.com', 'Q&A for academics and those enrolled in higher education', ), 'android' => array( 'Android Enthusiasts', 'http://android.stackexchange.com', 'Q&A for ...



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