Skip to content

Latest commit

 

History

History
829 lines (535 loc) · 20.6 KB

File metadata and controls

829 lines (535 loc) · 20.6 KB

\TTXAPI

All URIs are relative to http://localhost

Method HTTP request Description
CreateCreator Post /creators
DiscordCallback Get /sessions/discord/callback
Gamba Put /players/me/lootboxes/{lootBoxId}/open
GetCreator Get /creators/{slug}
GetCreatorTransactions Get /creators/{creatorSlug}/transactions
GetCreators Get /creators
GetPlayer Get /players/{username}
GetPlayers Get /players
GetSelf Get /players/me
LinkDiscordTwitch Post /sessions/discord/link
PlaceOrder Post /transactions
TwitchCallback Get /sessions/twitch/callback

CreateCreator

CreatorDto CreateCreator(ctx).Username(username).Ticker(ticker).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	username := "username_example" // string |  (optional)
	ticker := "ticker_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.CreateCreator(context.Background()).Username(username).Ticker(ticker).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.CreateCreator``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateCreator`: CreatorDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.CreateCreator`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateCreatorRequest struct via the builder pattern

Name Type Description Notes
username string
ticker string

Return type

CreatorDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DiscordCallback

DiscordTokenDto DiscordCallback(ctx).Code(code).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	code := "code_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.DiscordCallback(context.Background()).Code(code).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.DiscordCallback``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DiscordCallback`: DiscordTokenDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.DiscordCallback`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDiscordCallbackRequest struct via the builder pattern

Name Type Description Notes
code string

Return type

DiscordTokenDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Gamba

LootBoxResultDto Gamba(ctx, lootBoxId).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	lootBoxId := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.Gamba(context.Background(), lootBoxId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.Gamba``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `Gamba`: LootBoxResultDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.Gamba`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
lootBoxId int32

Other Parameters

Other parameters are passed through a pointer to a apiGambaRequest struct via the builder pattern

Name Type Description Notes

Return type

LootBoxResultDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetCreator

CreatorDto GetCreator(ctx, slug).Step(step).After(after).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
    "time"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	slug := "slug_example" // string | 
	step := openapiclient.TimeStep("Minute") // TimeStep |  (optional)
	after := time.Now() // time.Time |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.GetCreator(context.Background(), slug).Step(step).After(after).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.GetCreator``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetCreator`: CreatorDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.GetCreator`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
slug string

Other Parameters

Other parameters are passed through a pointer to a apiGetCreatorRequest struct via the builder pattern

Name Type Description Notes

step | TimeStep | | after | time.Time | |

Return type

CreatorDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetCreatorTransactions

[]PlayerTransactionDto GetCreatorTransactions(ctx, creatorSlug).Slug(slug).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	creatorSlug := "creatorSlug_example" // string | 
	slug := "slug_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.GetCreatorTransactions(context.Background(), creatorSlug).Slug(slug).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.GetCreatorTransactions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetCreatorTransactions`: []PlayerTransactionDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.GetCreatorTransactions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
creatorSlug string

Other Parameters

Other parameters are passed through a pointer to a apiGetCreatorTransactionsRequest struct via the builder pattern

Name Type Description Notes

slug | string | |

Return type

[]PlayerTransactionDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetCreators

CreatorPartialDtoPaginationDto GetCreators(ctx).Page(page).Limit(limit).Search(search).OrderBy(orderBy).OrderDir(orderDir).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	page := int32(56) // int32 |  (optional) (default to 1)
	limit := int32(56) // int32 |  (optional) (default to 20)
	search := "search_example" // string |  (optional)
	orderBy := openapiclient.CreatorOrderBy("Name") // CreatorOrderBy |  (optional)
	orderDir := openapiclient.OrderDirection("Ascending") // OrderDirection |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.GetCreators(context.Background()).Page(page).Limit(limit).Search(search).OrderBy(orderBy).OrderDir(orderDir).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.GetCreators``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetCreators`: CreatorPartialDtoPaginationDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.GetCreators`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetCreatorsRequest struct via the builder pattern

Name Type Description Notes
page int32 [default to 1]
limit int32 [default to 20]
search string
orderBy CreatorOrderBy
orderDir OrderDirection

Return type

CreatorPartialDtoPaginationDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPlayer

PlayerDto GetPlayer(ctx, username).Step(step).After(after).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
    "time"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	username := "username_example" // string | 
	step := openapiclient.TimeStep("Minute") // TimeStep |  (optional)
	after := time.Now() // time.Time |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.GetPlayer(context.Background(), username).Step(step).After(after).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.GetPlayer``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetPlayer`: PlayerDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.GetPlayer`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiGetPlayerRequest struct via the builder pattern

Name Type Description Notes

step | TimeStep | | after | time.Time | |

Return type

PlayerDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPlayers

PlayerDtoPaginationDto GetPlayers(ctx).Page(page).Limit(limit).Search(search).OrderBy(orderBy).OrderDir(orderDir).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	page := int32(56) // int32 |  (optional) (default to 1)
	limit := int32(56) // int32 |  (optional) (default to 20)
	search := "search_example" // string |  (optional)
	orderBy := openapiclient.PlayerOrderBy("Name") // PlayerOrderBy |  (optional)
	orderDir := openapiclient.OrderDirection("Ascending") // OrderDirection |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.GetPlayers(context.Background()).Page(page).Limit(limit).Search(search).OrderBy(orderBy).OrderDir(orderDir).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.GetPlayers``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetPlayers`: PlayerDtoPaginationDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.GetPlayers`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetPlayersRequest struct via the builder pattern

Name Type Description Notes
page int32 [default to 1]
limit int32 [default to 20]
search string
orderBy PlayerOrderBy
orderDir OrderDirection

Return type

PlayerDtoPaginationDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetSelf

PlayerDto GetSelf(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.GetSelf(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.GetSelf``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetSelf`: PlayerDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.GetSelf`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetSelfRequest struct via the builder pattern

Return type

PlayerDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

LinkDiscordTwitch

TokenDto LinkDiscordTwitch(ctx).LinkDiscordTwitchDto(linkDiscordTwitchDto).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	linkDiscordTwitchDto := *openapiclient.NewLinkDiscordTwitchDto("AccessToken_example", "TwitchId_example") // LinkDiscordTwitchDto |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.LinkDiscordTwitch(context.Background()).LinkDiscordTwitchDto(linkDiscordTwitchDto).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.LinkDiscordTwitch``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `LinkDiscordTwitch`: TokenDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.LinkDiscordTwitch`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiLinkDiscordTwitchRequest struct via the builder pattern

Name Type Description Notes
linkDiscordTwitchDto LinkDiscordTwitchDto

Return type

TokenDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PlaceOrder

CreatorTransactionDto PlaceOrder(ctx).CreateTransactionDto(createTransactionDto).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	createTransactionDto := *openapiclient.NewCreateTransactionDto("Creator_example", openapiclient.TransactionAction("Buy"), int32(123)) // CreateTransactionDto |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.PlaceOrder(context.Background()).CreateTransactionDto(createTransactionDto).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.PlaceOrder``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PlaceOrder`: CreatorTransactionDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.PlaceOrder`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPlaceOrderRequest struct via the builder pattern

Name Type Description Notes
createTransactionDto CreateTransactionDto

Return type

CreatorTransactionDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TwitchCallback

TokenDto TwitchCallback(ctx).Code(code).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ttxdev/gottx"
)

func main() {
	code := "code_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TTXAPI.TwitchCallback(context.Background()).Code(code).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TTXAPI.TwitchCallback``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `TwitchCallback`: TokenDto
	fmt.Fprintf(os.Stdout, "Response from `TTXAPI.TwitchCallback`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiTwitchCallbackRequest struct via the builder pattern

Name Type Description Notes
code string

Return type

TokenDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]