mojang

package
v1.0.0-SNAPSHOT...-0150756 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

* Copyright 2018 Johannes Donath <johannesd@torchmind.com> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <johannesd@torchmind.com> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <johannesd@torchmind.com> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <johannesd@torchmind.com> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MojangAPI

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

func New

func New() *MojangAPI

Creates a new Mojang API client

func (*MojangAPI) BulkGetId

func (a *MojangAPI) BulkGetId(names []string) ([]*entity.ProfileId, error)

resolves a list of multiple names at the current time only 100 names may be resolved at a time

func (*MojangAPI) GetBlacklist

func (a *MojangAPI) GetBlacklist() (*entity.Blacklist, error)

retrieves the server blacklist

func (*MojangAPI) GetHistory

func (a *MojangAPI) GetHistory(id uuid.UUID) (*entity.NameChangeHistory, error)

retrieves the complete name change history for a given profile the initial account name is indicated by the lack of its timestamp (e.g. if set to UNIX epoch)

func (*MojangAPI) GetId

func (a *MojangAPI) GetId(name string, at time.Time) (*entity.ProfileId, error)

retrieves the profile id (and some associated attributes) for a given display name at the specified time

  • if the UNIX epoch (e.g. zero) is passed instead of a real time, the initial account name will be checked (assuming that the account in question is a legacy account or has changed its name at least once)
  • if no profile matches the specified name, nil will be returned instead

func (*MojangAPI) GetProfile

func (a *MojangAPI) GetProfile(id uuid.UUID) (*entity.Profile, error)

retrieves a single profile from the server

func (*MojangAPI) Login

func (a *MojangAPI) Login(displayName string, serverId string, ip string) (*entity.Profile, error)

performs the server-side phase of the online handshake

Jump to

Keyboard shortcuts

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