goneis

package module
v0.0.0-...-e391115 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

goneis

Open NEIS API wrapper for Go

Deprecated

I will make another thing. See you soon!

Usage

func main() {
    client := NewNeisClient("")
    schools, err := client.GetSchoolInfo("", "", "선린인터넷고등학교", "", "", "")
    if err != nil {
      t.Error(err)
    }
    
    fmt.Println(schools[0].Name) // 선린인터넷고등학교
    
}

Thanks to

SaidBySolo/neispy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingValues   = errors.New("required values are missing")
	ErrInvalidKey      = errors.New("key is invalid")
	ErrServiceNotFound = errors.New("cannot find requested service")
	ErrInvalidLVType   = errors.New("location value type is invalid")
	ErrTooManyData     = errors.New("too many data request(no more than 1000)")
	ErrTooManyRequest  = errors.New("too many request")
	ErrServerError     = errors.New("server error occurred")
	ErrDBConnection    = errors.New("database connection error occurred")
	ErrSQLQuery        = errors.New("sql query error occurred")
	ErrKeyRestricted   = errors.New("key is restricted by administrator")
	ErrMissingData     = errors.New("cannot find data")
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string
	Message string
}

type HTTPClient

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

type NeisClient

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

func NewNeisClient

func NewNeisClient(key string) *NeisClient

NewNeisClient returns new neis api wrapper client. Key is optional. If key is missing(""), it will use sample key(5 data only).

func (NeisClient) GetSchoolInfo

func (c NeisClient) GetSchoolInfo(officeCode string, schoolCode string, schoolName string, schoolType string, location string, foundationName string) ([]School, error)

GetSchoolInfo returns Schools All arguments are optional. If arguments are missing(""), it will return all schools.

type Parameters

type Parameters map[string]string

type School

type School struct {
	OfficeCode       string
	OfficeName       string
	Code             string
	Name             string
	EnglishName      string
	Type             string
	ZipCode          string
	Address          string
	DetailedAddress  string
	TelNumber        string
	Homepage         string
	Gender           string
	FaxNumber        string
	HighSchoolType   string
	SPHighSchoolType string
	FoundationDate   string
	FoundationDay    string
}

Jump to

Keyboard shortcuts

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