M4cs / gomodio

Mod.io API Wrapper Implemented in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gomodio

A wrapper for mod.io in Golang

See the mod.io Documentation Here

(This is still a work in progress. See below for completion amount)

Installation

go get -u github.com/M4cs/gomodio

Usage

Basic Usage w/ API Key (Read Only Access)

package main

import (
    "fmt"

    "github.com/M4cs/gomodio"
)

func main() {
    // Create a User
    user := gomodio.NewUser("YOUR_API_KEY", "YOUR_EMAIL")

    // Search for games
    games, err := user.GetGames(map[string]string{"q": "Skater XL"})
    if err != nil {
        fmt.Println(err.Error())
    }
    for _, g := range games.Data {
        fmt.Println("Name:", g.Name)
        fmt.Println("Summary:", g.Summary)
    }
    // Grab Game Object
    game, err := user.GetGame(games.Data[0].ID, nil)
    if err != nil {
        fmt.Println(err.Error())
    }
    fmt.Println(game.ID)
}

Completion

Code

  • Authentication (No Third-Party)
  • Games
  • Mods
  • Files
  • Subscribe
  • Comments
  • Media
  • Events
  • Tags
  • Ratings
  • Stats
  • Metadata
  • Dependencies
  • Teams
  • General
  • Reports
  • Batch
  • Me

Documentation

  • Basic exportation documentation
  • Pretty Godocs
  • [/] Examples

About

Mod.io API Wrapper Implemented in Golang

License:GNU General Public License v3.0


Languages

Language:Go 100.0%