Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nathan-osman/go-seapi

Stack Exchange API client for Go
https://github.com/nathan-osman/go-seapi

api golang stack-exchange

Last synced: 11 days ago
JSON representation

Stack Exchange API client for Go

Awesome Lists containing this project

README

        

## go-seapi

[![GoDoc](https://godoc.org/github.com/nathan-osman/go-seapi?status.svg)](https://godoc.org/github.com/nathan-osman/go-seapi)
[![MIT License](http://img.shields.io/badge/license-MIT-9370d8.svg?style=flat)](http://opensource.org/licenses/MIT)

This package provides a simple way to access the Stack Exchange API.

### Example

This example fetches a list of recent questions on Stack Overflow and displays their titles:

package main

import (
"log"
"fmt"

"github.com/nathan-osman/go-seapi"
)

func main() {
v, err := seapi.NewRequest("/questions").Site("stackoverflow").Do()
if err != nil {
log.Fatal(err)
}
for _, i := range v.List("items") {
fmt.Println(i.String("title"))
}
}