Tag Info

Hot answers tagged

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.


5

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


5

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


5

By "bio" you mean the about me field, right? ... Any path that returns a user object will return the about_me property, but this is not returned by default. You have to use a filter that has about_me enabled. For example, here is a query to get your "About me" on stackapps: users-by-ids#ids=8109&filter=!.2mo6GlnpFPFeBKnaz&site=stackapps An ...


5

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


4

Tricky. This was a consequence of the API misinterpreting a normalized field used elsewhere in the system to indicate whether or not a post has upvoted answers. Everywhere else, "is answered" is true if either of the following are met: The question has an accepted answer The question has an answer with a score > 0 The API wasn't doing the "or" check. ...


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

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


3

Update: Per Kevin Montrose's answer and its comments: The bug has now been fixed and the is_answered property will return true if either of these is true: The question has an accepted answer The question has an answer with a score > 0 To detect just whether a question has an accepted answer, merely check that the accepted_answer_id property is present ...


3

The payload seems to be limited to 3000 characters by the Stack Exchange engine itself: However, the actual field returned by the API may be longer, as the user's 3000, markdown characters are expanded into HTML. As stated in "Can we have maximum length of string in API help pages?", the API itself enforces no length limits on the data and... ...


2

No, the API does not provide a method to get the user's question-page, display preferences -- including Favorite or Ignored tags. Currently, the only way for your app to get these is to browse to the questions list and scrape the tags from the right-hand column. If your app is running in the user's browser and the user is logged-in, this is a piece of ...


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

This is just the reputation that the user has earned for the given period (day/week/month/quarter/year). For example, for you, for Stack Overflow, the API currently returns: "reputation_change_day": 0, "reputation_change_week": 0, "reputation_change_month": 32, "reputation_change_quarter": 63, "reputation_change_year": 111, This should jibe with what ...


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

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

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

I found the answer. On the documentation page we find all needed information: Example: /2.1/questions? pagesize=50 fromdate=1371859200 todate=1372550400 order=desc sort=votes tagged=javascript site=stackoverflow ...


1

You would use the inname parameter of the users path. For example this gets users with marcamillion in their name, on Stack Overflow. Note that the filter parameter controls what fields are returned, not the content of those fields. I don't use Serel (or much Ruby), but the syntax is probably: Serel::User.inname('marcamillion').get Or, with some more ...



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