Skip to content

Go client library for The First Descendant API (NEXON Open API). Integrate seamlessly with the game's services using a simple and intuitive Go interface.

License

Notifications You must be signed in to change notification settings

DevZoneLabs/go-tfd-client

Repository files navigation

The First Descendant Go Client

Go Version GoDoc License

Overview

go-tfd-client is a Go client library for interacting with "The First Descendant" game API. This client wraps all the API endpoints listed in the NEXON Open API documentation, providing an easy-to-use interface for Go developers to integrate with the game's services.

Features

  • Full coverage of all API endpoints.
  • Easy-to-use and idiomatic Go interface.
  • Support for authentication and authorization.

Installation

To install the library, use the following command:

go get github.com/DevZoneLabs/go-tfd-client/v2

Usage

Here is a basic example of how to use the client:

package main

import (
    "fmt"
    "log"
    "net/http"

    tfd "github.com/DevZoneLabs/go-tfd-client"
)

func main() {
    // Initialize the client without an API key
    client := tfd.NewClient()

    // Set your API key using SetAccessKey
    client.SetAccessKey("YOUR_API_KEY")

    // Optionally, you can set a custom HTTP client
    customHTTPClient := &http.Client{}
    client.CustomHTTPClient(customHTTPClient)

    // Example: Get AccountIdentifier
    accIdentifier, err := client.GetAccountIdentifier("PLAYER_ID")
    if err != nil {
        log.Fatalf("Error fetching account identifier: %v", err)
    }

    fmt.Printf("Account Identifier: %s\n", accIdentifier.OUID)
}

Documentation

Full documentation is available on GoDocs v2

API Coverage

The client covers the following API endpoints:

Account

  • GetAccountIdentifier(userName string) (*models.AccountIdentifier, error)

  • GetUserInfo(ouid string) (*UserBasic, error)

  • GetUserDescendant(ouid string) (*models.UserDescendant, error)

  • GetUserWeapons(ouid string, language LanguageCode) (*models.UserWeapon, error)

  • GetUserReactor(ouid string, language LanguageCode) (*models.UserReactor, error)

  • GetExternalComponent(ouid string, language LanguageCode) (*models.UserExternalComponent, error)

Metadata

  • GetDescendantsMetadata(language LanguageCode) ([]models.Descendant, error)

  • GetWeaponsMetadata(language LanguageCode) ([]models.Weapon, error)

  • GetModulesMetadata(language LanguageCode) ([]models.Module, error)

  • GetReactorsMetadata(language LanguageCode) ([]models.Reactor, error)

  • GetExternalComponentsMetadata(language LanguageCode) ([]models.ExternalComponent, error)

  • GetRewardsMetadata(language LanguageCode) ([]models.Reward, error)

  • GetStatsMetadata(language LanguageCode) ([]models.StatMeta, error)

  • GetVoidBattlesMetadata(language LanguageCode) (*models.VoidBattleResponse, error)

  • GetVoidBattlesMetadata(language LanguageCode) (*models.VoidBattleResponse, error)

  • GetTitlesMetadata(language LanguageCode) (*models.TitleResponse, error)

Module Recommendation

  • GetModuleRecommendation(opts ModuleRecommendationOpts) (*models.ModuleRecommendationResponse, error)

About

Go client library for The First Descendant API (NEXON Open API). Integrate seamlessly with the game's services using a simple and intuitive Go interface.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages