Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.32 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.32 KB

speakerdeck

🚢 Fetch info and Download Slide from Speaker Deck for Go.

Unofficial and Implemented by dirty scraping...

Install

$ go get github.com/moqada/speakerdeck

Usage

import (
	"fmt"
	"io/ioutil"

	"github.com/moqada/speakerdeck"
)

// Fetch Slide
slide, _ := speakerdeck.GetSlide("https://speakerdeck.com/achiku/pycon-jp-2014-python-plus-hive-on-aws-emrdepin-zhe-falseroguji-ji")
fmt.Println(slide.Title, slide.User.username, slide.Category.Name)
// PyCon JP 2014 Python + Hive on AWS EMRで貧者のログ集計 achiku Technology

// Download pdf file as byte[]
pdf, _ := slide.DownloadPDF()

// Save pdf file to current directory
ioutil.WriteFile("./" + slide.Slug + ".pdf", pdf, 0644)

The documentation is on GoDoc

CLI