nekopoi

package module
v0.0.0-...-5c1f922 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 7 Imported by: 0

README

nekopoi-go

A NekoPoi direct API, written in Golang, without scraping.

Installation
go get -u github.com/rushkii/nekopoi-go
Example

You see all examples in the examples directory.

FAQ

Q: How do you get their API?
A: Simple, through reverse engineering concepts.

Q: How do you do that?
A: Sorry, it's secret 😅.

Q: Is the headers affecting my account?
A: So far, no, NekoPoi does not use an account login except for chat using Chatango and the headers is not include for Chatango. Any headers are the responsibility of the NekoPoi developer.

LICENSE

MIT License

DISCLAIMER

I'm not a NekoPoi developer nor the author, any copyrights goes to NekoPoi themselves, I just creating the API wrapper.

Documentation

Index

Constants

View Source
const API_URL = "https://cu8auck2lc.3z094n2681i06q8k14w31cu4q80d5p.com/330cceade91a6a9cd30fb8042222ed56/71b8acf33b508c7543592acd9d9eb70d"

Variables

This section is empty.

Functions

func Prettify

func Prettify(vStruct any) string

func Request

func Request(endpoint string) (io.ReadCloser, error)

func SlugWebURL

func SlugWebURL(text string) string

func Slugify

func Slugify(text string) string

Types

type ComingSoonT

type ComingSoonT struct {
	Result string `json:"result"`
}

func GetComingSoon

func GetComingSoon() (*ComingSoonT, error)

type DetailT

type DetailT struct {
	ID       uint64      `json:"id"`
	Date     string      `json:"date"`
	Title    string      `json:"title"`
	Image    string      `json:"image"`
	Content  string      `json:"content"`
	Series   string      `json:"series"`
	Note     string      `json:"note"`
	Slug     string      `json:"slug"`
	WebUrl   string      `json:"web_url"`
	Stream   []linkT     `json:"stream"`
	Download []downloadT `json:"download"`
}

func GetDetail

func GetDetail(id uint64) (*DetailT, error)

type DiscussionT

type DiscussionT struct {
	Thread      string     `json:"thread"`
	Hasnext     bool       `json:"has_next"`
	HasPrevious bool       `json:"has_previous"`
	Total       uint64     `json:"total"`
	Result      []commentT `json:"result"`
}

func GetComments

func GetComments(slug string) (*DiscussionT, error)

type PreviewT

type PreviewT struct {
	ID          uint64 `json:"id"`
	Type        string `json:"type"`
	Date        string `json:"date"`
	Title       string `json:"title"`
	Image       string `json:"image"`
	Slug        string `json:"slug"`
	Description string `json:"description"`
	WebUrl      string `json:"web_url"`
}

type RecentT

type RecentT struct {
	Carousel []PreviewT    `json:"carousel"`
	Posts    []recentdataT `json:"posts"`
}

func GetRecent

func GetRecent() (*RecentT, error)

type SearchT

type SearchT struct {
	Total      int        `json:"total"`
	TotalPages int        `json:"total_pages"`
	Result     []PreviewT `json:"result"`
}

func GetByIndex

func GetByIndex(letter string, filter string) (*SearchT, error)
func Search(query string, page uint8) (*SearchT, error)

func SearchByGenre

func SearchByGenre[T termidT](term_id T) (*SearchT, error)

type SeriesT

type SeriesT struct {
	ID       uint64     `json:"id"`
	Date     string     `json:"date"`
	Title    string     `json:"title"`
	Image    string     `json:"image"`
	Slug     string     `json:"slug"`
	WebUrl   string     `json:"web_url"`
	Meta     infometaT  `json:"info_meta"`
	Episodes []PreviewT `json:"episode"`
}

func GetSeries

func GetSeries(id uint64) (*SeriesT, error)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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