C# Класс DiffBot.DiffbotAPI

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Article ( string url, bool useHtml = false ) : DiffBotArticleResultModel

Parse out an article by URL and return a strongly typed object

ArticleGetPreview ( DiffBotArticleResultModel article ) : string

Gets a basic 300 word preview for this article, or if this is a video, returns the proper embed tag for the video contents

Frontpage ( string url, bool useHtml = false ) : DiffBotFrontpageResultModel

Parses a Frontpage

GetEndpointUrl ( string type, string url, bool useHtml = false ) : string

Constructs and returns the appropriate Url for this endpoint

Защищенные методы

Метод Описание
DownloadUrlAsString ( string url ) : string

This grabs the raw URL and returns it in string form.

GetBodyFromHtmlString ( string html ) : string

Not yet implemented

GetTitleFromHtmlString ( string html ) : string

Returns a page's title element from a raw html string

Приватные методы

Метод Описание
GetWebClient ( ) : WebClient
IsValidUrl ( string url, System &uri ) : bool

Determines if the provided url is actually a valid url to parse

Описание методов

Article() публичный Метод

Parse out an article by URL and return a strongly typed object
public Article ( string url, bool useHtml = false ) : DiffBotArticleResultModel
url string
useHtml bool
Результат DiffBotArticleResultModel

ArticleGetPreview() публичный Метод

Gets a basic 300 word preview for this article, or if this is a video, returns the proper embed tag for the video contents
public ArticleGetPreview ( DiffBotArticleResultModel article ) : string
article DiffBotArticleResultModel
Результат string

DownloadUrlAsString() защищенный Метод

This grabs the raw URL and returns it in string form.
protected DownloadUrlAsString ( string url ) : string
url string
Результат string

Frontpage() публичный Метод

Parses a Frontpage
public Frontpage ( string url, bool useHtml = false ) : DiffBotFrontpageResultModel
url string
useHtml bool
Результат DiffBotFrontpageResultModel

GetBodyFromHtmlString() защищенный Метод

Not yet implemented
protected GetBodyFromHtmlString ( string html ) : string
html string
Результат string

GetEndpointUrl() публичный Метод

Constructs and returns the appropriate Url for this endpoint
public GetEndpointUrl ( string type, string url, bool useHtml = false ) : string
type string
url string
useHtml bool
Результат string

GetTitleFromHtmlString() защищенный Метод

Returns a page's title element from a raw html string
protected GetTitleFromHtmlString ( string html ) : string
html string
Результат string