Tag Info

Hot answers tagged

6

This is what custom filters are for. For example, if you append &filter=!BGRhem4Z)WIti9lP55R*tgr(Jq_fHC to your query, above, you will get results without upvote_count, downvote_count, or owner information. (The first two aren't included by default anyway.) An easy way to create a filter is to use the filter-edit tool, on the appropriate doc page for ...


6

Most routes that take an ID, including the /users route, will accept multiple values separated by semicolons. For example, a query like /users/1%3B22656?site=stackoverflow will give you results for both user 1 and user 22656. You can combine up to 100 ids in this fashion.


6

I don't see any particular reason not to add it, but there are some workarounds you can use in the meantime: Build a cache of all site information with the site URL as the key, and then look up the api_site_parameter value (and associated information) that way. or Use the fact that the domain name can be passed in as the value for site, and clean up ...


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 ...


4

Since the .getTime() value is already in UTC, you can just divide by 1000, and round. That is: var apiDate = Math.round (new Date().getTime() / 1000); works just fine. apiDate is in "unix epoch time" and the API takes these values even if the API parameter is called a "Date". But, if you want to truncate to the date only, just use: var dateTime = ...


4

The API allows you to set a pagesize of 0 to 100 (with the exception of the /sites route, which allows larger values), and defaults to a maximum of 30 items in the response. To get all of the items applicable to the API query, you need to check the has_more field to determine if you need to request subsequent pages via the page parameter. This is covered in ...


3

No. Currently the users type does not return any private_info and neither does the user_timeline type return any voting information. No other API method allows for detecting a user's vote history except one question at a time. You would have to fetch every single question and test the downvoted and the upvoted properties. If you limited your search ...


3

Are they moved to filters? Yes, you need to generate a filter that includes the question.body, question.comments, and question.answers fields. There are shorthand filters (i.e. _bca) that will do this for upgrade compatibility, but their use is discouraged and you're better off just making a filter that contains exactly what you want anyway.


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 ...


3

It's pretty simple, you just append your key to the URL as a parameter. For example, looking for users 1 and 5: http://api.stackexchange.com/2.2/users/1;5?site=stackoverflow&key=YOUR_KEY_HERE So, it looks like your HTTP.call would become: HTTP.call ( "GET", urlString, {params:{site:"stackoverflow", key:"YOUR_KEY_HERE"}}, function ...


3

You can get data close-enough to "real time" for most practical purposes. See the StackHose app, for example. Read the page about the API's Throttles and Quotas. From that page we can deduce: The maximum, burst, request rate is 30 requests per second, and this risks getting your app shut down. Your app will never be allowed more than 10,000 requests per ...


3

Stack Exchange supports the width attribute; see "What HTML tags are allowed on Stack Exchange sites?". The answer to that question emphatically states: You must enter the tags exactly as shown. Any deviation from this list—adding extra spaces, using single quote or no quotes, etc.—means the tag will be stripped. and: The attribute order is ...


3

The console JS was doing fuzzy matching on ?site; but that's not really correct, as you demonstrated. With the latest deploy it does an exact match if possible.


3

No, Area51 isn't in the API; it's different enough from the Q&A sites that it'd have to have a rather different one anyway. There are currently no plans to make an Area51 API either.


3

This is currently not possible via the API. The best you could do is have the user logged into a browser and then screen-scrape the stackoverflow.com/users/{user_id}/?tab=votes pages... Hardly an acceptable workaround. The Authentication doc, Scope section, does say: private_info - access full history of a user's private actions on the site. ...


2

OK, a bug report: This happens every time a few seconds after I start Bartlett. Please fix this soon.


2

This would be a two-step process if the /posts/{ids} path returned title, but it doesn't. Since the /answers/{ids} path, does return title (with an optional filter setting), then it should be easy-ish for /posts/{ids} to do so as well. Perhaps this would be a good feature request? Anyway, as it stands now, you must do this in pages and in 3 steps per ...


2

accept_rate is the internally tracked value of the user's Accept Rate. This is roughly a measure of how many of the user's questions have answers and where one of the answers was accepted by the user. For the actual details of how it's calculated, read the blog post announcing accept rate. In a nutshell: The user must have 4 or more questions. Only ...


1

Your file is named stackexchange.py, so Python is recursively loading it instead. This is a very common Python pitfall: Stack Overflow: python 'module' object has no attribute 'compile' Someone's badly formatted code with the same problem Django tickets {1, 2} Again on Ubuntu Forums New module causes interesting conflicts And here it is again on ...


1

The API path you want is /users/{ids}/associatedDoc. It takes global, Stack Exchange account_ids and returns all the site-specific user_ids for the specified users. For example, your user_id for Stack Overflow is 2257664 and your global Stack Exchange, account_id is 2606599. (You can see your /associated results, here.) You can get user account_ids from ...


1

The inname parameter restricts the results of a name search to only those that contain the specified substring. The following methods support it: /badges /badges/name /badges/tags /users /tags /tags/required /tags/moderator-only filtering on badge, user, or tag names, as applicable.


1

Looks like no data from May 2013 onwards: http://data.stackexchange.com/stackoverflow/query/154032/phonegap-posts-by-month When I search for the phonegap tag on SO: ...and click the button I get taken to questions tagged cordova: I suspect the tags have been merged?


1

Looking at the API 2.0 docs it looks like you can only pull favorites for a set of users - see http://api.stackexchange.com/docs/favorites-on-users#order=desc&min=2011-12-01&max=2012-01-01&sort=added&ids=29407&filter=default&site=stackoverflow&run=true It explains how the list of users is currently constrained to 100 entries, so ...


1

I have using this for a long time , but I'm not getting any notifications now . I have tried with several tags no luck . I'm on Windows 7, chrome version Version 30.0.1599.69 . And also I tried re installing...


1

The tagged parameter to /search and related methods is an OR. This query will return questions tagged c# or java, for example. Or is rather expensive, which is one (of the many) reasons those methods are limited in how many results they return.


1

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



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