Documentation ¶
Overview ¶
The GPLv3 License (GPLv3)
Copyright (c) 2023 Amaan Qureshi <amaanq12@gmail.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
The GPLv3 License (GPLv3)
Copyright (c) 2023 Amaan Qureshi <amaanq12@gmail.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
The GPLv3 License (GPLv3)
Copyright (c) 2023 Amaan Qureshi <amaanq12@gmail.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Variables
- func CleanUp(assetsFP, apkFP string) error
- func CurlAPKLink(link string) (*html.Node, error)
- func DecompileAPK(apkPath string) error
- func GetCurrentAPKVersion(_print bool) (string, error)
- func GetDownloadURL(url string) (string, error)
- func LoadRetryClient() *retryablehttp.Client
- func UpdateAPK() error
- func WalkAndDecompressAssets(validDirs []string, fpToDecompiledAPK, fpToOutputFiles string) (string, error)
- func WgetAPK(game *GameLink, downloadUrl, version, fp string) (string, error)
- type AggregateRating
- type Author
- type GameLink
- type InLanguage
- type InteractionStatistic
- type IsPartOf
- type MainEntity
- type MainEntityOfPage
- type MetaData
- type Offers
- type PotentialAction
- type Publisher
- type Screenshot
- type VersionData
- type WgetReader
Constants ¶
This section is empty.
Variables ¶
var ( CurrentVersion string Path = flag.String("path", ".", "output directory for /assets") Client = LoadRetryClient() Log = log.New(os.Stdout).WithColor().WithDebug().WithTimestamp() )
var ( ClashofClans = GameLink{URL: "https://clash-of-clans.en.uptodown.com/android/versions/%d", Name: "Clash of Clans", ValidDirectories: []string{"csv", "localization", "logic"}} ClashRoyale = GameLink{URL: "https://clash-royale.en.uptodown.com/android/versions/%d", Name: "Clash Royale"} BrawlStars = GameLink{URL: "https://brawl-stars.en.uptodown.com/android/versions/%d", Name: "Brawl Stars", ValidDirectories: []string{"csv_client", "csv_logic", "localization", "logic"}} ClashMini = GameLink{URL: "https://clash-mini.en.uptodown.com/android/versions/%d", Name: "Clash Mini"} HayDay = GameLink{URL: "https://hay-day.en.uptodown.com/android/versions/%d", Name: "Hay Day", ValidDirectories: []string{"data", "localization"}} ClashQuest = GameLink{URL: "https://clash-quest.en.uptodown.com/android/versions/%d", Name: "Clash Quest"} BoomBeach = GameLink{URL: "https://boom-beach.en.uptodown.com/android/versions/%d", Name: "Boom Beach"} Everdale = GameLink{URL: "https://everdale.en.uptodown.com/android/versions/%d", Name: "Everdale"} HayDayPop = GameLink{URL: "https://hay-day-pop.en.uptodown.com/android/versions/%d", Name: "Hay Day Pop"} RushWars = GameLink{URL: "https://rush-wars.en.uptodown.com/android/versions/%d", Name: "Rush Wars"} AllGameLinks = []GameLink{ ClashofClans, ClashRoyale, BrawlStars, ClashMini, HayDay, ClashQuest, BoomBeach, Everdale, HayDayPop, RushWars, } ErrLastPage = fmt.Errorf("End of the Line!") )
Functions ¶
func DecompileAPK ¶
Executes apktool and removes the apk file
func GetCurrentAPKVersion ¶
Parses the uptodown HTML node for the current game version
func GetDownloadURL ¶
Parses the uptodown HTML node for the download link
func LoadRetryClient ¶
func LoadRetryClient() *retryablehttp.Client
Types ¶
type AggregateRating ¶
type Author ¶
type Author struct { Type string `json:"@type"` Name string `json:"name"` MainEntityOfPage MainEntityOfPage `json:"mainEntityOfPage"` URL string `json:"url"` }
type InLanguage ¶
type InteractionStatistic ¶
type IsPartOf ¶
type IsPartOf struct { Type string `json:"@type"` URL string `json:"url"` Publisher Publisher `json:"publisher"` PotentialAction PotentialAction `json:"potentialAction"` }
type MainEntity ¶
type MainEntity struct { Type string `json:"@type"` Name string `json:"name"` URL string `json:"url"` Description string `json:"description"` Image string `json:"image"` OperatingSystem string `json:"operatingSystem"` SoftwareVersion string `json:"softwareVersion"` // This is the one DatePublished string `json:"datePublished"` InteractionStatistic InteractionStatistic `json:"interactionStatistic"` ApplicationCategory string `json:"applicationCategory"` ApplicationSubCategory string `json:"applicationSubCategory"` Author Author `json:"author"` Offers Offers `json:"offers"` AggregateRating AggregateRating `json:"aggregateRating"` Screenshot []Screenshot `json:"screenshot"` InLanguage []InLanguage `json:"inLanguage"` }
type MainEntityOfPage ¶
type MetaData ¶
type MetaData struct { Context string `json:"@context"` Type string `json:"@type"` URL string `json:"url"` IsPartOf IsPartOf `json:"isPartOf"` MainEntity MainEntity `json:"mainEntity"` }
type PotentialAction ¶
type Screenshot ¶
type VersionData ¶
func GetAllVersions ¶
func GetAllVersions(gamelink string) ([]VersionData, error)
func GetVersions ¶
func GetVersions(gamelink string, page int) ([]VersionData, error)