Skip to content

kayex/stalcraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stalcraft: X API Client

Go client for the Stalcraft: X API.

Installation

go get -u github.com/kayex/stalcraft

Usage

You need to create an application to access the API. Authentication is not handled by this package.

The official demo API can be used to trial basic functionality. You can access it by passing either of stalcraft.DemoAppAccessToken or stalcraft.DemoUserAccessToken along with stalcraft.WithDomain(stalcraft.DemoDomain) to the client constructor.

Basic example

package main

import (
	"context"
	"fmt"
	"log"
	"github.com/kayex/stalcraft"
)

func main() {
	client, err := stalcraft.NewClient(stalcraft.RegionEU, "your-access-token")
	if err != nil {
		log.Fatal(err)
	}
	
	emission, err := client.EmissionStatus(context.Background())
	if err != nil {
		log.Fatal(err)
	}
    
 	fmt.Printf("Current emission start time: %v\n", emission.CurrentStart)
}

Endpoints

All available endpoints are found in endpoints.go. Their names match the names in the API reference as closely as possible.

License

MIT

About

Go client for the STALCRAFT: X API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages