go-devto

command module
v0.0.0-...-dcf2eda Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 2 Imported by: 0

README

go-devto

Test License

This is a Go wrapper for working with DEV API.

The aim is to be able to do all tasks on this DEV API endpoint simply by getting an API key.

Install

go get github.com/TaigaMikami/go-devto/devto

Usage

  1. Visit https://dev.to/settings/account and Get API key.

  2. eg.) Retrieve articles and Output an article's title.

package main

import (
	"fmt"
	"github.com/TaigaMikami/go-devto/devto"
)

func main() {
	opt := &devto.RetrieveArticlesOption{
		Page: 1,
		PerPage: 10,
	}
	client := devto.NewClient("API Key")
	res, err := client.RetrieveArticles(opt)
	if err != nil {
		panic(err)
	}

	fmt.Println(res[0].Title)
}

API Examples

Examples of the API can be found in the examples directory.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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