Fefefo / coc-wrapper

A scraping wrapper for Gophers which provides a layer of abstraction for the Clash of clans API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Golang bindings for the Clash of Clans API

A scraping wrapper for Gophers which provides a layer of abstraction for the Clash of clans API

Installation

go get github.com/Fefefo/coc-wrapper

Project using coc-wrapper

  • fefegobot Multifunctional telegram bot written in GO

Structs

// This is the array of clans
type CocClans struct {
	Clan []CocClan
}

// This is the structure of a clan
type CocClan struct {
	Tag              string
	Name             string
	Type             string
	Level            int
	RequiredTrophies int
	WarWins          int
	WarWinStreak     int
	Members          int
	Location         cocLocation
	Pic              cocBadges
	WarLeague        cocWarLeague
	Label            []cocLabel
}

// This is the structure of a player
type CocPlayer struct {
	Tag                string
	Name               string
	THLevel            int
	Level              int
	Trophies           int
	TopTrophies        int
	WarStars           int
	BHLevel            int
	VersusTrophies     int
	BestVersusTrophies int
	Clan               cocPlayerClan
}

// The struct for require clans
type ReqClans struct {
	Name      string
	MinLevel  int
	MaxLevel  int
	Limit     int
	MinPoints int
}

About

A scraping wrapper for Gophers which provides a layer of abstraction for the Clash of clans API


Languages

Language:Go 100.0%