Hot answers tagged

5

Yes, that bug is annoying, especially since specifying a todate that's before the fromdate returns a valid result set, EG: { "items": [], "has_more": false, "quota_max": 10000, "quota_remaining": 9995 } -- rather than an error. Having the dates be equal is theoretically possible. Having negative time is impossible (in this context). However, ...


5

I don't believe that that route accepts POST requests (as it's non-actionable), so you should have better luck sending a GET request instead. Routes that require auth tokens necessitate HTTPS, but still expect GET for read requests, and POST for writes.


5

Refer to the Stack Exchange API, Authentication docs. It looks like you are trying to authenticate using either a server you do not control, or a local server that is not on the public internet. Crucial Points: Do not specify a redirect_uri to any server that you do not control!!! When you use something like redirect_uri=https://www.yahoo.com/, then a ...


4

Your stated problem is considerably easier than the question you linked. You can use the /users/{ids}/answers route to get what you want -- with a little work. The trick is to use a filter that returns the answers.tags property. In your case, if you really just want totals, and for one user at a time, you can use the filter: !GeF-5u(cSumXA . The ...


4

The various /questions routes do allow you to simultaneously retrieve answers, if you set the right filter. A good starting filter for getting questions with answers is: !gB7hjL3lhJ*Cnfe63rh6pAm74J(5qrOZKbL To Customize a Filter: Go to the /questions documentation page. Scroll to the Filter Edit Tool: Click on the tool and this dropdown appears: ...


4

You cannot do this. A delete feature has been requested and requested again (with status-planned given about 3.5 years ago). Register your desire for this by immediately upvoting these posts: Deleting an application key? How to delete an OAuth (2.0) API key? (Theoretically, if those feature requests get enough upvotes, they might get some developer ...


4

See the documentation for network_user.   top_answers and top_questions are not returned by default; you must specify them explicitly in a filter. When you ran /me/associated from the doc page and from your app, you used a filter (!-*f(6r3ZbZjn) that specified those two properties. When you used the address bar of the browser, you didn't specify a ...


4

items is documented in the Common Wrapper Object. It is an array of whichever object the given route returns. In the case of /me/associated,  items is an array of network_user objects. If you use a filter that returns .wrapper.type, then type will return the type that items has assumed. EG: { "items": [ // <=== Linked ...


4

Your second call must be https:. You actually got an error like: "error_id":406, "error_message":"Access token sent over non-HTTPS request, it has been invalidated", "error_name":"access_token_compromised" On the first attempt. Only subsequent attempts, with the same token, would yield the 'key' is not valid for passed 'access_token' error. When ...


4

Just set pagesize in the URL, like: https://api.stackexchange.com/2.2/tags?pagesize=10&order=desc&sort=popular&site=stackoverflow


4

You can use /users/{ids}/associated Try it for your network account Returns all of a user's associated accounts, given their account_ids in {ids}. {ids} can contain up to 100 semicolon delimited ids, to find ids programatically look for account_id on user objects. You can filter the network_users returned by this method with the types ...


3

"A number of" might be a bit of a misnomer, as there are a whopping four standard ones: From the filters documentation: default, each type documents which fields are returned under the default filter (for example, answers). withbody, which is default plus the *.body fields none, which is empty total, which includes just .total The page also ...


3

Until the feature request is approved, you can get this number in one of 3 ways: You can get slightly stale data with this SEDE query. Note that it uses your Stack Exchange account number (4337810 for the OP) -- which you can get by clicking on the "Accounts" listing of any profile page. Or, You can make a boatload of API calls to get the current ...


3

Of course as soon as I finally break down and ask a question I see my mistake: Applications that have the client side flow enabled can use https://stackexchange.com/oauth/login_success as their redirect_uri by default. I had "Desktop OAuth Redirect Uri" disabled which the javascript SDK uses. (Note the url posted in the question) Leaving this up here in ...


3

Currently, the Stack Exchange API has nothing to do with Stack Overflow Careers. Anyway, there is no API for accessing Stack Overflow Careers job listings. Best you can do is grab the most recent 1000 listings from the Careers "all new jobs" RSS feed.


3

The \r\n issue was solved when I changed to a POST request. But, since I was retagging questions (didn't really need to change the body, just resend it), I ended up using the body_markdown, encoded with HTMLParser.HTMLParser().unescape() body_markdown = str(HTMLParser.HTMLParser().unescape(question_data['items'][0]['body_markdown'])) And then sending ...


3

Notice that the route used has /top-answerers/. The doc page states: Returns the top 30 answer​ers active in a single tag, of either all-time or the last 30 days. (Emphasis added) So, that route is returning what it should. If you really want the top answers for a tag, use the /search/excerpts route and set: sort=votes order=desc ...


3

It's a bit confusing but that is not a bug. Think of it as, "Reputation change from when to when?" Since you specified neither a fromdate, nor a todate, you are effectively asking for the changes for all time. If you run the query for Nov 1, 2015 to Nov 9, 2015:           ...


3

This is very costly to do in the API and currently impossible for many combinations of tag and date (because it would require more than the 10,000 allowed API calls per day). I'll write more about that tomorrow (11/11 or 11/12 UTC). Meanwhile, perhaps a SEDE query will work? The query: Top Answerers, by your tags and your date range takes your date range ...


3

Yes, I always get 86399 too. And, no, you can't specify an interval other than no_expiry. But you can call /access-tokens/{accessTokens}/invalidateDoc at whatever interval you wish. So, for less user annoyance, set no_expiry but then call /invalidate every, say, 8 days, for example.


3

You should use /inbox instead, which is a network route instead of a site-specific one. As mentioned in the documentation, the site-specific route is mostly just provided for convenience of consumers working in a single-site context. Even then it doesn't seem particularly useful, but meh. To answer your question in regards to why site is required there, ...


2

Date parameters are in unix epoch time and 1447113600 is 2015-11-10, 00:00:00. So any questions posted on Nov 10th actually happened after that. When searching for date ranges, you usually want to increment the end-date (max in this case) by one full day. For example, if you want items from 12-12-2012 to 12-13-2012, you would use max=1355443200 (The ...


2

Yes, you need to page through the results. See the doc page on paging. So, you would probably want to set the max pagesize(100) and then make a sequence of calls. EG: /2.2/questions?page=1&pagesize=100&order=desc&sort=activity&tagged=r /2.2/questions?page=2&pagesize=100&order=desc&sort=activity&tagged=r ...


2

Alas, no. The API currently does not have any easy way to track a user's edits. You can see what returns edit information by scrolling to the bottom of the revision object, documentation page. Currently, it says: Methods That Return This Type     posts/{ids}/revisions     revisions/{ids} Such cross-references are on every ...


2

You would use either: /search/advanced or /search/excerpts Then: Set the tagged parameter to your tag. Set the accepted parameter to True, if you want questions with accepted answers... OR Set answers to 1, if you want questions that have any old answer at all. Set pagesize to 10. Set order to desc. Set sort to creation. For example, the following ...


2

The API does not provide a good way for this. Worst case, your app will have to keep a table of every question in the tags of interest. Poll that table and see if the accept status has changed from the last stored answer id, if any. Beware that, depending on what tags you search, and how often you poll, your app may bust its quota. If you don't mind ...


2

First, you'll want to go upvote the feature request to add tag search for answers, etc. (If/when you have the upvote privilege) In the meantime, for answers by tag you can use the /search/excerpts route as long as you include is:answer in the q parameter. For example:       ...


2

You need to use a filter that returns those properties. The default filter does not. Also, the API is at version 2.2. You should use that unless you've a very good reason not to. So try, for example: http://api.stackexchange.com/2.2/users/55075?site=stackoverflow&filter=!G*ky*lRuarbDJTpnwEtY-a05oz Or: ...


2

The StackWrap4J library is very obsolete. Its page states: The latest build was tested against version 1.0 of the API on July 28th. But API version 1 has been shut down for quite a while. The API is currently at version 2.2. Choose a different library. The list is at stackapps.com/questions/tagged/library+java. Choose one that supports API version ...


2

I faced the same issue when I was using the stack exchange API to post a message to stack overflow website. I figured I had to post my application on a domain name. I hosted my application on free domain provided by 000webhost.com. You may wish to take a similar approach. After deploying the application on the domain, change the oauth domain and the ...



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