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 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址