X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=anidb.go;h=491f667f4b96798781ee5c48dd90dd45a5f1ff65;hb=d32928667949b2815adea455690fd71fb747400f;hp=812f4c4704e6d68a5366154b857d0a4d79466f74;hpb=59218ebf4cf9c2353dfa2cb416ee7d2542a3b9b9;p=go-anidb.git diff --git a/anidb.go b/anidb.go index 812f4c4..491f667 100644 --- a/anidb.go +++ b/anidb.go @@ -5,6 +5,15 @@ import ( "time" ) +// Main struct for the client, contains all non-shared state. +// +// All ObjectByKey methods (AnimeByID, GroupByName, etc) first try to read +// from the cache. If the sought object isn't cached, or if the cache is +// stale, then the appropriate API is queried. +// +// Queries that depend on the UDP API can't be used without first authenticating +// to the API server. This uses the credentials stored by SetCredentials, or +// by a previous Auth() call. type AniDB struct { Timeout time.Duration // Timeout for the various calls (default: 45s)