{"action":"created","issue":{"url":"https://api.github.com/repos/eveseat/eseye/issues/43","repository_url":"https://api.github.com/repos/eveseat/eseye","labels_url":"https://api.github.com/repos/eveseat/eseye/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/eveseat/eseye/issues/43/comments","events_url":"https://api.github.com/repos/eveseat/eseye/issues/43/events","html_url":"https://github.com/eveseat/eseye/issues/43","id":394940102,"node_id":"MDU6SXNzdWUzOTQ5NDAxMDI=","number":43,"title":"[Issue] Send a New Mail Endpoint","user":{"login":"drkthunder02","id":8024070,"node_id":"MDQ6VXNlcjgwMjQwNzA=","avatar_url":"https://avatars2.githubusercontent.com/u/8024070?v=4","gravatar_id":"","url":"https://api.github.com/users/drkthunder02","html_url":"https://github.com/drkthunder02","followers_url":"https://api.github.com/users/drkthunder02/followers","following_url":"https://api.github.com/users/drkthunder02/following{/other_user}","gists_url":"https://api.github.com/users/drkthunder02/gists{/gist_id}","starred_url":"https://api.github.com/users/drkthunder02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drkthunder02/subscriptions","organizations_url":"https://api.github.com/users/drkthunder02/orgs","repos_url":"https://api.github.com/users/drkthunder02/repos","events_url":"https://api.github.com/users/drkthunder02/events{/privacy}","received_events_url":"https://api.github.com/users/drkthunder02/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-31T07:18:59Z","updated_at":"2018-12-31T07:33:07Z","closed_at":null,"author_association":"NONE","body":"When trying to use Eseye to send a new mail, I get the following errors:\r\n\r\n Seat\\Eseye\\Exceptions\\RequestFailedException  : invalid array type for 'recipients', 'mail' is required\r\n\r\nThe Exception trace:\r\n\r\n 1   Seat\\Eseye\\Fetchers\\GuzzleFetcher::httpRequest(\"post\", \"https://esi.evetech.net/latest/characters/93738489/mail/?datasource=tranquility\", [\"Bearer [redacted]\", \"application/json\", \"application/json\", \"Eseye/1.1.6/Eseye Default Library\"], \"{\"approved_cost\":50000,\"body\":\"Year 2018 Month: 11<br>\",\"recipients\":{\"recipient_id\":90816088,\"recipient_type\":\"character\"},\"subject\":\"Test\"}\")\r\n      /var/www/w4rpservices/vendor/eveseat/eseye/src/Fetchers/GuzzleFetcher.php:102\r\n\r\n  2   Seat\\Eseye\\Fetchers\\GuzzleFetcher::call(\"post\", \"https://esi.evetech.net/latest/characters/93738489/mail/?datasource=tranquility\", [\"Year 2018 Month: 11<br>\", \"Test\"])\r\n      /var/www/w4rpservices/vendor/eveseat/eseye/src/Eseye.php:448\r\n\r\nI am using the following code to send a new mail, but I can't figure out what I am doing wrong on the library to make it send the required sections the ESI API is looking for.\r\n\r\n$esi->setBody([\r\n                    'approved_cost' => 50000,\r\n                    'body' => $body,\r\n                    'recipients' => [\r\n                        'recipient_id' => (int)$info->character_id,\r\n                        'recipient_type' => 'character',\r\n                    ],\r\n                    'subject' => $subject,\r\n                ])->invoke('post', '/characters/{character_id}/mail/', [\r\n                    'character_id'=> 93738489,\r\n                ]);\r\n\r\nAny chance you can help me figure out why the error is coming up?"},"comment":{"url":"https://api.github.com/repos/eveseat/eseye/issues/comments/450616217","html_url":"https://github.com/eveseat/eseye/issues/43#issuecomment-450616217","issue_url":"https://api.github.com/repos/eveseat/eseye/issues/43","id":450616217,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDYxNjIxNw==","user":{"login":"warlof","id":648753,"node_id":"MDQ6VXNlcjY0ODc1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/648753?v=4","gravatar_id":"","url":"https://api.github.com/users/warlof","html_url":"https://github.com/warlof","followers_url":"https://api.github.com/users/warlof/followers","following_url":"https://api.github.com/users/warlof/following{/other_user}","gists_url":"https://api.github.com/users/warlof/gists{/gist_id}","starred_url":"https://api.github.com/users/warlof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warlof/subscriptions","organizations_url":"https://api.github.com/users/warlof/orgs","repos_url":"https://api.github.com/users/warlof/repos","events_url":"https://api.github.com/users/warlof/events{/privacy}","received_events_url":"https://api.github.com/users/warlof/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T07:33:07Z","updated_at":"2018-12-31T07:33:07Z","author_association":"MEMBER","body":"Hi,\r\n\r\nThe `recipients` field is an array of entity part. You should write this instead :\r\n\r\n```\r\n'recipients' => [[\r\n'recipient_id' => (int)$info->character_id,\r\n'recipient_type' => 'character',\r\n]],\r\n```"}}
{"actor":{"display_login":"warlof"}}