Socket
Socket
Sign inDemoInstall

github.com/Z-M-Huang/go-burner

Package Overview
Dependencies
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/Z-M-Huang/go-burner

Package burner send sms over burner api Author: Z-M-Huang Repository: https://github.com/Z-M-Huang/go-burner License: MIT Note: Please do not abuse the Burner service!!!


Version published

Readme

Source

go-burner

Unofficial Burner API at https://developer.burnerapp.com/api-documentation.

codecov godoc

Travis CI is failing 100%. Please run go test -v ./... locally to verify.

Usage

Run as a server

  import "github.com/Z-M-Huang/go-burner"

  clientID := "fakeClientID"
  clientSecret := "fakeClientSecret"
  redirectURL := "https://example.com/auth_redirect"
  mux := http.NewServeMux()
  mux.Handle("/login", func(w http.ResponseWriter, r *http.Request){
    http.Redirect(w, r, burner.GetAuthorizeEndpoint(clientID, redirectURL), 301)
  })
  mux.Handle("/auth_redirect", func(w http.ResponseWriter, r *http.Request){
    code := r.URL.Query()["code"]
    client, burners, err := burner.HandleAuthCallback(code, clientID, clientSecret, redirectURL)
    err = client.Send(burners[0].ID, "+11234567890", "sample text", "")
  })

Set access token directly

  import "github.com/Z-M-Huang/go-burner"
  client := &burner.Client{
    AuthToken: "fakeAuthToken",
  }
  burnerID := "fakeBurnerID"
  err := client.Send(burnerID, "+11234567890", "sample text", "")

Send message using Incoming Webhook

  import "github.com/Z-M-Huang/go-burner"
  client := &burner.Client{
    IncomingWebhookURL: "https://api.burnerapp.com/webhooks/burner/fakeID?token=fakeToken",
  }
  err := client.SendIncomingWebhook("+11234567890", "sample text")

FAQs

Last updated on 13 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc