Socket
Socket
Sign inDemoInstall

github.com/boatilus/fox

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/boatilus/fox

Package fox implements a simple client for the Twilio programmatic fax API. It implements all the functions associated with the "Faxes" endpoint, but to keep the library tight, does not facilitate, for example, E.164 phone number parsing and validation, or handling Twilio status callbacks. To get started, construct a new Client with your Twilio account SID and auth token: Optionally, you can also pass a pointer to a SendOptions object to NewClient to specify custom send options (to, for example, tell Twilio *not* to store fax media): The Get, List and Send methods on the returned Client are used to make the API calls as described by Twilio's API reference.


Version published

Readme

Source

fox

Build Status Go Report Card GoDoc

A simple, dependency-free Go client for the Twilio programmatic fax API.

fox seeks to implement all the functions associated with Twilio's "Faxes" endpoint, but to keep the library tight, does not facilitate, for example, E.164 phone number parsing and validation, or handling Twilio status callbacks.

Getting started

To get started, construct a new Client with your Twilio account SID and auth token:

c := fox.NewClient("YOUR_TWILIO_ACCOUNT_SID", "YOUR_TWILIO_AUTH_TOKEN")

Optionally, you can also pass a pointer to a SendOptions object to NewClient to specify custom send options (to, for example, tell Twilio not to store fax media):

opts := SendOpts{StoreMedia: false}
c := fox.NewClient("YOUR_TWILIO_ACCOUNT_SID", "YOUR_TWILIO_AUTH_TOKEN", &opts)

The Cancel, Delete, Get, List and Send methods on the returned Client are used to make the API calls as described by Twilio's API reference. For example, to retrieve a fax's data by its SID:

res, _ := c.Get("FXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")

Implementation status

  • ✅ Get a fax instance by its SID
  • ✅ List all faxes instances in an account
  • ✅ Send a fax
  • ✅ Cancel (update) a fax by its SID
  • ✅ Delete a fax instance by its SID
  • ❌ Get a fax's media resource by its SID
  • ❌ List all fax media resources in an account

Running tests

First, grab the testify package:

go get -u github.com/stretchr/testify

Then, run the tests (the -v flag specifies verbose output):

go test -v

FAQs

Last updated on 25 May 2018

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