Giter Site home page Giter Site logo

millennium-go's Introduction

Millennium Go

Build Status Maintainability Test Coverage Go Report Card FOSSA Status

Esta biblioteca tem o intuito de facilitar a integração com o ERP Millennium utilizando Go.

Instalação

Para começar a utilizar o Millennium com Go, instale o Go e rode o go get:

go get -u github.com/fabiomatavelli/millennium-go

Isso irá baixar a instalar a biblioteca.

Exemplo

No exemplo abaixo, iremos listar todas as filiais cadastradas no Millennium

package main

import (
	millennium "github.com/fabiomatavelli/millennium-go"
)

type Filial struct {
  Filial int    `json:"filial"`
  Codigo string `json:"cod_filial"`
  Nome   string `json:"nome"`
  CNPJ   string `json:"cnpj"`
}

func main() {
  var filiais []Filial
  client := millennium.Client("http://192.168.1.1:6017", 30)
  
  // Login utilizando a sessão do Millennium
  client.Login("usuario", "senha", millennium.Session)

  total, err := client.Get("millenium.filiais.lista", url.Values{}, &filiais)
  
  if err != nil {
    fmt.Print(err)
  }

  if total > 0 {
    for _, filial := range filiais {
      fmt.Printf("Filial: %s CNPJ: %s", filial.Nome, filial.CNPJ)
    }
  }
}

License

FOSSA Status

millennium-go's People

Contributors

fabiomatavelli avatar fossabot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.