Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultUrlGetModFormat = "https://api.nexusmods.com/v1/games/%v/mods/%v.json"
Variables ¶
View Source
var ErrorNoApiKey = errors.New("no nexus api key provided")
View Source
var ErrorNoDriver = errors.New("no nexus http driver provided")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options ...ClientOption) (*Client, error)
type ClientOption ¶
type ClientOption func(*ClientOptions)
func WithApiKey ¶
func WithApiKey(key string) ClientOption
func WithHTTPDriver ¶
func WithHTTPDriver(driver HttpClient) ClientOption
func WithUrlGetModFormat ¶
func WithUrlGetModFormat(format string) ClientOption
Format should contains 2 placeholder in this sequence:
- Game code
- Mod ID
Defaults to: [DefaultUrlGetModFormat]
type ClientOptions ¶
type ClientOptions struct {
Driver HttpClient
ApiKey string
UrlGetModFormat string
}
type HttpClient ¶
type SchemaMod ¶
type SchemaMod struct {
Uid int `json:"uid"`
ModId int `json:"mod_id"`
GameId int `json:"game_id"`
DomainName string `json:"domain_name"`
Name string `json:"name"`
Summary string `json:"summary"`
Description string `json:"description"`
Version string `json:"version"`
CategoryId int `json:"category_id"`
Status string `json:"status"`
MetadataPageUrl string
MetadataCategoryIcon string
Author string `json:"author"`
UploadedBy string `json:"uploaded_by"`
UploadedUsersProfileUrl string `json:"uploaded_users_profile_url"`
PictureUrl string `json:"picture_url"`
AllowRating bool `json:"allow_rating"`
ContainsAdultContent bool `json:"contains_adult_content"`
Available bool `json:"available"`
EndorsementCount int `json:"endorsement_count"`
ModDownloads int `json:"mod_downloads"`
ModUniqueDownloads int `json:"mod_unique_downloads"`
CreatedTimestamp int `json:"created_timestamp"`
UpdatedTimestamp int `json:"updated_timestamp"`
User *SchemaModUser `json:"user"`
Endorsement *SchemaModEndorsement `json:"endorsement"`
}
type SchemaModEndorsement ¶
type SchemaModUser ¶
Click to show internal directories.
Click to hide internal directories.