docs icon indicating copy to clipboard operation
docs copied to clipboard

microsoft provides API access to documentation .NET?

Open it19862 opened this issue 2 years ago • 6 comments

I am interested in the documentation: https://docs.microsoft.com/en-us/dotnet/ All or part of it.

it19862 avatar Sep 01 '22 10:09 it19862

Hi 👋 @it19862

Can you give us more details about what you're asking for here? I'm not sure what you're asking for.

BillWagner avatar Sep 01 '22 13:09 BillWagner

@BillWagner Now. I read the documentation through the browser...

Expectations. I want to access the documentation through my application.

Question. Is it possible? Do I need to parse the documentation? Or a website doc.microsoft.com provides an API?

Did I manage to clarify the situation?

it19862 avatar Sep 01 '22 14:09 it19862

@it19862 Are you only interested in API reference docs, or all of the .NET documentation including overviews, tutorials, etc.?

gewarren avatar Sep 01 '22 23:09 gewarren

@gewarren I don't know yet... But probably at the initial stage I would like to get access to such pages https://docs.microsoft.com/en-us/dotnet/api/system?view=net-6.0

To the pages of the namespace object model. To get information on all objects, methods, properties, events, etc. To do this for all versions .NET

it19862 avatar Sep 02 '22 04:09 it19862

I don't know of any such API for docs.microsoft.com, but you could pull that information out of the IntelliSense XML files. For example, you can find these files in this directory for .NET 6: %ProgramFiles%\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.8\ref\net6.0

gewarren avatar Sep 07 '22 18:09 gewarren

You could also parse the raw content of API docs repo to get latest data, for example, querying https://raw.githubusercontent.com/dotnet/dotnet-api-docs/main/xml/System/Object.xml URL will give you System.Object docs in monodoc XML format. I have some code example for programmatically parsing XML docs here, if that helps: https://github.com/MSDN-WhiteKnight/CilTools/blob/master/CilView/Exceptions/TypeExceptionInfo.cs#L61

MSDN-WhiteKnight avatar Sep 08 '22 03:09 MSDN-WhiteKnight