osu-api-client

module
v0.0.0-...-4a082d9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT

README

osu!API client

GitHub code size in bytes GitHub license

Versions

  • v1 [This repo] - Latest version. Stable. Recommended.

Features

  • Simple, expressive, fluent API.
  • Idiomatic built on top of net/http package.
  • Context-aware hierarchical middleware layer supporting all the HTTP life cycle.
  • Built-in multiplexer for easy composition capabilities.
  • Easy to extend via plugins/middleware.
  • Ability to easily intercept and modify HTTP traffic on-the-fly.
  • Easy to test via HTTP mocking (e.g: gentleman-mock).

Requirements

  • Go 1.9+

Examples

See examples directory

package main

import (
	"github.com/osuminase/osu-api-client/pkg"
	"log"
)

func main() {
	// setting up default osu! api key and create client
	cli := pkg.WithAPIKey("123321somesupersecretkey")

	// getting beatmap info by beatmapset_id
	res, err := cli.GetBeatmaps(pkg.GetBeatmapsOpts{
		BeatmapSetID: 332532,
	})
	if err != nil {
		log.Panic(err)
	}

	log.Printf("Beatmap set info: %#v", res)
}

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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