go-digits

module
v0.0.0-...-9878657 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2017 License: MIT

README

go-digits Build Status GoDoc

go-digits is a Go client library for the Digits API. Check the usage section or the examples to learn how to access the Digits API.

Features
  • AccountService for getting Digits accounts
  • Get verified user phone numbers and email addresses
  • ContactService for finding matching contacts ("friends")
  • Digits API Client accepts any OAuth1 http.Client

Install

go get github.com/dghubble/go-digits/digits

Docs

Read GoDoc

Usage

The digits package provides a Client for accessing the Digits API. Here is an example request for a Digit user's Account.

import (
    "github.com/dghubble/go-digits/digits"
    "github.com/dghubble/oauth1"
)

config := oauth1.NewConfig("consumerKey", "consumerSecret")
token := oauth1.NewToken("accessToken", "accessSecret")
// OAuth1 http.Client will automatically authorize Requests
httpClient := config.Client(oauth1.NoContext, token)

// Digits client
client := digits.NewClient(httpClient)
// get current user's Digits Account
account, resp, err := client.Accounts.Account()
Authentication

The API client accepts any http.Client capable of signing OAuth1 requests to handle authorization. See the OAuth1 package dghubble/oauth1 for details and examples.

To implement Login with Digits for web or mobile, see the gologin package and examples.

Contributing

See the Contributing Guide.

License

MIT License

Directories

Path Synopsis
Package digits provides a Client for the Digits API.
Package digits provides a Client for the Digits API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL