Slide 1

Slide 1 text

Write image proxy server for LINE Bot in Go LINE Technical Evangelist Evan Lin

Slide 2

Slide 2 text

(YDQ/LQ /,1(7HFKQLFDO(YDQJHOLVW • 'HYHORSHU 5HODWLRQV • 7HFKQLFDO EUDQGLQJ • 7HFKQLFDO +LULQJ • /,1( 'HYHORSHU 0HHWXS7HFK3XOVH 2UJDQL]HU

Slide 3

Slide 3 text

NEW API Update

Slide 4

Slide 4 text

https://developers.line.biz/en/news/#line-login-new-parameters-and-properties-added-2019-06-26

Slide 5

Slide 5 text

https://login-tester-evan.herokuapp.com/

Slide 6

Slide 6 text

https://www.evanlin.com/til-line-login/ Tutorial article (Chinese) Open Source Packages: • https://github.com/kkdai/line-social-sdk-go • https://github.com/kkdai/line-login-go

Slide 7

Slide 7 text

Why we need a Image-Proxy Server

Slide 8

Slide 8 text

A story about pet adoption http://www.evanlin.com/petsneedme-helping-adoption-pet/

Slide 9

Slide 9 text

Pet Adoption : Open Data • http://data.coa.gov.tw/Service/OpenData/TransService.aspx?UnitId=QcbUEzN6E6DL&$top=50&$skip=0

Slide 10

Slide 10 text

Pet Adoption : Open Data • http://data.coa.gov.tw/Service/OpenData/TransService.aspx?UnitId=QcbUEzN6E6DL&$top=50&$skip=0

Slide 11

Slide 11 text

Our problem

Slide 12

Slide 12 text

Let’s use Heroku as our Image Proxy Server • Default support HTTPS • No persistent storage • Will shutdown 6 hours per day (in free-tier, no prediction)

Slide 13

Slide 13 text

Solution: Image Proxy Server

Slide 14

Slide 14 text

Repo and how to use it https://github.com/kkdai/img-cache-server

Slide 15

Slide 15 text

Repo and how to use it (Cont.)

Slide 16

Slide 16 text

Demo