Anigo models
Anigo models to make your plugins.
Usage
Dependencies
How do i create my plugin?
# Create a gomodule
go mod init <name>
# Install dependencies.
go get github.com/FlamesX-128/anigo-plugins/models
// Create the plugin.
// Currently only plugins from providers like gogoanime.
package main
import "github.com/FlamesX-128/anigo-plugins/models"
type PackageModel struct{}
// Here you must return the list of animes that were found based on certain keywords.
type (p PackageModel) Search(query string) []models.Anime {}
// here you must return the information of a specific anime.
type (p PackageModel) Info(id string) models.Info {}
// here you must return the urls to be able to see it.
type (p PackageModel) Watch(query string) []models.Source {}
// Create the plugin symbol.
var Plugin = models.Plugin{
Providers: map[string]models.Provider{
"myplugin": PackageModel{},
},
}
# Build you plugin.
go build -buildmode=plugin -o "myplugin@1.0.0.so" main.go
Plugin directory
Anigo will look for the anigo-plugins
folder in the current directory from where it is called.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Resources
License
MIT