workshop

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Unlicense Imports: 15 Imported by: 0

Documentation

Overview

This package is mostly a rewrite of https://github.com/SegoCode/swd/blob/main/swd.go which was provided via GitHub under The Unlicence

Index

Constants

View Source
const ENDPOINT string = "https://node05.steamworkshopdownloader.io/prod//api/"

Variables

This section is empty.

Functions

func CheckAvailable

func CheckAvailable(resource any) (string, []error)

Checks if a resource is available.

Param `resource` is an int for its Workshop ID or a string for its Workshop URL.

func DownloadResource

func DownloadResource(id int, output io.Writer) error

Writes Workshop resource by ID to given Writer.

func ExtractResource

func ExtractResource(r *resource.Resource, dir, game string, verbose bool) (string, error)

Extracts things that match "dir/id - (downloaded title).zip" where dir is a given directory and id is the given Workshop ID.

Deletes the archive if successful.

func IsCollection

func IsCollection(resrc any) (bool, error)

Returns true if the given page is a URL.

At the top of a Workshop page theres "breadcrumbs" which look like "Game > Workshop > Collections > User's Workshop". This function checks if "Collection" is in those breadcrumbs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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