go

command
v0.0.0-...-88a383e Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

ContaAzul authorization example - Golang

Getting started

In order to run this example, you will need to install Go. On the official Go website you can learn how to install it. You'll need to install the Dep as well.

With Go and Dep installed, clone this repository, navigate to the go directory and run :

  $ go get -v github.com/golang/dep/... && dep ensure

This command will download all the dependencies required by this example.

Configuring

Before running the example you must change your credentials in the main.go file. The variables that must be filled with your information are :

  • client_id
  • client_secret
  • redirect_uri

To get this information you'll need to have an API Credential. For more information about how to get an API Credential go to http://developers.contaazul.com

Running the example

To run the example just execute this command in the go directory :

$ go run main.go

The endpoints available are :

  • GET /login - redirects to the ContaAzul authorization page
  • GET /callback - the callback of the login
  • GET /refresh_token - refresh the token
  • GET /list_products - list all products with pagination
  • GET /delete_product - delete a product by id

This example doesn't have frontend example yet.

Dependencies

This example uses some dependencies to assist some steps :

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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