Skip to content

ta1m1kam/go-devto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Go wrapper for the DEV Web API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages