# README
GO-TMIO-SDK
Accelerate your trackmania coding journey with ease.
Overview
The go-tmio-sdk project is a robust open-source toolkit designed to streamline interactions with the Trackmania API. It offers functionalities to retrieve and cache player information efficiently, including player IDs and names. With a focus on error handling and secure environment variable management, the project enhances the overall experience of working with the TMIO API. The go-tmio-sdk project stands out for its capability to simplify data fetching, caching, and retrieval tasks, catering to developers looking to integrate Trackmania API functionalities seamlessly.
Getting Started
System Requirements:
- Internet
Setting it Up
- go get the package:
$ go get github.com/Johnnycyan/go-tmio-sdk
- Import the package in your go file
import ( tmio "github.com/Johnnycyan/go-tmio-sdk" )
- Create a .env file for your project with:
NAME=<your-username>
Usage
Get a Player ID from a Player Name
username := "username" playerID, err := tmio.GetPlayerID(username) if err != nil { log.Println(err) return }
Get a Formatted Player Name from a non-formatted Player Name
username := "username" playerFormatted, err := tmio.GetFormattedName(username) if err != nil { log.Println(err) return }