ripple-api/vendor/gopkg.in/thehowl/go-osuapi.v1
Morgan Bazalgette e5f062ee91
Vendor update
2017-07-25 14:58:07 +02:00
..
approved_status.go vendor! 2017-01-14 18:42:10 +01:00
client.go vendor! 2017-01-14 18:42:10 +01:00
genre.go vendor! 2017-01-14 18:42:10 +01:00
get_beatmaps.go vendor! 2017-01-14 18:42:10 +01:00
get_match.go vendor! 2017-01-14 18:42:10 +01:00
get_replay.go vendor! 2017-01-14 18:42:10 +01:00
get_scores.go vendor! 2017-01-14 18:42:10 +01:00
get_user_best.go vendor! 2017-01-14 18:42:10 +01:00
get_user_recent.go vendor! 2017-01-14 18:42:10 +01:00
get_user.go vendor! 2017-01-14 18:42:10 +01:00
language.go vendor! 2017-01-14 18:42:10 +01:00
LICENSE vendor! 2017-01-14 18:42:10 +01:00
mode.go vendor! 2017-01-14 18:42:10 +01:00
mods.go vendor! 2017-01-14 18:42:10 +01:00
mysql_date.go vendor! 2017-01-14 18:42:10 +01:00
osubool.go Vendor update 2017-07-25 14:58:07 +02:00
rate_limit.go vendor! 2017-01-14 18:42:10 +01:00
README.md vendor! 2017-01-14 18:42:10 +01:00

go-osuapi docs Build Status Go Report Card

go-osuapi is an osu! API library for Golang.

Getting started

Everything is (more or less) well-documented at godoc - the methods that interest you most are probably those under Client. Also, client_test.go contains loads of examples on how you can use the package. If you still want to have an example to simply copypaste and then get straight to coding, well, there you go!

package main

import (
	"fmt"
	"gopkg.in/thehowl/go-osuapi.v1"
)

func main() {
	c := osuapi.NewClient("Your API key https://osu.ppy.sh/p/api")
	beatmaps, err := c.GetBeatmaps(osuapi.GetBeatmapsOpts{
		BeatmapSetID: 332532,
	})
	if err != nil {
		fmt.Printf("An error occurred: %v\n", err)
		return
	}
	for _, beatmap := range beatmaps {
		fmt.Printf("%s - %s [%s] https://osu.ppy.sh/b/%d\n", beatmap.Artist, beatmap.Title, beatmap.DiffName, beatmap.BeatmapID)
	}
}

I want more than that to explore how it works!

I've made whosu for that purpose. Check it out.

Contributing

Contributions are welcome! Here's what you need to know:

  • Always go fmt your code.
  • If you're writing a big and useful feature, make sure to appropriately write tests!