{"action":"created","issue":{"url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/98","repository_url":"https://api.github.com/repos/elasticquent/Elasticquent","labels_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/98/comments","events_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/98/events","html_url":"https://github.com/elasticquent/Elasticquent/pull/98","id":167581115,"number":98,"title":"Enable to use aws es with iam auth","user":{"login":"yukato","id":4372249,"avatar_url":"https://avatars.githubusercontent.com/u/4372249?v=3","gravatar_id":"","url":"https://api.github.com/users/yukato","html_url":"https://github.com/yukato","followers_url":"https://api.github.com/users/yukato/followers","following_url":"https://api.github.com/users/yukato/following{/other_user}","gists_url":"https://api.github.com/users/yukato/gists{/gist_id}","starred_url":"https://api.github.com/users/yukato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukato/subscriptions","organizations_url":"https://api.github.com/users/yukato/orgs","repos_url":"https://api.github.com/users/yukato/repos","events_url":"https://api.github.com/users/yukato/events{/privacy}","received_events_url":"https://api.github.com/users/yukato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-07-26T11:06:56Z","updated_at":"2016-10-27T06:37:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/98","html_url":"https://github.com/elasticquent/Elasticquent/pull/98","diff_url":"https://github.com/elasticquent/Elasticquent/pull/98.diff","patch_url":"https://github.com/elasticquent/Elasticquent/pull/98.patch"},"body":"- PSR-2 code formatted, php syntax to >=5.4\r\n- Enable to use Amazon Elasticsearch Service with IAM auth\r\n\r\nI wanted to use Amazon Elasticsearch Service. (Amazon ES)\r\nhttps://aws.amazon.com/elasticsearch-service/\r\n\r\nWhen use Amazon ES, I also want to use IAM auth, and with elasticsearch-php library, I wanted to set aws authed handler.\r\nhttps://github.com/elastic/elasticsearch-php"},"comment":{"url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/comments/256559027","html_url":"https://github.com/elasticquent/Elasticquent/pull/98#issuecomment-256559027","issue_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/98","id":256559027,"user":{"login":"timgws","id":1050232,"avatar_url":"https://avatars.githubusercontent.com/u/1050232?v=3","gravatar_id":"","url":"https://api.github.com/users/timgws","html_url":"https://github.com/timgws","followers_url":"https://api.github.com/users/timgws/followers","following_url":"https://api.github.com/users/timgws/following{/other_user}","gists_url":"https://api.github.com/users/timgws/gists{/gist_id}","starred_url":"https://api.github.com/users/timgws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgws/subscriptions","organizations_url":"https://api.github.com/users/timgws/orgs","repos_url":"https://api.github.com/users/timgws/repos","events_url":"https://api.github.com/users/timgws/events{/privacy}","received_events_url":"https://api.github.com/users/timgws/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T06:37:58Z","updated_at":"2016-10-27T06:37:58Z","body":"@yukato, your work on https://github.com/elasticquent/Elasticquent/pull/98/commits/7a7ecf8b012e6d0613dbc181928f5380e8908b1c is almost half way to being awesome! (:\r\n\r\nIf you have a look at the Design Pattern code again that I linked you before (https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/SimpleFactory) look at the class SimpleFactory.\r\n\r\nWhat would happen is you would have two new classes under `SimpleFactory`.\r\n\r\neg, `AwsClient` and `ElasticsearchClient`.\r\n\r\n`SimpleFactory` would determine if it should create a new instance `AwsClient` depending on wether or not AWS-specific config is set (or a new instance of `ElasticsearchClient` if it isn't).\r\n\r\nhttps://github.com/yukato/Elasticquent/blob/7a7ecf8b012e6d0613dbc181928f5380e8908b1c/src/ElasticSearchClientFactory.php#L30-L50\r\n\r\nThis way, when you call `getClient()`, you will call it on either `AwsClient` or `ElasticsearchClient`. Only AwsClient would `use Aws\\Credentials\\Credentials;`, which means you only need to have the AWS SDK installed if you are going to be having AWS config."}}
{"actor":{"display_login":"timgws"}}