Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message 'id' and 'href' missing in $MessageBird->messages->getList() response #177

Closed
stgoos opened this issue Jul 22, 2021 · 4 comments
Closed
Labels

Comments

@stgoos
Copy link

stgoos commented Jul 22, 2021

When I retieve the list of messages I don't see the ["id":protected] and the ["href":protected] information in the response like it's shown in the documentation (https://developers.messagebird.com/api/sms-messaging/#list-messages):

object(MessageBirdObjectsBaseList)#128 (6) {
  ["limit"]=>
  int(30)
  ["offset"]=>
  int(0)
  ["count"]=>
  int(18)
  ["totalCount"]=>
  int(18)
  ["links"]=>
  object(stdClass)#55 (4) {
    ["first"]=>
    string(56) "https://rest.messagebird.com/messages/?offset=0&limit=30"
    ["previous"]=>
    NULL
    ["next"]=>
    NULL
    ["last"]=>
    string(56) "https://rest.messagebird.com/messages/?offset=0&limit=30"
  }
  ["items"]=>
  array(1) {
    [0]=>
    object(MessageBirdObjectsMessage)#123 (16) {
      ["id":protected]=>
      string(32) "7f6526d794ac4cd1bdb262d86356d341"
      ["href":protected]=>
      string(70) "https://rest.messagebird.com/messages/7f6526d794ac4cd1bdb262d86356d341"
      ["direction"]=>
      string(2) "mt"

The response I receive starts with the ["direction"] information for each of the items (=messages).

Is something broken? Or am I doing something wrong?

I'm using:

$MessageList = $MessageBird->messages->getList(array ('offset' => 0, 'limit' => 30));
var_dump($MessageList);

to get hold of the list with messages.

I'm using v2.0.1 of the php-rest-api.

@CoolGoose CoolGoose added the bug label Oct 19, 2021
@dennisvdvliet
Copy link
Contributor

@CoolGoose I will have a look at this one.

@dennisvdvliet
Copy link
Contributor

@CoolGoose Do you happen to know why we removed the id and href attributes from the Message object?

For reference: https://github.com/messagebird/php-rest-api/pull/170/files#diff-199dfab90fcaab6256dc3c825a4c0f7d73479b1ae47de0dad6662e7ab3fca041L20

@CoolGoose
Copy link
Contributor

@dennisvdvliet
Copy link
Contributor

Fix here: #210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants