Git Product home page Git Product logo

lineatgo's Introduction

GoDoc GoWalker MIT License

lineatgo

This is an unofficial LINE@ SDK that was implemented in pure go

This project is no longer maintained

This will be not maintained because of my motivation. If you send me some pull request, perhaps it affect my motivation.

Particular Requirement

  • ChromeDriver

installation

package

go get github.com/s3pt3mb3r/lineatgo

ChromeDriver

for homebrew user

brew install chromedriver

for windows user Download link

Usage

package main

import (
    "github.com/s3pt3mb3r/lineatgo"
    "log"
    "fmt"
    "os"
)

func main()  {
    api := lineatgo.NewApi("MAIL_ADDRESS", "PASSWORD")
    bot, err := api.NewBot("@LINEID")
    if err != nil {
        log.Println(err)
    }

    //post
    p := bot.NewPost()
    p.Add("text", "This", " is", " a")
	p.Add("text", "test")
	p.Add("image", "/Path/To/photo.jpg", "/Path/To/photo2.jpg", "Path/To/video.mp4")
    p.Post()
    
    //you can get a auth URL
    url := bot.GetAuthURL(lineatgo.Administrator)
    //else: lineatgo.Operator, lineatgo.LimitedOperator, lineatgo.Messenger
    fmt.Println(url)

    //You can get your QR code
    qr := bot.GetQRCode()

    file, err := os.OpenFile("test.png", os.O_RDWR|os.O_CREATE, 0666)
    if err != nil {
        log.Fatal(err)
    }
    defer file.Close()
    file.Write(qr)
}

What is "@LINEID"?

lineId

Todo

  • Enable to select authority type in getAuth function
  • Enable to Delete paymaster user's clearance
  • Enable to Post some text on time line
  • Enable to Post image or video on time line
  • Fix DeletePostAll function

At last

Probably, being overlook some factors, I can't code Login() function without web driver (I'm working at dev branch. See login2 function)

If it's possible, please make Login() function more better and send pull request:)

lineatgo's People

Contributors

4aaa avatar pseuxide avatar

Stargazers

 avatar Dosugamea avatar Leo avatar kPherox avatar

Watchers

James Cloos avatar

Forkers

winbotscript

lineatgo's Issues

chromedriver.exe

Hi, i am beginner in golang, i try your package and follow intrucstions in readme, i have done create file main.go, and go build this, but when i execute main.exe, i get this error 2018/01/29 22:20:48 Failed to start driver:failed to start service: failed to run command: exec: "chromedriver.exe": executable file not found in %PATH%, i have done download chrome driver, but i can understand with meaning %PATH% where this is, sorry i am noob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.