Queries that depend on the UDP API can't be used without SetCredentials.
err error
}
-// Retrieves an Anime by its AID. Uses both HTTP and UDP APIs,
+// Retrieves an Anime by its AID. Uses both the HTTP and UDP APIs,
// but can work without the UDP API.
func (adb *AniDB) AnimeByID(aid AID) <-chan *Anime {
keys := []cacheKey{"aid", aid}
}
// Retrieves an Episode by its EID.
+//
+// If we know which AID owns this EID, then it's equivalent
+// to an Anime query. Otherwise, uses both the HTTP and UDP
+// APIs to retrieve it.
func (adb *AniDB) EpisodeByID(eid EID) <-chan *Episode {
keys := []cacheKey{"eid", eid}
ch := make(chan *Episode, 1)
return ch
}
-// Retrieves a File by its FID.
+// Retrieves a File by its FID. Uses the UDP API.
func (adb *AniDB) FileByID(fid FID) <-chan *File {
keys := []cacheKey{"fid", fid}
return ch
}
-// Retrieves a File by its Ed2kHash + Filesize combination.
+// Retrieves a File by its Ed2kHash + Filesize combination. Uses the UDP API.
func (adb *AniDB) FileByEd2kSize(ed2k string, size int64) <-chan *File {
keys := []cacheKey{"fid", "by-ed2k", ed2k, size}
return true
}
-// Retrieves a Group by its GID.
+// Retrieves a Group by its GID. Uses the UDP API.
func (adb *AniDB) GroupByID(gid GID) <-chan *Group {
keys := []cacheKey{"gid", gid}
ch := make(chan *Group, 1)
}
// Retrieves a Group by its name. Either full or short names are matched.
+// Uses the UDP API.
func (adb *AniDB) GroupByName(gname string) <-chan *Group {
keys := []cacheKey{"gid", "by-name", gname}
altKeys := []cacheKey{"gid", "by-shortname", gname}