C# Class Ketarin.ExternalServices

Provides a couple of functions for external services like FileHippo.
Exibir arquivo Open project: GitSullied/Ketarin Class Usage Examples

Public Methods

Method Description
FileHippoAppName ( string fileId ) : string

Returns the application name for a given FileHippo ID.

FileHippoDownloadUrl ( string fileId, bool avoidBeta ) : string

Determines the download URL for a FileHippo application with the given ID.

FileHippoMd5 ( string fileId, bool avoidBeta ) : string

Determines the MD5 hash of a given application.

FileHippoVersion ( string fileId, bool avoidBeta ) : string

Determines the version of a given application on FileHippo.

GetFileHippoBaseDownloadUrl ( string fileId ) : string

Builds the base download URL for a given file ID.

GetFileHippoCleanFileId ( string fileId ) : string

Returns the FileHipp ID without the language identifier.

GetFileHippoIdFromUrl ( string url ) : string

If the given URL contains a FileHippo ID, it is returned.

Private Methods

Method Description
FileHippoGetAllVersions ( string pageContent, string fileId ) : string[]

Returns a list links to all versions of an application on FileHippo.

FileHippoIsBeta ( string pageContent ) : bool

Determines whether or not a page refers to a beta version.

GetNonBetaPageContent ( string overviewPage, string fileId ) : string

Determines the content of the most recent version of an application's overview page on FileHippo, which is not a beta version.

Method Details

FileHippoAppName() public static method

Returns the application name for a given FileHippo ID.
public static FileHippoAppName ( string fileId ) : string
fileId string
return string

FileHippoDownloadUrl() public static method

Determines the download URL for a FileHippo application with the given ID.
public static FileHippoDownloadUrl ( string fileId, bool avoidBeta ) : string
fileId string
avoidBeta bool Whether or not to avoid beta versions. If only beta versions are available, they will be downloaded anyways.
return string

FileHippoMd5() public static method

Determines the MD5 hash of a given application.
public static FileHippoMd5 ( string fileId, bool avoidBeta ) : string
fileId string
avoidBeta bool
return string

FileHippoVersion() public static method

Determines the version of a given application on FileHippo.
public static FileHippoVersion ( string fileId, bool avoidBeta ) : string
fileId string
avoidBeta bool
return string

GetFileHippoBaseDownloadUrl() public static method

Builds the base download URL for a given file ID.
public static GetFileHippoBaseDownloadUrl ( string fileId ) : string
fileId string
return string

GetFileHippoCleanFileId() public static method

Returns the FileHipp ID without the language identifier.
public static GetFileHippoCleanFileId ( string fileId ) : string
fileId string
return string

GetFileHippoIdFromUrl() public static method

If the given URL contains a FileHippo ID, it is returned.
public static GetFileHippoIdFromUrl ( string url ) : string
url string
return string