Struct anidb::Anidb [] [src]

pub struct Anidb {
    pub socket: UdpSocket,
    pub address: SocketAddr,
    pub session: String,
}

Fields

Methods

impl Anidb
[src]

Creates a new instance of Anidb and makes a connection to the AniDB API server ignore // code unwraps for simplicy but the error codes should be handled by the errors let mut db = anidb::Anidb::new(("anidb_server.net", 6666)).unwrap();

Login the user to AniDB. You need to supply a user/pass that you have regisered at https://anidb.net/

Examples

// code unwraps for simplicy but the error codes should be handled by the errors
let mut db = anidb::Anidb::new(("anidb_server.net", 6666)).unwrap();
db.login("leeloo_dallas", "multipass").unwrap();

Login the user to AniDB. You need to supply a user/pass that you have regisered at https://anidb.net/

Examples

// code unwraps for simplicy but the error codes should be handled by the errors
let mut db = anidb::Anidb::new(("anidb_server.net", 6666)).unwrap();
db.login("leeloo_dallas", "multipass").unwrap();
db.logout()unwrap();