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 ¶
- type MojangAPI
- func (a *MojangAPI) BulkGetId(names []string) ([]*entity.ProfileId, error)
- func (a *MojangAPI) GetBlacklist() (*entity.Blacklist, error)
- func (a *MojangAPI) GetHistory(id uuid.UUID) (*entity.NameChangeHistory, error)
- func (a *MojangAPI) GetId(name string, at time.Time) (*entity.ProfileId, error)
- func (a *MojangAPI) GetProfile(id uuid.UUID) (*entity.Profile, error)
- func (a *MojangAPI) Login(displayName string, serverId string, ip string) (*entity.Profile, error)
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 (*MojangAPI) BulkGetId ¶
resolves a list of multiple names at the current time only 100 names may be resolved at a time
func (*MojangAPI) GetBlacklist ¶
retrieves the server blacklist
func (*MojangAPI) GetHistory ¶
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 ¶
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 ¶
retrieves a single profile from the server