Skip to content

Commit

Permalink
Update README examples with new major version, too... (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
epels authored Jun 25, 2021
1 parent 6ca8749 commit cb04299
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MessageBird's REST API for Go
=============================
This repository contains the open source Go client for MessageBird's REST API. Documentation can be found at: https://developers.messagebird.com.

[![Build Status](https://travis-ci.org/messagebird/go-rest-api.svg?branch=master)](https://travis-ci.org/messagebird/go-rest-api) [![PkgGoDev](https://pkg.go.dev/badge/github.com/messagebird/go-rest-api/v6)](https://pkg.go.dev/github.com/messagebird/go-rest-api/v6)
[![Build Status](https://travis-ci.org/messagebird/go-rest-api.svg?branch=master)](https://travis-ci.org/messagebird/go-rest-api) [![PkgGoDev](https://pkg.go.dev/badge/github.com/messagebird/go-rest-api/v7)](https://pkg.go.dev/github.com/messagebird/go-rest-api/v7)

Requirements
------------
Expand All @@ -15,15 +15,15 @@ Installation
The easiest way to use the MessageBird API in your Go project is to install it using *go get*:

```
$ go get github.com/messagebird/go-rest-api/v6
$ go get github.com/messagebird/go-rest-api/v7
```

Examples
--------
Here is a quick example on how to get started. Assuming the **go get** installation worked, you can import the messagebird package like this:

```go
import "github.com/messagebird/go-rest-api/v6"
import "github.com/messagebird/go-rest-api/v7"
```

Then, create an instance of **messagebird.Client**. It can be used to access the MessageBird APIs.
Expand Down Expand Up @@ -69,8 +69,8 @@ For this reason, errors returned by the `voice` package are of type `voice.Error
An example of "simple" error handling is shown in the example above. Let's look how we can gain more in-depth insight in what exactly went wrong:

```go
import "github.com/messagebird/go-rest-api/v6"
import "github.com/messagebird/go-rest-api/v6/sms"
import "github.com/messagebird/go-rest-api/v7"
import "github.com/messagebird/go-rest-api/v7/sms"

// ...

Expand All @@ -91,7 +91,7 @@ if err != nil {
`voice.ErrorResponse` is very similar, except that it holds `voice.Error` structs - those contain only `Code` and `Message` (not description!) fields:

```go
import "github.com/messagebird/go-rest-api/v6/voice"
import "github.com/messagebird/go-rest-api/v7/voice"

// ...

Expand Down

0 comments on commit cb04299

Please sign in to comment.