relynolli-server/CDEK
Ernest Litvinenko 3eea5e0579 add cdek 2024-05-03 19:02:41 +10:00
..
v2 add cdek 2024-05-03 19:02:41 +10:00
.gitignore add cdek 2024-05-03 19:02:41 +10:00
CONTRIBUTING.md add cdek 2024-05-03 19:02:41 +10:00
LICENSE add cdek 2024-05-03 19:02:41 +10:00
README.md add cdek 2024-05-03 19:02:41 +10:00
ROADMAP.md add cdek 2024-05-03 19:02:41 +10:00

README.md

GO SDK for CDEK API v2

GoDoc reference Build Status Coverage Status Go Report Card GitHub release CII Best Practices

The Go language implementation of SDK for integration with CDEK


Installation

To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run:

$ go get github.com/vseinstrumentiru/cdek

With Go module support (Go 1.11+), simply import "github.com/vseinstrumentiru/cdek" in your source code and go [build|run|test] will automatically download the necessary dependencies (Go modules ref).

Documentation

  • See godoc for package and API descriptions and examples.

Example

You cat get test clientAccount and clientSecurePassword from the official CDEK documentation

import "github.com/vseinstrumentiru/cdek"
...

client := cdek.NewClient("https://integration.edu.cdek.ru/").
    SetAuth(clientAccount, clientSecurePassword)

cities, err := client.GetCities(map[cdek.CityFilter]string{
    cdek.CityFilterPage: "1",
})