27

There is no tutorial for the API, nor is there likely to be one -- at least officially. There is a "Hello World" introduction. To use the current API (version 2.2), you really only need to know/do: How to make an HTTP GET request, in the language of your choice. There are also various user-supplied libraries in .net, PHP, Python, etc. to help with this. ...


7

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


4

That is the 2.1 documentation, it's just the title (and perhaps the first sentence) that hasn't been updated. All of the routes added in 2.1 are there, so you don't have to worry that it's missing anything important.


4

The routes that don't link require POST requests because they create context, so there's nothing meaningful to be gained by going to those URLs in your browser. The rest of the routes return data when you send GET requests to them, which is why the link is useful in that case.


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

If this doesn't happen, this simple script will do it for you!: $('.site-picker.ui-autocomplete-input').on('input', function() { setTimeout(function() { var mylist = $('body > ul.ui-autocomplete'); var listitems = mylist.children('li').get(); listitems.sort(function(a, b) { return $(a).text().toUpperCase()....


4

There doesn't seem to be a place that describes the policy. That API-object, documentation page would be perfect for it. However, a lead Stack Exchange developer has stated that anything that reveals voting patterns will be hidden or private. Another Stack Exchange employee explains how user deletions and post deletions are kept private-ish, but ...


4

The original intent of these options is clearly not to enable automated flagging, but rather to allow an application to generate a UI that presents the applicable options to a user who would be expected to understand them. With that in mind, the only safe way to identify a flag is by using an exact string match: one that takes into account the terms used ...


4

Note that version 2.3 has been around since at least Aug 28, 2015 (Date of that answer). I could have sworn that one of the SE guys said they weren't going to document it, but can't find a reference for that. Anyway, in Jan 2017 the (former) API developer, Brian Nickel, said: There's no timeline yet for new features (and API backing them), just focused ...


3

Here is a Palemoon plugin which purports such an ability: Print Pages to PDF Print pages to PDF allows you to convert selected bookmarks (like a bookmarks folder or a list of bookmarks), open browser tabs or, if installed, ScrapBook (Plus) pages into one PDF document. I've tried it myself, and it works quite well for offline purposes. I think the terms ...


3

The documentation was updated sometime in the last 2 years and the API docs (version 2.2) now state that the property may be absent:


3

Well technically it already says "Most methods" so it's correct as written. But I agree, it's easy to miss that note. After the next build there will be another sentence mentioning that some methods have lower limits and their individual documentation pages will call them out (as they already do). Should be harder to miss that way.


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

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

The link is correct. The purpose of that control is to provide a URL to the doc page with all the parameters prefilled. This is what most users expect and is similar to how that link control works on the rest of Stack Exchange. To get a direct link to the API, click on the link next to the Run button: This has a URL like: https://api.stackexchange.com/2....


3

The official documentation is here: Available flags vary from object to object, user to user, and site to site. An application should not assume that particular flags are always available, or that particular option_ids are stable. Which isn't great. You may be able to get away with it, but there's nothing saying the option IDs can't change out from under ...


3

The key mistake here is neglecting the Wrapper Object, and this is a big flaw with the filter documentation. The wrapper is the box that everything you get from the API comes in. You always get the wrapper object except in the grossest of server/API errors. (In your case you were getting a wrapper of {}.) The stuff you care about, the payload, is the ...


3

These were just fixed in the latest build.


3

This is a documentation bug in my opinion. The "via Example App" was never included, nor should it be. A user is fully responsible for his or her content, it doesn't, and shouldn't, matter how that content was posted. Whether via: the web page, the Android App, a custom Stack App, or via Pony Express -- the content is what matters. A rogue app would ...


2

Yes, officially this is a documentation bug. From the Absent Fields doc: Fields that are not always guaranteed to be set... are indicated in the per-type documentation. Any discrepency(sic) between observed behavior and the documentation should be reported on Stack Apps. (Emphasis added and note that "discrepancy" is mispellerized. ;) ) notice ...


2

The fixes for this were just pushed in the latest build. Thanks for reporting it.


2

Fixed, thanks to ᔕᖺᘎᕊ, for bringing it to my attention, rolling out in next API build.


2

Yes, if you omit those parameters it will give you the expected result... If a valid token is passed, then it will return the user ("There can be only one.") who obtained/approved that token. For this route, the fromdate and todate parameters filter on the creation_date property of the user object. So, if the authorized user signed up for his/her account ...


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


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

This sure looks like a bug. Site search shows that there were 946 browserify questions created in 2015 (so far). The /tags route doesn't have a created option, but it shows 0 questions were active in 2015! No permutation yielded valid results when trying to specify any fromdate after 2012-05-23 (midnight on the 22nd). It seems the result is either the ...


2

This is a very minor bug in the documentation page. The online doc page adds a convenient hyperlink to the post (The link part is not in the API's JSON response). That's a good thing. Most of the time this is rock solid, but notifications span all Stack exchange sites and the API doc pages normally only expect one site at a time. When the page is making ...


2

There is no difference and... The inbox has always been "The global inbox". Certainly for as long as the API has existed. So any inbox route will be Stack Exchange wide, even if it accepts a site parameter. If you look at the doc for the /users/{id}/inbox/unread route, it says: This method is effectively an alias for /inbox/unread. It is provided for ...


2

key is your app key, access_token identifies a user (and a set of permissions) and is what you get at the end of an authentication flow. Keys are not secret, for example here's what the Documentation Console's registration looks like: You can find your app key by going to Manage Your Applications (in the Stack Apps homepage sidebar) and selecting one of ...


2

A fix for this will go out in the next build.


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