Hot answers tagged

5

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


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

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


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

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

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

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

RE: Is site the api_site_parameter of the site object? Yes.   Although as stated in the "Per-Site Methods" section of the main doc page, you can also use the full domain name, EG cooking.stackexchange.com. No, user and shallow_user are site specific objects. You absolutely need to specify site to get these. Supposedly, the assumption is that all ...


2

First, page and page_size are NOT returned by default. You have to specify a custom filter to get those. If you don't want those properties, don't use a filter that requests them! :) Second, there is a very good reason to have those properties in real-life scenarios: Remember that API operations are asynchronous. This means that your app can't be sure of ...


2

This is exactly how it should be (except that the doc page might be more explicit). The meta_site parameter refers to Per-site Metas. Meta Stack Exchange is not a per-site meta. Think of it as a Stack Exchange main site about Stack Exchange itself -- encompassing Stack exchange operations and hundreds of SE-operated sites. See "The future of ...


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

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

The authentication process is described in the API docs: http://api.stackexchange.com/docs/authentication.


2

You can use the /search method with tagged and intitle For example: http://api.stackexchange.com/2.2/search?order=desc&sort=activity&tagged=rest&intitle=api&site=stackoverflow will search for questions on Stack Overflow with api in the title and that are tagged with rest. The first two items I get when running this are: { "items": [ ...


2

In order to get 50 questions for every request you need to pass pagesize parameter to your request URL. When you pass this parameter, you will need to pass page parameter to fetch the following pages. In order to exclude some attributes from the default set, you can use the "Try It" part of the documentation to create a filter for your specific purpose. ...


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

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

See How API Keys Work. It's six years old, but a leading API developer said: ... If you can demonstrate a need for a higher request quota, contact us. However, the Key limit should be sufficient for development, so please only request an increased quota when your application is live and has a non-trivial number of users. (Emphasis and contact ...


2

Yes, each time you invoke stackexchange.com/oauth/ you will get a fresh access token, even though old ones may still be valid. For example: Go to /me/inboxLivedoc and hit Get Token twice, recording the token value each time (It will always be different). Then go to /access-tokens/{accessTokens}Livedoc and check each token. They will both still be valid! ...


2

As you have discovered, you cannot do this with the current API. See, and upvote, this related feature request: Is there an API to upload images to SE's imgur installation? See, also, Using the Stack Exchange API to update my user profile? on Meta Stack Exchange. Your only current possibility is to manipulate the user's normal profile page, if you can. ...


2

Several things: The problem is not HTML entities, it is that the API always returns compressed data. Don't try to use file_get_contents() for that. Use cURL, but note that using cURL with HTTPS is not straightforward. See Using cURL in PHP to access HTTPS (SSL/TLS) protected sites for more information. Those headers do not set how data is fetched from ...


1

No, this is not possible with the API: Neither the API, nor the main sites, provides a way to search on location. You can't even brute-force it, by downloading every user either. Because: There are currently 4,972,549 users on Stack Overflow. You can download, at most, 1 million user records per day. (10,000 API quota times pagesize of 100.) You ...



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