Méthode | Description | |
---|---|---|
AkismetClient ( string apiKey, |
Initializes a new instance of the AkismetClient class.
|
|
AkismetClient ( string apiKey, |
Initializes a new instance of the AkismetClient class. This constructor takes in all the dependencies to allow for dependency injection and unit testing. Seems like overkill, but it's worth it. |
|
BuildUserAgent ( string applicationName, string appVersion ) : string |
Helper method for building a user agent string in the format preferred by Akismet.
|
|
CheckCommentForSpam ( IComment comment ) : bool |
Checks the comment and returns true if it is spam, otherwise false.
|
|
SubmitHam ( IComment comment ) : void |
Submits a comment to Akismet that should not have been flagged as SPAM (a false positive).
|
|
SubmitSpam ( IComment comment ) : void |
Submits a comment to Akismet that should have been flagged as SPAM, but was not flagged by Akismet.
|
|
VerifyApiKey ( ) : bool |
Verifies the API key. You really only need to call this once, perhaps at startup.
|
Méthode | Description | |
---|---|---|
SetServiceUrls ( ) : void | ||
SubmitComment ( IComment comment, |
public AkismetClient ( string apiKey, |
||
apiKey | string | The Akismet API key. |
blogUrl | The root url of the blog. | |
Résultat | System |
public AkismetClient ( string apiKey, |
||
apiKey | string | The Akismet API key. |
blogUrl | The root url of the blog. | |
httpClient | Client class used to make the underlying requests. | |
Résultat | System |
public static BuildUserAgent ( string applicationName, string appVersion ) : string | ||
applicationName | string | Name of the application. |
appVersion | string | The version of the app. |
Résultat | string |
public CheckCommentForSpam ( IComment comment ) : bool | ||
comment | IComment | |
Résultat | bool |
public SubmitHam ( IComment comment ) : void | ||
comment | IComment | |
Résultat | void |
public SubmitSpam ( IComment comment ) : void | ||
comment | IComment | |
Résultat | void |