Skip to content

Commit f8d3c58

Browse files
committed
up version to 9
1 parent 61b4927 commit f8d3c58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+76
-68
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ MessageBird's REST API for Go
22
=============================
33
This repository contains the open source Go client for MessageBird's REST API. Documentation can be found at: https://developers.messagebird.com.
44

5-
[![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/v8)](https://pkg.go.dev/github.com/messagebird/go-rest-api/v8)
5+
[![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/v9)](https://pkg.go.dev/github.com/messagebird/go-rest-api/v9)
66

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

1717
```
18-
$ go get github.com/messagebird/go-rest-api/v8
18+
$ go get github.com/messagebird/go-rest-api/v9
1919
```
2020

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

2525
```go
26-
import "github.com/messagebird/go-rest-api/v8"
26+
import "github.com/messagebird/go-rest-api/v9"
2727
```
2828

2929
Then, create an instance of **messagebird.Client**. It can be used to access the MessageBird APIs.
@@ -69,8 +69,8 @@ For this reason, errors returned by the `voice` package are of type `voice.Error
6969
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:
7070

7171
```go
72-
import "github.com/messagebird/go-rest-api/v8"
73-
import "github.com/messagebird/go-rest-api/v8/sms"
72+
import "github.com/messagebird/go-rest-api/v9"
73+
import "github.com/messagebird/go-rest-api/v9/sms"
7474

7575
// ...
7676

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

9393
```go
94-
import "github.com/messagebird/go-rest-api/v8/voice"
94+
import "github.com/messagebird/go-rest-api/v9/voice"
9595

9696
// ...
9797

UPGRADING.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,15 @@ As v7 introduces support for using the Verify API with email recipients, the `Ve
109109
Added [missed fields](https://github.com/messagebird/go-rest-api/pull/119/commits/f9331269238f1518dd35d798a0fbf251bb04bb62) in SMS API.
110110
Updated `sms.Delete` method so now in return only error or nil as result.
111111

112-
## `v8.0.0` -> `v8.1.0`
113-
### Update Conversations API
112+
## `v8.0.0` -> `v9.0.0`
113+
### General
114+
* New `PaginationRequest` instead of many in APIs.
115+
* Interface `messagebird.MessageBirdClient` instead of `messagebird.Client` and new `MockClient` for better testing.
116+
* List structures now have a plural ending instead of using word "List". Example: `ContactList` -> `Contacts`.
117+
* `conversations.ConversationStatus` replaced by `conversations.Status`.
118+
* `number.NumberPattern` replaced by `number.SearchPattern`.
119+
* Added [Partner Accounts API](https://developers.messagebird.com/api/partner/).
120+
### Conversations API
114121
* Replaced `conversations.CreateMessage` with `conversations.Reply` which send a new message to an existing conversation.
115122
* Replaced `conversations.ListMessages` with `conversations.ListConversationMessages` which fetch messages in indicated conversation.
116123
* Added `conversations.SendMessage` to send a message to a specific recipient in a specific platform.

balance/balance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package balance
33
import (
44
"net/http"
55

6-
messagebird "github.com/messagebird/go-rest-api/v8"
6+
messagebird "github.com/messagebird/go-rest-api/v9"
77
)
88

99
// Balance describes your balance information.

balance/balance_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"net/http"
55
"testing"
66

7-
messagebird "github.com/messagebird/go-rest-api/v8"
8-
"github.com/messagebird/go-rest-api/v8/internal/mbtest"
7+
messagebird "github.com/messagebird/go-rest-api/v9"
8+
"github.com/messagebird/go-rest-api/v9/internal/mbtest"
99
"github.com/stretchr/testify/assert"
1010
)
1111

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
const (
2727
// ClientVersion is used in User-Agent request header to provide server with API level.
28-
ClientVersion = "8.1.0"
28+
ClientVersion = "9.0.0"
2929

3030
// Endpoint points you to MessageBird REST API.
3131
Endpoint = "https://rest.messagebird.com"

contact/contact.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"net/http"
55
"time"
66

7-
messagebird "github.com/messagebird/go-rest-api/v8"
7+
messagebird "github.com/messagebird/go-rest-api/v9"
88
)
99

1010
// path represents the path to the Contacts resource.

contact/contact_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package contact
22

33
import (
4-
messagebird "github.com/messagebird/go-rest-api/v8"
4+
messagebird "github.com/messagebird/go-rest-api/v9"
55
"github.com/stretchr/testify/assert"
66
"net/http"
77
"testing"
88
"time"
99

10-
"github.com/messagebird/go-rest-api/v8/internal/mbtest"
10+
"github.com/messagebird/go-rest-api/v9/internal/mbtest"
1111
)
1212

1313
func TestMain(m *testing.M) {

conversation/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package conversation
22

33
import (
44
"fmt"
5-
messagebird "github.com/messagebird/go-rest-api/v8"
5+
messagebird "github.com/messagebird/go-rest-api/v9"
66
)
77

88
const (

conversation/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package conversation
22

33
import (
4-
"github.com/messagebird/go-rest-api/v8/internal/mbtest"
4+
"github.com/messagebird/go-rest-api/v9/internal/mbtest"
55
"github.com/stretchr/testify/assert"
66
"net/http"
77
"testing"

conversation/contact_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package conversation
22

33
import (
44
"encoding/json"
5-
"github.com/messagebird/go-rest-api/v8/internal/mbtest"
5+
"github.com/messagebird/go-rest-api/v9/internal/mbtest"
66
"github.com/stretchr/testify/assert"
77
"testing"
88
"time"

0 commit comments

Comments
 (0)