mech

package module
v1.42.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: OSL-3.0 Imports: 10 Imported by: 11

README

Mech

Listen, um, I don’t really know what’s going on here, but I’m leaving. I don’t know where exactly, but I’m gonna start over.

Come with me.

Paint it Black (2016)

Download media or send API requests

Some users might want to make anonymous requests, because of privacy or any number of other reasons. Most API these days only offically support authenticated access. This is useful for the company providing the API, as they can use the data for their own purposes (analytics etc). However authentication really doesnt do anything for the end user. Its just a pointless burden to getting the information you need for a program you may be writing. Consider that in many cases, the same information is available via HTML on the primary website, usually without being logged in. So why can you do that with HTML, but not with the API? Well you can, using this module.

How to install?

Check here first:

https://github.com/89z/mech/releases

I dont do a build for every tag, but some tags will have builds available. If you need a newer build, and cant build yourself for some reason, comment on this thread:

https://github.com/89z/mech/issues/7

To build yourself, download Go from here:

https://golang.org/dl

and extract archive. Then download Mech:

https://github.com/89z/mech/archive/refs/heads/master.zip

and extract archive. Then navigate to mech-master/cmd/youtube, and enter:

go build

Repo

https://github.com/89z/mech

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean added in v1.30.3

func Clean(char rune) rune

func ExtensionByType added in v1.39.7

func ExtensionByType(typ string) (string, error)

github.com/golang/go/issues/22318

func NumberFormat added in v1.37.6

func NumberFormat(val float64, metric []string) string

func Parse added in v1.11.9

func Parse(id string) (uint64, error)

This should succeed if ID is passed, and fail is URL is passed.

func Percent added in v1.37.6

func Percent(pos, length int64) string

Types

type InvalidSlice added in v1.41.6

type InvalidSlice struct {
	Index, Length int
}

func (InvalidSlice) Error added in v1.41.6

func (i InvalidSlice) Error() string

type LogLevel added in v1.40.6

type LogLevel int

func (LogLevel) Dump added in v1.41.8

func (l LogLevel) Dump(req *http.Request) error

type NotFound added in v1.37.5

type NotFound struct {
	Input string
}

func (NotFound) Error added in v1.37.5

func (n NotFound) Error() string

type Progress added in v1.39.3

type Progress struct {
	*http.Response
	// contains filtered or unexported fields
}

func NewProgress added in v1.39.3

func NewProgress(res *http.Response) *Progress

func (*Progress) Read added in v1.39.3

func (p *Progress) Read(buf []byte) (int, error)

type Response added in v1.15.0

type Response struct {
	*http.Response
}

func (Response) Error added in v1.42.1

func (r Response) Error() string

type Values added in v1.42.0

type Values map[string]string

func (Values) Encode added in v1.42.0

func (v Values) Encode() string

func (Values) Header added in v1.42.0

func (v Values) Header() http.Header

func (Values) Reader added in v1.42.0

func (v Values) Reader() io.Reader

Jump to

Keyboard shortcuts

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