Skip to content

dqn/acnh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

acnh

build status

Animal Crossing: New Horizons API wrapper.

Installation

$ go get github.com/dqn/acnh

Usage

package main import ( "fmt" "github.com/dqn/acnh" "github.com/dqn/gonso" ) func main() { accessToken, _ := gonso.Auth("SESSION_TOKEN") a, err := acnh.New(accessToken) if err != nil { // Handle error.	} r, err := a.Users() if err != nil { // Handle error.	} for _, user := range r.Users { fmt.Println(user)	} }

You can get session token and access token by using gonso.

API

func New

func New(accessToken string) *ACNH

New ACNH Client.

type ACNH

func Users

func (a *ACNH) Users() UsersResponse

Get all land users.

func AuthToken

func (a *ACNH) AuthToken(userID string) AuthTokenResponse

Get token for user.

func UserProfile

func (a *ACNH) UserProfile(token, userID string) UserProfileResponse

Get user profile.

func LandProfile

func (a *ACNH) LandProfile(token, landID string) LandProfileResponse

Get land profile.

func Friends

func (a *ACNH) Friends(token string) FriendsResponse

Get friends.

func PresenceFriends

func (a *ACNH) PresenceFriends(token string) PresenceFriendsResponse

Get online friends.

func SendMessageAll

func (a *ACNH) SendMessageAll(token, message string) SendMessageResponse

Send message to all friends.

func SendMessageFriend

func (a *ACNH) SendMessageFriend(token, userID, message string) SendMessageResponse

Send message to a friend.

func SendMessageLocal

func (a *ACNH) SendMessageLocal(token, message string) SendMessageResponse

Send message local.

Response type details

See type.go.

License

MIT

About

Animal Crossing: New Horizons API wrapper

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages