A Go wrapper for Tatsumaki's external API.
If you have any queries about the API or this wrapper, please visit the api channel in our official support server.
To get an API key, run the following command with Tatsumaki in a server: t!apikey
To use the lib, first create an instance of the Tatsumaki client which will be your interface to interact with the API.
Then, call your desired endpoint methods on the client.
// Create client.
tatsumakiClient := tatsumakigo.New("YOUR API TOKEN")
// Get a user.
user, err := tatsumakiClient.User("User ID")
if err == nil {
// Do stuff with the user response here.
fmt.Println("User's required XP until next level up: %d", user.LevelProgress.RequiredXp)
}
...
// Get a user using a context.
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
user, err = tatsumakiClient.UserWithContext(ctx, "User ID")
...
Copyright ©2019 Tatsu Works.
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.