C# Class SharpCrush4.SharpCrush

MediaCrush API Wrapper
Datei anzeigen Open project: headdetect/SharpCrush

Public Properties

Property Type Description
BaseApiUrl string

Public Methods

Method Description
DeleteFile ( string hash ) : DeleteFileResult

Attempts to delete the specified files

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihashexists

GetFileExists ( string hash ) : bool

Returns true if the specified file exists; false otherwise

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihashexists

GetFileInfo ( string hash ) : SharpCrushMediaFile

Gets information about the file from the specified hash.

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihash

GetFileInfos ( ) : SharpCrushMediaFile>.Dictionary

Gets information about the files whose hashes are specified.

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apiinfolisthash

GetFileStatus ( string hash ) : GetFileStatusResult

Attempts to get the status of the specified file

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihashstatus

UploadFile ( string file ) : FileUploadResult

Upload the specified file to the MediaCrush (or other) server.

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apiuploadfile

UploadUrl ( string url ) : UrlUploadResult

Upload the specified file from url to the MediaCrush (or other) server.

API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apiuploadurl

Private Methods

Method Description
Get ( string url ) : string
Post ( string url, string post ) : string
PostValues ( string url, string>.Dictionary post ) : string
Upload ( string url, string filePath ) : string

Method Details

DeleteFile() public static method

Attempts to delete the specified files
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihashexists
public static DeleteFile ( string hash ) : DeleteFileResult
hash string The hash of the file to delete
return DeleteFileResult

GetFileExists() public static method

Returns true if the specified file exists; false otherwise
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihashexists
public static GetFileExists ( string hash ) : bool
hash string The file hash to check
return bool

GetFileInfo() public static method

Gets information about the file from the specified hash.
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihash
public static GetFileInfo ( string hash ) : SharpCrushMediaFile
hash string The hash of the file to get.
return SharpCrushMediaFile

GetFileInfos() public static method

Gets information about the files whose hashes are specified.
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apiinfolisthash
public static GetFileInfos ( ) : SharpCrushMediaFile>.Dictionary
return SharpCrushMediaFile>.Dictionary

GetFileStatus() public static method

Attempts to get the status of the specified file
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apihashstatus
public static GetFileStatus ( string hash ) : GetFileStatusResult
hash string The hash of the file to get the status of.
return GetFileStatusResult

UploadFile() public static method

Upload the specified file to the MediaCrush (or other) server.
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apiuploadfile
public static UploadFile ( string file ) : FileUploadResult
file string The file to upload
return SharpCrush4.Results.FileUploadResult

UploadUrl() public static method

Upload the specified file from url to the MediaCrush (or other) server.
API Doc Url: https://github.com/MediaCrush/MediaCrush/blob/master/docs/api.md#apiuploadurl
public static UploadUrl ( string url ) : UrlUploadResult
url string The url to upload
return SharpCrush4.Results.UrlUploadResult

Property Details

BaseApiUrl public_oe static_oe property

The base url of the mediacrush server. Because the media crush platform is opensource, A different server/url can be used. It just needs to follow the same type of api.
public static string BaseApiUrl
return string