anilistapi

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 6 Imported by: 1

README

anilistapi

A golang library for the Anilist GraphQL API

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anilistwrapper

type Anilistwrapper interface {
	AnilistClient(query string) (interface{}, error)
	GetUserID(userName string) int
	GetUserInformation() (interface{}, error)
	GetUsersAnimeLists(userID int) (interface{}, error)
	GetUsersAnimeListContent(userID int) (interface{}, error)
}

Anilistwrapper interface that exposes the public functions in a orderly fashion

func InitClient

func InitClient(token *oauth2.Token) Anilistwrapper

InitClient provides a mechanism to

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client declares the content of the Client

func (Client) AnilistClient

func (c Client) AnilistClient(query string) (interface{}, error)

AnilistClient provides an interface with the graphQL API of Anilist

func (Client) GetMediaDetails

func (c Client) GetMediaDetails(mediaID int) (interface{}, error)

GetMediaDetails retrieves details about media from the anilist API

func (Client) GetUserID

func (c Client) GetUserID(userName string) int

GetUserID retrieves the anilist userID belonging to an anilist username

func (Client) GetUserInformation

func (c Client) GetUserInformation() (interface{}, error)

GetUserInformation retrieves information about the current authenticated user from the API

func (Client) GetUsersAnimeListContent

func (c Client) GetUsersAnimeListContent(userID int) (interface{}, error)

GetUsersAnimeListContent retrieves the content of an list in anilist

func (Client) GetUsersAnimeLists

func (c Client) GetUsersAnimeLists(userID int) (interface{}, error)

GetUsersAnimeLists retrieves information about the current user from the API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL