space_trader

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

README

Cover Image

🚀 Space Trader API 🛠️ [WIP]

Space Traders is an API game where players explore the stars in order to exploit for it's riches.

More info: here.

This project provides a golang wrapper for the api.

🛠️ Work In Progress

Notice this package is in it's alpha stage and is subject to api changes.

💾 Models

Most of the objects have been modelled and can be accessed through the model package.

The methods in this wrapper return the relevant model.

📔 Examples

💻 Contribution

This project is open to contributions.

To contribute follow the standard go style as much as possible and try to achieve an 80% code coverage or higher, with unit tests for the code submitted / changed.

Contributors will be acknowledge in this readme.

❤️ Contributors

HOWZ1T - Project Author & Maintainer

⚖️ License

This project is licensed under GNU General Public License v3.0.

📝 TODO

  • More Examples
  • Continuous Integration
  • Unit Tests (Reach at least 80% coverage)
  • API Documentation
  • Code Documentation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpaceTrader

type SpaceTrader struct {
	// contains filtered or unexported fields
}

func New

func New(token string, username string) SpaceTrader

func (*SpaceTrader) Account

func (st *SpaceTrader) Account() (models.Account, error)

func (*SpaceTrader) ApiStatus

func (st *SpaceTrader) ApiStatus() (string, error)

func (*SpaceTrader) AvailableLoans

func (st *SpaceTrader) AvailableLoans() ([]models.Loan, error)

func (*SpaceTrader) AvailableShips

func (st *SpaceTrader) AvailableShips(class string) ([]models.Ship, error)

func (*SpaceTrader) BuyGood

func (st *SpaceTrader) BuyGood(shipID string, good string, quantity int) (models.ShipOrder, error)

func (*SpaceTrader) BuyShip

func (st *SpaceTrader) BuyShip(location string, shipType string) (models.Account, error)

func (*SpaceTrader) CreateFlightPlan

func (st *SpaceTrader) CreateFlightPlan(shipID string, destination string) (models.FlightPlan, error)

func (*SpaceTrader) GetFlightPlan

func (st *SpaceTrader) GetFlightPlan(flightPlanID string) (models.FlightPlan, error)

func (*SpaceTrader) PayLoan

func (st *SpaceTrader) PayLoan(loanID string) (models.Account, error)

func (*SpaceTrader) RegisterUser

func (st *SpaceTrader) RegisterUser(username string) (string, error)

func (*SpaceTrader) SearchSystem

func (st *SpaceTrader) SearchSystem(system string, type_ string) ([]models.Location, error)

func (*SpaceTrader) SellGood

func (st *SpaceTrader) SellGood(shipID string, good string, quantity int) (models.ShipOrder, error)

func (*SpaceTrader) TakeLoan

func (st *SpaceTrader) TakeLoan(loanType string) (models.Account, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL