go-topcoder

module
v0.0.0-...-03e1cd2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2016 License: MIT

README

go-topcoder

go-topcoder is a Go client library for accessing the Topcoder API.

license Build Status Test Coverage GoDoc

go-topcoder requires Go version 1.6.2 or greater.

Getting Started

Usage
As a library:
import "github.com/maratonago/go-topcoder/topcoder"
Sample App
import (
  "encoding/json"
  "fmt"

  "github.com/maratonago/go-topcoder/topcoder"
)

func main() {
  profile, _, _ := topcoder.UserProfile.PublicProfile("paulocezar")

  sProfile, err := json.MarshalIndent(profile, "", "  ")
  if err != nil {
    panic(err)
  }

  fmt.Println(string(sProfile))
}

Above code would produce an output similar to:

{
  "handle": "paulocezar",
  "country": "Brazil",
  "memberSince": "2009-10-08T18:26:00.000-04:00",
  "quote": "",
  "photoLink": "https://topcoder-prod-media.s3.amazonaws.com/member/profile/paulocezar-1447891532103.png",
  "copilot": false,
  "overallEarning": 250,
  "ratingSummary": [
    {
      "name": "Algorithm",
      "rating": 1448,
      "colorStyle": "color: #6666FF"
    }
  ],
  "Achievements": [
    {
      "date": "2016-03-15T00:00:00.000-04:00",
      "description": "First Marathon Competition"
    },
    {
      "date": "2013-09-17T00:00:00.000-04:00",
      "description": "One Hundred Rated Algorithm Competitions"
    },
    {
      "date": "2013-03-03T00:00:00.000-05:00",
      "description": "Solved Hard Div1 Problem in SRM"
    }
  ]
}

LICENSE

Released under the MIT License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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