Skip to content
This repository has been archived by the owner on May 13, 2018. It is now read-only.
/ go-digits Public archive

DEPRECATED, Google acquired Digits from Twitter and shut it down Sep. 30th 2017

License

Notifications You must be signed in to change notification settings

dghubble/go-digits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

DEPRECATED, Google acquired Digits from Twitter and shut it down Sep. 30th 2017

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published