goshikimori

package module
v0.0.0-...-8f00934 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 15 Imported by: 0

README

EN | RU

About

A small library for interacting with shikimori, written in golang.

  • Work with API occurs only through OAuth2.
  • No dependencies on other libraries.
  • The GNU make utility is used for tests and builds.

Install

go get github.com/heycatch/goshikimori

Examples

Documentation

Godoc support is also available.

Or you can use the page from the official Go pkg website.
P.S. documentation is late in updating.

# Method #1: Use docker.
git clone [email protected]:heycatch/goshikimori.git && cd goshikimori
make docker-build
make docker-start

# Open in browser.
http://localhost:1337/pkg/github.com/heycatch/goshikimori/
# Method #2(Linux): Install godoc.
go install -v golang.org/x/tools/cmd/godoc@latest
# Add 'export' to the file /home/$USER/.profile and reboot.
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# Check that the application is working properly.
godoc --help

# After installation or if 'godoc' is already installed.
git clone [email protected]:heycatch/goshikimori.git && cd goshikimori
make doc

# Open in browser.
http://localhost:1337/pkg/github.com/heycatch/goshikimori/

Shikimori documentation

Feedback

# Current tasks and problems in the code can be viewed in the terminal using the command.
git grep TODO
git grep FIXME

Documentation

Overview

Copyright (C) 2024 heycatch <[email protected]>.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Comments are made in the style of "godoc" syntax support.

More information can be found in the examples folder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NekoSearch

func NekoSearch(name string) (string, error)

String formatting for achievements search. Check example.

func NewChangeMessagePutRequestWithCancel

func NewChangeMessagePutRequestWithCancel(application, accessToken, search, body string,
	number time.Duration) (*http.Request, context.CancelFunc, error)

Change message. To work correctly with the PUT method, make sure that your application has all the necessary permissions.

func NewDeleteMessageDeleteRequestWithCancel

func NewDeleteMessageDeleteRequestWithCancel(application, accessToken, search string,
	number time.Duration) (*http.Request, context.CancelFunc, error)

Delete message. To work correctly with the DELETE method, make sure that your application has all the necessary permissions.

func NewDeleteRequestWithCancel

func NewDeleteRequestWithCancel(application, accessToken, search string,
	number time.Duration) (*http.Request, context.CancelFunc, error)

To work correctly with the DELETE method, make sure that your application has all the necessary permissions.

func NewGetRequestWithCancel

func NewGetRequestWithCancel(application, accessToken, search string,
	number time.Duration) (*http.Request, context.CancelFunc, error)

func NewMarkReadPostRequestWithCancel

func NewMarkReadPostRequestWithCancel(application, accessToken, search, ids string,
	is_read int, number time.Duration) (*http.Request, context.CancelFunc, error)

Mark order messages: POST request. To work correctly with the POST method, make sure that your application has all the necessary permissions.

func NewPostRequestWithCancel

func NewPostRequestWithCancel(application, accessToken, search string,
	number time.Duration) (*http.Request, context.CancelFunc, error)

To work correctly with the POST method, make sure that your application has all the necessary permissions.

func NewReadDeleteAllPostRequestWithCancel

func NewReadDeleteAllPostRequestWithCancel(application, accessToken, search, name string,
	number time.Duration) (*http.Request, context.CancelFunc, error)

Read/Delete all messages: POST request. To work correctly with the POST method, make sure that your application has all the necessary permissions.

func NewReorderPostRequestWithCancel

func NewReorderPostRequestWithCancel(application, accessToken, search string,
	position int, number time.Duration) (*http.Request, context.CancelFunc, error)

Reorder: POST request. To work correctly with the POST method, make sure that your application has all the necessary permissions.

func NewSendMessagePostRequestWithCancel

func NewSendMessagePostRequestWithCancel(application, accessToken, search, body string,
	from_id, to_id int, number time.Duration) (*http.Request, context.CancelFunc, error)

Send message: POST request. To work correctly with the POST method, make sure that your application has all the necessary permissions.

Types

type Configuration

type Configuration struct {
	Application, AccessToken string
}

func SetConfiguration

func SetConfiguration(appname, token string) *Configuration

You need to enter the application and the private key.

To register the application, follow the link from OAuth.

func (*Configuration) ActiveUsers

func (c *Configuration) ActiveUsers() ([]int, int, error)

Users having at least 1 completed animes and active during last month.

Time to complete request increased to 40 seconds. Too big request.

More information can be found in the example.

func (*Configuration) AddIgnoreTopic

func (c *Configuration) AddIgnoreTopic(id int) (api.IgnoreTopic, int, error)

You can find the ID in functions such as: SearchTopics(), SearchTopicsUpdates(), SearchTopicsHot()

More information can be found in the example.

func (*Configuration) ChangeMessage

func (c *Configuration) ChangeMessage(id int, message string) (api.Messages, int, error)

Id: message id.

Message: message text.

Ignore:

  • Linked_type: nil;
  • Linked: nil;

More information can be found in the example.

func (*Configuration) DeleteAllMessages

func (c *Configuration) DeleteAllMessages(name string) (int, error)

Name: type in the mail.

Returns a status of 200.

'Name' settings:

  • news
  • notifications

More information can be found in the example.

func (*Configuration) DeleteMessage

func (c *Configuration) DeleteMessage(id int) (int, error)

Id: message id.

Only status 204 is returned.

More information can be found in the example.

func (*Configuration) Dialogs

func (c *Configuration) Dialogs() ([]api.Dialogs, int, error)

More information can be found in the example.

func (*Configuration) FastIdAnime

func (c *Configuration) FastIdAnime(name string) (*FastId, int, error)

Name: anime name.

Search by user is case sensitive.

func (*Configuration) FastIdCharacter

func (c *Configuration) FastIdCharacter(name string) (*FastId, int, error)

Name: character name.

Search by user is case sensitive.

func (*Configuration) FastIdClub

func (c *Configuration) FastIdClub(name string) (*FastId, int, error)

Name: club name.

Search by user is case sensitive.

func (*Configuration) FastIdManga

func (c *Configuration) FastIdManga(name string) (*FastId, int, error)

Name: manga name.

Search by user is case sensitive.

func (*Configuration) FastIdPeople

func (c *Configuration) FastIdPeople(name string) (*FastId, int, error)

Name: people name.

NOTES: There is a conflict with a long word in Latin. Everything is fine in Cyrillic. At the moment the problem has been solved by an additional check for unicode.

Search by user is case sensitive.

func (*Configuration) FastIdRanobe

func (c *Configuration) FastIdRanobe(name string) (*FastId, int, error)

Name: ranobe name.

Search by user is case sensitive.

func (*Configuration) FastIdUser

func (c *Configuration) FastIdUser(name string) (*FastId, int, error)

Name: user name.

Search by user is case sensitive.

func (*Configuration) GetConfiguration

func (c *Configuration) GetConfiguration() (string, string)

func (*Configuration) MarkReadMessages

func (c *Configuration) MarkReadMessages(ids string, is_read int) (int, error)

Ids: array of ids converted to a string.

Is_read: mark a message as read or unread.

'Is_read' settings:

  • 1 (read)
  • 0 (unread)

Only status 200 is returned.

More information can be found in the example.

func (*Configuration) RandomAnimes

func (c *Configuration) RandomAnimes(r Result) ([]api.Animes, int, error)

If 'Options' empty fields:

  • Limit: 1;
  • Kind: empty field;
  • Status: empty field;
  • Season: empty field;
  • Score: empty field;
  • Duration: empty field;
  • Rating: empty field;
  • Censored: false;
  • Mylist: empty field;
  • Genre_v2: empty field;

'Options' settings:

  • Limit: 50 maximum;

  • Kind: tv, movie, ova, ona, special, music, tv_13, tv_24, tv_48, !tv, !movie, !ova, !ona, !special, !music, !tv_13, !tv_24, !tv_48;

  • Status: anons, ongoing, released, !anons, !ongoing, !released;

  • Season: 198x, 199x, 2000_2010, 2010_2014, 2015_2019, 2020_2021, 2022, 2023, !198x, !199x, !2000_2010, !2010_2014, !2015_2019, !2020_2021, !2022, !2023;

  • Score: 1-9 maximum;

  • Duration: S, D, F, !S, !D, !F;

  • Rating: none, g, pg, pg_13, r, r_plus, rx, !g, !pg, !pg_13, !r, !r_plus, !rx;

  • Censored: true(string), false(string);

  • Mylist: planned, watching, rewatching, completed, on_hold, dropped;

  • Genre_v2: id search. Below is a list of all available genres by id:

    > 1 (Action); 2 (Adventure); 3 (Cars); 4 (Comedy); 5 (Dementia); 6 (Demons); 7 (Mystery); 8 (Drama); 9 (Ecchi); 10 (Fantasy); 11 (Game); 12 (Hentai); 13 (Historical); 14 (Horror); 15 (Kids); 16 (Magic); 17 (Martial Arts); 18 (Mecha); 19 (Music); 20 (Parody); 21 (Samurai); 22 (Romance); 23 (School); 24 (Sci-Fi); 25 (Shoujo); 26 (Shoujo Ai); 27 (Shounen); 28 (Shounen Ai); 29 (Space); 30 (Sports); 31 (Super Power); 32 (Vampire); 33 (Yaoi); 34 (Yuri); 35 (Harem); 36 (Slice of Life); 37 (Supernatural); 38 (Military); 39 (Police); 40 (Psychological); 41 (Thriller); 42 (Seinen); 43 (Josei); 539 (Erotica); 541 (Work Life); 543 (Gourmet);

Set to true to discard hentai, yaoi and yuri.

More information can be found in the example.

func (*Configuration) RandomMangas

func (c *Configuration) RandomMangas(r Result) ([]api.Mangas, int, error)

If 'Options' empty fields:

  • Limit: 1;
  • Kind: empty field;
  • Status: empty field;
  • Season: empty field;
  • Score: empty field;
  • Censored: false;
  • Mylist: empty field;
  • Genre_v2: empty field;

'Options' settings:

  • Limit: 50 maximum;

  • Kind: manga, manhwa, manhua, light_novel, novel, one_shot, doujin, !manga, !manhwa, !manhua, !light_novel, !novel, !one_shot, !doujin;

  • Status: anons, ongoing, released, paused, discontinued, !anons, !ongoing, !released, !paused, !discontinued;

  • Season: 198x, 199x, 2000_2010, 2010_2014, 2015_2019, 2020_2021, 2022, 2023, !198x, !199x, !2000_2010, !2010_2014, !2015_2019, !2020_2021, !2022, !2023;

  • Score: 1-9 maximum;

  • Censored: true(string), false(string);

  • Mylist: planned, watching, rewatching, completed, on_hold, dropped;

  • Genre_v2: id search. Below is a list of all available genres by id:

    > 46 (Mystery); 47 (Shounen); 48 (Supernatural); 49 (Comedy); 50 (Drama); 51 (Ecchi); 52 (Seinen); 53 (Sci-Fi); 54 (Slice of Life); 55 (Shounen Ai); 56 (Action); 57 (Fantasy); 58 (Magic); 59 (Hentai); 60 (School); 61 (Doujinshi); 62 (Romance); 63 (Shoujo); 64 (Vampire); 65 (Yaoi); 66 (Martial Arts); 67 (Psychological); 68 (Adventure); 69 (Historical); 70 (Military); 71 (Harem); 72 (Demons); 73 (Shoujo Ai); 74 (Gender Bender); 75 (Yuri); 76 (Sports); 77 (Kids); 78 (Music); 79 (Game); 80 (Horror); 81 (Thriller); 82 (Super Power); 83 (Mecha); 84 (Cars); 85 (Space); 86 (Parody); 87 (Josei); 88 (Samurai); 89 (Police); 90 (Dementia); 540 (Erotica); 542 (Work Life); 544 (Gourmet);

Set to true to discard hentai, yaoi and yuri.

More information can be found in the example.

func (*Configuration) RandomRanobes

func (c *Configuration) RandomRanobes(r Result) ([]api.Mangas, int, error)

If 'Options' empty fields:

  • Limit: 1;
  • Status: empty field;
  • Season: empty field;
  • Score: empty field;
  • Censored: false;
  • Mylist: empty field;
  • Genre_v2: empty field;

'Options' settings:

  • Limit: 50 maximum;

  • Status: anons, ongoing, released, paused, discontinued, !anons, !ongoing, !released, !paused, !discontinued;

  • Season: 198x, 199x, 2000_2010, 2010_2014, 2015_2019, 2020_2021, 2022, 2023, !198x, !199x, !2000_2010, !2010_2014, !2015_2019, !2020_2021, !2022, !2023;

  • Score: 1-9 maximum;

  • Censored: true(string), false(string);

  • Mylist: planned, watching, rewatching, completed, on_hold, dropped;

  • Genre_v2: id search. Below is a list of all available genres by id:

    > 46 (Mystery); 47 (Shounen); 48 (Supernatural); 49 (Comedy); 50 (Drama); 51 (Ecchi); 52 (Seinen); 53 (Sci-Fi); 54 (Slice of Life); 55 (Shounen Ai); 56 (Action); 57 (Fantasy); 58 (Magic); 59 (Hentai); 60 (School); 61 (Doujinshi); 62 (Romance); 63 (Shoujo); 64 (Vampire); 65 (Yaoi); 66 (Martial Arts); 67 (Psychological); 68 (Adventure); 69 (Historical); 70 (Military); 71 (Harem); 72 (Demons); 73 (Shoujo Ai); 74 (Gender Bender); 75 (Yuri); 76 (Sports); 77 (Kids); 78 (Music); 79 (Game); 80 (Horror); 81 (Thriller); 82 (Super Power); 83 (Mecha); 84 (Cars); 85 (Space); 86 (Parody); 87 (Josei); 88 (Samurai); 89 (Police); 90 (Dementia); 540 (Erotica); 542 (Work Life); 544 (Gourmet);

Set to true to discard hentai, yaoi and yuri.

More information can be found in the example.

func (*Configuration) ReadAllMessages

func (c *Configuration) ReadAllMessages(name string) (int, error)

Name: type in the mail.

Returns a status of 200.

'Name' settings:

  • news
  • notifications

More information can be found in the example.

func (*Configuration) ReadMessage

func (c *Configuration) ReadMessage(id int) (api.Messages, int, error)

Id: message id.

Ignore:

  • Linked_type: nil;
  • Linked: nil;

More information can be found in the example.

func (*Configuration) RemoveIgnoreTopic

func (c *Configuration) RemoveIgnoreTopic(id int) (api.IgnoreTopic, int, error)

You can find the ID in functions such as: SearchTopics(), SearchTopicsUpdates(), SearchTopicsHot()

More information can be found in the example.

func (*Configuration) SearchAnimes

func (c *Configuration) SearchAnimes(name string, r Result) ([]api.Animes, int, error)

Name: anime name.

Exclamation mark(!) indicates ignore.

If you use the 'order' parameter, you don't need to enter the name of the anime.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Order: empty field;
  • Kind: empty field;
  • Status: empty field;
  • Season: empty field;
  • Score: empty field;
  • Duration: empty field;
  • Rating: empty field;
  • Censored: false;
  • Mylist: empty field;
  • Genre_v2: empty field;

'Options' settings:

  • Page: 100000 maximum;

  • Limit: 50 maximum;

  • Order: id, ranked, kind, popularity, name, aired_on, episodes, status; random has been moved to a separate function, check RandomAnime;

  • Kind: tv, movie, ova, ona, special, music, tv_13, tv_24, tv_48, !tv, !movie, !ova, !ona, !special, !music, !tv_13, !tv_24, !tv_48;

  • Status: anons, ongoing, released, !anons, !ongoing, !released;

  • Season: 198x, 199x, 2000_2010, 2010_2014, 2015_2019, 2020_2021, 2022, 2023, !198x, !199x, !2000_2010, !2010_2014, !2015_2019, !2020_2021, !2022, !2023;

  • Score: 1-9 maximum;

  • Duration: S, D, F, !S, !D, !F;

  • Rating: none, g, pg, pg_13, r, r_plus, rx, !g, !pg, !pg_13, !r, !r_plus, !rx;

  • Censored: true(string), false(string);

  • Mylist: planned, watching, rewatching, completed, on_hold, dropped;

  • Search: default search;

  • Genre_v2: id search. Below is a list of all available genres by id:

    > 1 (Action); 2 (Adventure); 3 (Cars); 4 (Comedy); 5 (Dementia); 6 (Demons); 7 (Mystery); 8 (Drama); 9 (Ecchi); 10 (Fantasy); 11 (Game); 12 (Hentai); 13 (Historical); 14 (Horror); 15 (Kids); 16 (Magic); 17 (Martial Arts); 18 (Mecha); 19 (Music); 20 (Parody); 21 (Samurai); 22 (Romance); 23 (School); 24 (Sci-Fi); 25 (Shoujo); 26 (Shoujo Ai); 27 (Shounen); 28 (Shounen Ai); 29 (Space); 30 (Sports); 31 (Super Power); 32 (Vampire); 33 (Yaoi); 34 (Yuri); 35 (Harem); 36 (Slice of Life); 37 (Supernatural); 38 (Military); 39 (Police); 40 (Psychological); 41 (Thriller); 42 (Seinen); 43 (Josei); 539 (Erotica); 541 (Work Life); 543 (Gourmet);

Set to true to discard hentai, yaoi and yuri.

  • Type: "deprecated";
  • Studio: not supported;
  • Franchise: not supported;
  • Ids: not supported;
  • Exclude_ids: not supported;

More information can be found in the example.

func (*Configuration) SearchBans

func (c *Configuration) SearchBans() ([]api.Bans, int, error)

More information can be found in the example.

func (*Configuration) SearchCalendar

func (c *Configuration) SearchCalendar(r Result) ([]api.Calendar, int, error)

If 'Options' empty fields:

  • Censored: false;

'Options' settings:

  • Censored: true, false;

Set to false to allow hentai, yaoi and yuri.

More information can be found in the example.

func (*Configuration) SearchCharacters

func (c *Configuration) SearchCharacters(name string) ([]api.CharacterInfo, int, error)

Name: character name.

More information can be found in the example.

func (*Configuration) SearchClubs

func (c *Configuration) SearchClubs(name string, r Result) ([]api.Clubs, int, error)

FIXME: Limit always returns +1 of the given number.

Name: club name.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;
  • Search: default search;

More information can be found in the example.

func (*Configuration) SearchConstantsAnime

func (c *Configuration) SearchConstantsAnime() (api.Constants, int, error)

More information can be found in the example.

func (*Configuration) SearchConstantsClub

func (c *Configuration) SearchConstantsClub() (api.ConstantsClub, int, error)

More information can be found in the example.

func (*Configuration) SearchConstantsManga

func (c *Configuration) SearchConstantsManga() (api.Constants, int, error)

More information can be found in the example.

func (*Configuration) SearchConstantsSmileys

func (c *Configuration) SearchConstantsSmileys() ([]api.ConstantsSmileys, int, error)

More information can be found in the example.

func (*Configuration) SearchConstantsUserRate

func (c *Configuration) SearchConstantsUserRate() (api.ConstantsUserRate, int, error)

More information can be found in the example.

func (*Configuration) SearchForums

func (c *Configuration) SearchForums() ([]api.Forums, int, error)

More information can be found in the example.

func (*Configuration) SearchGenres

func (c *Configuration) SearchGenres(name string) ([]api.Genres, int, error)

name: anime or manga.

More information can be found in the example.

func (*Configuration) SearchGraphql

func (c *Configuration) SearchGraphql(schema string) (api.GraphQL, int, error)

Schema: customized request.

How to use and all the information you need here.

func (*Configuration) SearchMangas

func (c *Configuration) SearchMangas(name string, r Result) ([]api.Mangas, int, error)

Name: manga name.

Exclamation mark(!) indicates ignore.

If you use the 'order' parameter, you don't need to enter the name of the manga.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Order: empty field;
  • Kind: empty field;
  • Status: empty field;
  • Season: empty field;
  • Score: empty field;
  • Censored: false;
  • Mylist: empty field;
  • Genre_v2: empty field;

'Options' settings:

  • Page: 100000 maximum;

  • Limit: 50 maximum;

  • Order: id, ranked, kind, popularity, name, aired_on, volumes, chapters, status; random has been moved to a separate function, check RandomManga;

  • Kind: manga, manhwa, manhua, light_novel, novel, one_shot, doujin, !manga, !manhwa, !manhua, !light_novel, !novel, !one_shot, !doujin;

  • Status: anons, ongoing, released, paused, discontinued, !anons, !ongoing, !released, !paused, !discontinued;

  • Season: 198x, 199x, 2000_2010, 2010_2014, 2015_2019, 2020_2021, 2022, 2023, !198x, !199x, !2000_2010, !2010_2014, !2015_2019, !2020_2021, !2022, !2023;

  • Score: 1-9 maximum;

  • Censored: true(string), false(string);

  • Mylist: planned, watching, rewatching, completed, on_hold, dropped;

  • Search: default search;

  • Genre_v2: id search. Below is a list of all available genres by id:

    > 46 (Mystery); 47 (Shounen); 48 (Supernatural); 49 (Comedy); 50 (Drama); 51 (Ecchi); 52 (Seinen); 53 (Sci-Fi); 54 (Slice of Life); 55 (Shounen Ai); 56 (Action); 57 (Fantasy); 58 (Magic); 59 (Hentai); 60 (School); 61 (Doujinshi); 62 (Romance); 63 (Shoujo); 64 (Vampire); 65 (Yaoi); 66 (Martial Arts); 67 (Psychological); 68 (Adventure); 69 (Historical); 70 (Military); 71 (Harem); 72 (Demons); 73 (Shoujo Ai); 74 (Gender Bender); 75 (Yuri); 76 (Sports); 77 (Kids); 78 (Music); 79 (Game); 80 (Horror); 81 (Thriller); 82 (Super Power); 83 (Mecha); 84 (Cars); 85 (Space); 86 (Parody); 87 (Josei); 88 (Samurai); 89 (Police); 90 (Dementia); 540 (Erotica); 542 (Work Life); 544 (Gourmet);

Set to true to discard hentai, yaoi and yuri.

  • Type: "deprecated";
  • Publisher: not supported;
  • Franchise: not supported;
  • Ids: not supported;
  • Exclude_ids: not supported;

More information can be found in the example.

func (*Configuration) SearchPeoples

func (c *Configuration) SearchPeoples(name string, r Result) ([]api.AllPeople, int, error)

Name: people name.

If 'Options' empty fields:

  • Kind: seyu;

'Options' settings:

  • Page/Limit: not supported, idk why;
  • Kind: seyu, mangaka, producer;

More information can be found in the example.

func (*Configuration) SearchPublishers

func (c *Configuration) SearchPublishers() ([]api.Publishers, int, error)

More information can be found in the example.

func (*Configuration) SearchRanobes

func (c *Configuration) SearchRanobes(name string, r Result) ([]api.Mangas, int, error)

Name: ranobe name.

Exclamation mark(!) indicates ignore.

If you use the 'order' parameter, you don't need to enter the name of the ranobe.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Order: empty field;
  • Status: empty field;
  • Season: empty field;
  • Score: empty field;
  • Censored: false;
  • Mylist: empty field;
  • Genre_v2: empty field;

'Options' settings:

  • Page: 100000 maximum;

  • Limit: 50 maximum;

  • Order: id, ranked, kind, popularity, name, aired_on, volumes, chapters, status; random has been moved to a separate function, check RandomRanobe;

  • Status: anons, ongoing, released, paused, discontinued, !anons, !ongoing, !released, !paused, !discontinued;

  • Season: 198x, 199x, 2000_2010, 2010_2014, 2015_2019, 2020_2021, 2022, 2023, !198x, !199x, !2000_2010, !2010_2014, !2015_2019, !2020_2021, !2022, !2023;

  • Score: 1-9 maximum;

  • Censored: true(string), false(string);

  • Mylist: planned, watching, rewatching, completed, on_hold, dropped;

  • Search: default search;

  • Genre_v2: id search. Below is a list of all available genres by id:

    > 46 (Mystery); 47 (Shounen); 48 (Supernatural); 49 (Comedy); 50 (Drama); 51 (Ecchi); 52 (Seinen); 53 (Sci-Fi); 54 (Slice of Life); 55 (Shounen Ai); 56 (Action); 57 (Fantasy); 58 (Magic); 59 (Hentai); 60 (School); 61 (Doujinshi); 62 (Romance); 63 (Shoujo); 64 (Vampire); 65 (Yaoi); 66 (Martial Arts); 67 (Psychological); 68 (Adventure); 69 (Historical); 70 (Military); 71 (Harem); 72 (Demons); 73 (Shoujo Ai); 74 (Gender Bender); 75 (Yuri); 76 (Sports); 77 (Kids); 78 (Music); 79 (Game); 80 (Horror); 81 (Thriller); 82 (Super Power); 83 (Mecha); 84 (Cars); 85 (Space); 86 (Parody); 87 (Josei); 88 (Samurai); 89 (Police); 90 (Dementia); 540 (Erotica); 542 (Work Life); 544 (Gourmet);

Set to true to discard hentai, yaoi and yuri.

  • Publisher: not supported;
  • Franchise: not supported;
  • Ids: not supported;
  • Exclude_ids: not supported;

More information can be found in the example.

func (*Configuration) SearchStudios

func (c *Configuration) SearchStudios() ([]api.Studios, int, error)

More information can be found in the example.

func (*Configuration) SearchTopics

func (c *Configuration) SearchTopics(r Result) ([]api.Topics, int, error)

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Forum: all;
  • Linked_id: empty field;
  • Linked_type: empty field;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;
  • Forum: cosplay, animanga, site, games, vn, contests, offtopic, clubs, my_clubs, critiques, news, collections, articles;
  • Linked_id: number without limit;
  • Linked_type: Anime, Manga, Ranobe, Character, Person, Club, ClubPage, Critique, Review, Contest, CosplayGallery, Collection, Article;

REMARK: linked_id and linked_type are only used together.

  • Type: not supported;

More information can be found in the example.

TODO: Add implementation of creating/updating/deleting a topic. This is not needed at this stage.

func (*Configuration) SearchTopicsHot

func (c *Configuration) SearchTopicsHot(r Result) ([]api.Topics, int, error)

If 'Options' empty fields:

  • Limit: 1;

'Options' settings:

  • Limit: 10 maximum;

More information can be found in the example.

func (*Configuration) SearchTopicsId

func (c *Configuration) SearchTopicsId(id int) (api.TopicsId, int, error)

You can find the ID in functions such as: SearchTopics(), SearchTopicsUpdates(), SearchTopicsHot()

More information can be found in the example.

func (*Configuration) SearchTopicsUpdates

func (c *Configuration) SearchTopicsUpdates(r Result) ([]api.TopicsUpdates, int, error)

FIXME: Limit always returns +1 of the given number.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;

More information can be found in the example.

func (*Configuration) SearchUser

func (c *Configuration) SearchUser(name string) (api.Users, int, error)

Name: user name.

Search by user is case sensitive.

More information can be found in the example.

func (*Configuration) SearchUsers

func (c *Configuration) SearchUsers(name string, r Result) ([]api.Users, int, error)

FIXME: Limit always returns +1 of the given number.

Name: user name.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 100 maximum;

Don't use Stats.Statuses.Anime and Stats.Statuses.Manga: empty slice.

More information can be found in the example.

func (*Configuration) SendMessage

func (c *Configuration) SendMessage(from_id, to_id int, message string) (api.Messages, int, error)

From_id: your Id.

To_id: the Id of the person you want to send the message to.

Message: message text.

Returns a status of 201.

Ignore:

  • Linked_type: nil;
  • Linked: nil;

More information can be found in the example.

func (*Configuration) SetFastId

func (c *Configuration) SetFastId(id int) *FastId

To create a custom id.

More information can be found in the example.

func (*Configuration) WhoAmi

func (c *Configuration) WhoAmi() (api.Who, int, error)

More information can be found in the example.

type FastId

type FastId struct {
	Id   int
	Conf Configuration
	Err  error
}

func (*FastId) AddFriend

func (f *FastId) AddFriend() (api.FriendRequest, error)

More information can be found in the example.

func (*FastId) AddIgnoreUser

func (f *FastId) AddIgnoreUser() (api.IgnoreUser, error)

More information can be found in the example.

func (*FastId) ClubJoin

func (f *FastId) ClubJoin() (int, error)

More information can be found in the example.

func (*FastId) ClubLeave

func (f *FastId) ClubLeave() (int, error)

More information can be found in the example.

func (*FastId) DeleteDialogs

func (f *FastId) DeleteDialogs() (api.FriendRequest, error)

When using FastIdUser()/SetFastId(), specify the user's nickname (not your own).

More information can be found in the example.

func (*FastId) FavoritesCreate

func (f *FastId) FavoritesCreate(linked_type string, kind string) (api.Favorites, error)

Linked_type: Anime, Manga, Ranobe, Person, Character.

Kind(required when Linked_type is Person): common, seyu, mangaka, producer, person.

More information can be found in the example.

func (*FastId) FavoritesDelete

func (f *FastId) FavoritesDelete(linked_type string) (api.Favorites, error)

Linked_type: Anime, Manga, Ranobe, Person, Character.

More information can be found in the example.

func (*FastId) FavoritesReorder

func (f *FastId) FavoritesReorder(position int) (int, error)

FIXME: https://github.com/heycatch/goshikimori/issues/14

Position: a new position on the list, it starts from 0.

You can only get a StatusCode.

More information can be found in the example.

func (*FastId) GetFastId

func (f *FastId) GetFastId() int

func (*FastId) RemoveFriend

func (f *FastId) RemoveFriend() (api.FriendRequest, error)

More information can be found in the example.

func (*FastId) RemoveIgnoreUser

func (f *FastId) RemoveIgnoreUser() (api.IgnoreUser, error)

More information can be found in the example.

func (*FastId) SearchAchievement

func (f *FastId) SearchAchievement() ([]api.Achievements, error)

As a result, we return a complete list of all achievements.

Next comes the filtering through "NekoSearch" and the error about obtaining specific achievements is already being processed there.

More information can be found in the example.

func (*FastId) SearchAnime

func (f *FastId) SearchAnime() (api.Anime, error)

More information can be found in the example.

func (f *FastId) SearchAnimeExternalLinks() ([]api.ExternalLinks, error)

More information can be found in the example.

func (*FastId) SearchAnimeFranchise

func (f *FastId) SearchAnimeFranchise() (api.Franchise, error)

More information can be found in the example.

func (*FastId) SearchAnimeRoles

func (f *FastId) SearchAnimeRoles() ([]api.Roles, error)

More information can be found in the example.

func (*FastId) SearchAnimeScreenshots

func (f *FastId) SearchAnimeScreenshots() ([]api.AnimeScreenshots, error)

More information can be found in the example.

func (*FastId) SearchAnimeVideos

func (f *FastId) SearchAnimeVideos() ([]api.AnimeVideos, error)

More information can be found in the example.

func (*FastId) SearchCharacter

func (f *FastId) SearchCharacter() (api.Character, error)

More information can be found in the example.

func (*FastId) SearchClubAnimes

func (f *FastId) SearchClubAnimes(r Result) ([]api.Animes, error)

FIXME: The limit does not work and always gives the maximum amount.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 20 maximum;

More information can be found in the example.

func (*FastId) SearchClubCharacters

func (f *FastId) SearchClubCharacters(r Result) ([]api.CharacterInfo, error)

FIXME: The limit does not work and always gives the maximum amount.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 20 maximum;

More information can be found in the example.

func (*FastId) SearchClubClubs

func (f *FastId) SearchClubClubs(r Result) ([]api.Clubs, error)

FIXME: The limit does not work and always gives the maximum amount.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;

More information can be found in the example.

func (*FastId) SearchClubCollections

func (f *FastId) SearchClubCollections(r Result) ([]api.ClubCollections, error)

FIXME: The limit does not work and always gives the maximum amount.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Page: 4 maximum;

More information can be found in the example.

func (*FastId) SearchClubImages

func (f *FastId) SearchClubImages(r Result) ([]api.ClubImages, error)

FIXME: Limit always returns +1 of the given number.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 100 maximum;

More information can be found in the example.

func (*FastId) SearchClubMangas

func (f *FastId) SearchClubMangas(r Result) ([]api.Mangas, error)

FIXME: The limit does not work and always gives the maximum amount.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 20 maximum;

More information can be found in the example.

func (*FastId) SearchClubMembers

func (f *FastId) SearchClubMembers(r Result) ([]api.UserFriends, error)

FIXME: Limit always returns +1 of the given number.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 100 maximum;

More information can be found in the example.

func (*FastId) SearchClubRanobe

func (f *FastId) SearchClubRanobe(r Result) ([]api.Mangas, error)

FIXME: The limit does not work and always gives the maximum amount.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 20 maximum;

More information can be found in the example.

func (*FastId) SearchDialogs

func (f *FastId) SearchDialogs() ([]api.SearchDialogs, error)

When using FastIdUser()/SetFastId(), specify the user's nickname (not your own).

More information can be found in the example.

func (*FastId) SearchManga

func (f *FastId) SearchManga() (api.Manga, error)

More information can be found in the example.

func (f *FastId) SearchMangaExternalLinks() ([]api.ExternalLinks, error)

More information can be found in the example.

func (*FastId) SearchMangaFranchise

func (f *FastId) SearchMangaFranchise() (api.Franchise, error)

More information can be found in the example.

func (*FastId) SearchMangaRoles

func (f *FastId) SearchMangaRoles() ([]api.Roles, error)

More information can be found in the example.

func (*FastId) SearchPeople

func (f *FastId) SearchPeople() (api.People, error)

More information can be found in the example.

func (*FastId) SearchRanobe

func (f *FastId) SearchRanobe() (api.Manga, error)

More information can be found in the example.

func (f *FastId) SearchRanobeExternalLinks() ([]api.ExternalLinks, error)

More information can be found in the example.

func (*FastId) SearchRanobeFranchise

func (f *FastId) SearchRanobeFranchise() (api.Franchise, error)

More information can be found in the example.

func (*FastId) SearchRanobeRoles

func (f *FastId) SearchRanobeRoles() ([]api.Roles, error)

More information can be found in the example.

func (*FastId) SearchRelatedAnime

func (f *FastId) SearchRelatedAnime() ([]api.RelatedAnimes, error)

More information can be found in the example.

func (*FastId) SearchRelatedManga

func (f *FastId) SearchRelatedManga() ([]api.RelatedMangas, error)

More information can be found in the example.

func (*FastId) SearchRelatedRanobe

func (f *FastId) SearchRelatedRanobe() ([]api.RelatedMangas, error)

More information can be found in the example.

func (*FastId) SearchSimilarAnime

func (f *FastId) SearchSimilarAnime() ([]api.Animes, error)

More information can be found in the example.

func (*FastId) SearchSimilarManga

func (f *FastId) SearchSimilarManga() ([]api.Mangas, error)

More information can be found in the example.

func (*FastId) SearchSimilarRanobe

func (f *FastId) SearchSimilarRanobe() ([]api.Mangas, error)

More information can be found in the example.

func (*FastId) SearchTopicsAnime

func (f *FastId) SearchTopicsAnime(r Result) ([]api.Topics, error)

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;

More information can be found in the example.

func (*FastId) SearchTopicsManga

func (f *FastId) SearchTopicsManga(r Result) ([]api.Topics, error)

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;

More information can be found in the example.

func (*FastId) SearchTopicsRanobe

func (f *FastId) SearchTopicsRanobe(r Result) ([]api.Topics, error)

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 30 maximum;

More information can be found in the example.

func (*FastId) SearchUserAnimeRates

func (f *FastId) SearchUserAnimeRates(r Result) ([]api.UserAnimeRates, error)

FIXME: Limit always returns +1 of the given number.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Status: watching;
  • Censored: false;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 5000 maximum;
  • Status: planned, watching, rewatching, completed, on_hold, dropped;
  • Censored: true, false;

Set to true to discard hentai, yaoi and yuri.

More information can be found in the example.

func (*FastId) SearchUserBans

func (f *FastId) SearchUserBans() ([]api.Bans, error)

More information can be found in the example.

func (*FastId) SearchUserClubs

func (f *FastId) SearchUserClubs() ([]api.Clubs, error)

More information can be found in the example.

func (*FastId) SearchUserFavourites

func (f *FastId) SearchUserFavourites() (api.UserFavourites, error)

More information can be found in the example.

func (*FastId) SearchUserFriends

func (f *FastId) SearchUserFriends(r Result) ([]api.UserFriends, error)

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 100 maximum;

More information can be found in the example.

func (*FastId) SearchUserHistory

func (f *FastId) SearchUserHistory(r Result) ([]api.UserHistory, error)

FIXME: Limit always returns +1 of the given number.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Target_type: Anime;
  • Target_id: 0;

'Options' settings:

  • Page: 100000 maximum.
  • Limit: 100 maximum.
  • Target_id: id anime/manga/ranobe.
  • Target_type: Anime, Manga.

More information can be found in the example.

func (*FastId) SearchUserMangaRates

func (f *FastId) SearchUserMangaRates(r Result) ([]api.UserMangaRates, error)

FIXME: Limit always returns +1 of the given number.

If 'Options' empty fields:

  • Page: 1;
  • Limit: 1;
  • Censored: false;

'Options' Settings:

  • Page: 100000 maximum;
  • Limit: 5000 maximum;
  • Censored: true, false;

Set to true to discard hentai, yaoi and yuri.

More information can be found in the example.

func (*FastId) UnreadMessagesIds

func (f *FastId) UnreadMessagesIds(name string) ([]int, error)

Name: unread message type.

'Name' settings:

  • messages
  • news
  • notifications

Empty array to be filled with ids for messages.

func (*FastId) UserBriefInfo

func (f *FastId) UserBriefInfo() (api.Info, error)

More information can be found in the example.

func (*FastId) UserMessages

func (f *FastId) UserMessages(r Result) ([]api.Messages, error)

If 'Options' empty fields:

  • Type: news;
  • Page: 1;
  • Limit: 1;

'Options' settings:

  • Page: 100000 maximum;
  • Limit: 100 maximum;
  • Type: inbox, private, sent, news, notifications;

More information can be found in the example.

func (*FastId) UserUnreadMessages

func (f *FastId) UserUnreadMessages() (api.UnreadMessages, error)

Show current user unread messages counts.

More information can be found in the example.

type Options

type Options struct {
	Order, Kind, Status, Season, Rating,
	Type, Target_type, Duration, Mylist,
	Forum, Linked_type string
	Page, Limit, Score, Linked_id, Target_id int
	Censored                                 bool
	Genre_v2                                 []int
}

func (*Options) OptionsAnime

func (o *Options) OptionsAnime() string

V2 implementation of OptionsAnime().

BenchmarkAnimeV1-4 74109 16041 ns/op 4053 B/op 32 allocs/op

BenchmarkAnimeV2-4 198708 6785 ns/op 1727 B/op 22 allocs/op

func (*Options) OptionsAnimeRates

func (o *Options) OptionsAnimeRates() string

V2 implementation of AnimeRates().

BenchmarkRanobe-4 406456 3327 ns/op 408 B/op 12 allocs/op

BenchmarkRanobe-4 958911 2595 ns/op 248 B/op 9 allocs/op

func (*Options) OptionsCalendar

func (o *Options) OptionsCalendar() string

func (*Options) OptionsClub

func (o *Options) OptionsClub() string

func (*Options) OptionsClubAnimeManga

func (o *Options) OptionsClubAnimeManga() string

func (*Options) OptionsClubCollections

func (o *Options) OptionsClubCollections() string

func (*Options) OptionsManga

func (o *Options) OptionsManga() string

V2 implementation of OptionsManga().

BenchmarkMangaV1-4 99231 13817 ns/op 3662 B/op 27 allocs/op

BenchmarkMangaV2-4 228412 5485 ns/op 1391 B/op 20 allocs/op

func (*Options) OptionsMangaRates

func (o *Options) OptionsMangaRates() string

func (*Options) OptionsMessages

func (o *Options) OptionsMessages() string

V2 implementation of OptionsMessages().

BenchmarkMessagesV1-4 471354 2375 ns/op 312 B/op 10 allocs/op

BenchmarkMessagesV2-4 1000000 1092 ns/op 152 B/op 7 allocs/op

func (*Options) OptionsPeople

func (o *Options) OptionsPeople() string

V2 implementation of OptionsPeople().

BenchmarkPeopleV1-4 537405 1929 ns/op 216 B/op 7 allocs/op

BenchmarkPeopleV2-4 1936758 797.7 ns/op 56 B/op 4 allocs/op

func (*Options) OptionsRandomAnime

func (o *Options) OptionsRandomAnime() string

func (*Options) OptionsRandomManga

func (o *Options) OptionsRandomManga() string

func (*Options) OptionsRandomRanobe

func (o *Options) OptionsRandomRanobe() string

func (*Options) OptionsRanobe

func (o *Options) OptionsRanobe() string

V2 implementation of OptionsRanobe().

BenchmarkRanobeV1-4 116786 10772 ns/op 2847 B/op 23 allocs/op

BenchmarkRanobeV2-4 341701 3751 ns/op 616 B/op 17 allocs/op

func (*Options) OptionsTopics

func (o *Options) OptionsTopics() string

V2 implementation of OptionsTopics().

BenchmarkTopicsV1-4 203890 6134 ns/op 488 B/op 14 allocs/op

BenchmarkTopicsV2-4 745861 1884 ns/op 280 B/op 10 allocs/op

func (*Options) OptionsTopicsHot

func (o *Options) OptionsTopicsHot() string

func (*Options) OptionsUserHistory

func (o *Options) OptionsUserHistory() string

V2 implementation of OptionsUserHistory().

BenchmarkUserHistoryV1-4 453085 3211 ns/op 408 B/op 12 allocs/op

BenchmarkUserHistoryV2-4 949827 2529 ns/op 248 B/op 9 allocs/op

func (*Options) OptionsUsers

func (o *Options) OptionsUsers() string

type Result

type Result interface {
	OptionsAnime() string
	OptionsManga() string
	OptionsRanobe() string
	OptionsUsers() string
	OptionsClub() string
	OptionsCalendar() string
	OptionsAnimeRates() string
	OptionsMangaRates() string
	OptionsUserHistory() string
	OptionsMessages() string
	OptionsPeople() string
	OptionsClubAnimeManga() string
	OptionsClubCollections() string
	OptionsTopics() string
	OptionsTopicsHot() string
	OptionsRandomAnime() string
	OptionsRandomManga() string
	OptionsRandomRanobe() string
}

type StatusBar

type StatusBar struct {
	Percent, Current, Total int
	Rate, Graph             string
	Wait                    time.Duration
}

Jump to

Keyboard shortcuts

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