C# Class AniDBmini.AniDBAPI

Datei anzeigen Open project: ahodesuka/AniDBmini Class Usage Examples

Public Properties

Property Type Description
isConnected bool
statsText string[]

Public Methods

Method Description
AniDBAPI ( string server, int port, int localPort ) : System
Anime ( int animeID ) : void

Anime command to create a anime tab from an anime ID.

AppendDebugLine ( string line ) : void
File ( FileEntry entry ) : void
File ( HashItem item ) : void
Login ( string user, string pass ) : bool
Logout ( ) : void
MyListAdd ( HashItem item ) : void
MyListDel ( int lid ) : bool
MyListStats ( ) : int[]

Retrieves mylist stats.

RandomAnime ( int type ) : void

Retrieves a random anime from a certian criteria.

cancelHashing ( ) : void
ed2kHash ( HashItem item ) : HashItem

Private Methods

Method Description
CalculateTimeout ( ) : int

Calculates the timeout for the next low priority command using a list of datetimes for every query in the past minute.

Execute ( string cmd ) : APIResponse

Executes a given command. And returns a response.

ParseFileData ( object item, string data ) : void

Parses the return message of a FILE command, and then triggers the OnFileInfoFetched event.

PrioritizedCommand ( System.Action Command ) : void

Executes an action after a certain amount of time has passed since the previous command was sent to the server.

Method Details

AniDBAPI() public method

public AniDBAPI ( string server, int port, int localPort ) : System
server string
port int
localPort int
return System

Anime() public method

Anime command to create a anime tab from an anime ID.
public Anime ( int animeID ) : void
animeID int
return void

AppendDebugLine() public static method

public static AppendDebugLine ( string line ) : void
line string
return void

File() public method

public File ( FileEntry entry ) : void
entry AniDBmini.Collections.FileEntry
return void

File() public method

public File ( HashItem item ) : void
item HashItem
return void

Login() public method

public Login ( string user, string pass ) : bool
user string
pass string
return bool

Logout() public method

public Logout ( ) : void
return void

MyListAdd() public method

public MyListAdd ( HashItem item ) : void
item HashItem
return void

MyListDel() public method

public MyListDel ( int lid ) : bool
lid int
return bool

MyListStats() public method

Retrieves mylist stats.
public MyListStats ( ) : int[]
return int[]

RandomAnime() public method

Retrieves a random anime from a certian criteria.
public RandomAnime ( int type ) : void
type int type: 0=from db, 1=watched, 2=unwatched, 3=all mylist
return void

cancelHashing() public method

public cancelHashing ( ) : void
return void

ed2kHash() public method

public ed2kHash ( HashItem item ) : HashItem
item HashItem
return HashItem

Property Details

isConnected public_oe property

public bool isConnected
return bool

statsText public_oe static_oe property

public static string[] statsText
return string[]