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

Just use the plain /users/{ids} route. (For network-wide score, see the bottom section, below.) if you run it on your userid, it currently returns: { "items": [ { ... "reputation": 354, ... Which is what you expected. The route you used, /users/{ids}/reputation, has a different purpose. Refer to its doc page: Gets a subset of the ...


5

Confirmed; see bottom section, below. However, please refer to Provide a way to retrieve questions and answers that have been deleted -- which is "status-planned". This is a feature, not a bug. And this kind of feature has been requested many times. So, shush please, don't ruin it for us. ;) Confirmation info: You can see this behavior (for now) with ...


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


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

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

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 q=is:...


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:           /2.2/users/21539/reputation?fromdate=1446336000&todate=...


3

You can create and edit filters from the documentation page of the API endpoint. So you start at the Index of all endpoints. There you'll find /users/{id}/answers. On the right at the top of the parameter block you'll find the filter dialog: When you click the [edit] link the filter dialog opens: Where you can expand any the [types] provided by this ...


3

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


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, it'...


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


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.2/search/excerpts?&q=is:answer&tagged=best-in-place&...


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

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

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.2/questions?page=...


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

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

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

From the doc page for the /users/{ids}/associated route: You can filter the network_users returned by this method with the types parameter. Specify, semicolon delimited, main_site or meta_site to filter by site. So this means that for just a user's meta accounts you would use, for example:         /2.2/users/2855348/associated?...


1

Update: Evidence now suggests that the API quota rolls over at a unique time for each app. 24 hours after that app-key, plus IP, combination made its first API call. See this chat message. The quota does reset every 24 hours, but the time seems to wander is custom for every app-instance. Some years ago, I seem to remember it resetting around midnight ...


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


1

You are subject to throttling. You can get more calls by first registering your application. After that you get access to a detail page which includes a value for key. The description for that field is: Pass this as key when making requests against the Stack Exchange API to receive a higher request quota. This is not considered a secret, and may ...



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