C# Class DiffBot.DiffbotAPI

Afficher le fichier Open project: TheRightChoyce/diffbot-csharp Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
GetWebClient ( ) : WebClient
IsValidUrl ( string url, System &uri ) : bool

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

Method Details

Article() public méthode

Parse out an article by URL and return a strongly typed object
public Article ( string url, bool useHtml = false ) : DiffBotArticleResultModel
url string
useHtml bool
Résultat DiffBotArticleResultModel

ArticleGetPreview() public méthode

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
Résultat string

DownloadUrlAsString() protected méthode

This grabs the raw URL and returns it in string form.
protected DownloadUrlAsString ( string url ) : string
url string
Résultat string

Frontpage() public méthode

Parses a Frontpage
public Frontpage ( string url, bool useHtml = false ) : DiffBotFrontpageResultModel
url string
useHtml bool
Résultat DiffBotFrontpageResultModel

GetBodyFromHtmlString() protected méthode

Not yet implemented
protected GetBodyFromHtmlString ( string html ) : string
html string
Résultat string

GetEndpointUrl() public méthode

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
Résultat string

GetTitleFromHtmlString() protected méthode

Returns a page's title element from a raw html string
protected GetTitleFromHtmlString ( string html ) : string
html string
Résultat string