{"action":"created","issue":{"url":"https://api.github.com/repos/estately/rets/issues/173","repository_url":"https://api.github.com/repos/estately/rets","labels_url":"https://api.github.com/repos/estately/rets/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/estately/rets/issues/173/comments","events_url":"https://api.github.com/repos/estately/rets/issues/173/events","html_url":"https://github.com/estately/rets/pull/173","id":133482956,"number":173,"title":"Rets::PropertyClient for retrieving rets properties and associated re…","user":{"login":"summera","id":2474416,"avatar_url":"https://avatars.githubusercontent.com/u/2474416?v=3","gravatar_id":"","url":"https://api.github.com/users/summera","html_url":"https://github.com/summera","followers_url":"https://api.github.com/users/summera/followers","following_url":"https://api.github.com/users/summera/following{/other_user}","gists_url":"https://api.github.com/users/summera/gists{/gist_id}","starred_url":"https://api.github.com/users/summera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/summera/subscriptions","organizations_url":"https://api.github.com/users/summera/orgs","repos_url":"https://api.github.com/users/summera/repos","events_url":"https://api.github.com/users/summera/events{/privacy}","received_events_url":"https://api.github.com/users/summera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-13T23:32:51Z","updated_at":"2016-02-18T22:27:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/estately/rets/pulls/173","html_url":"https://github.com/estately/rets/pull/173","diff_url":"https://github.com/estately/rets/pull/173.diff","patch_url":"https://github.com/estately/rets/pull/173.patch"},"body":"More work to do on this guy, but I wanted to get your thoughts before moving on. I have created something similar to this in my application and it has been really helpful to me, so hopefully it will be helpful to others! :smile: \r\n\r\nThe learning curve for querying RETS servers can be a little steep, and writing the code to retrieve resources can be a little cumbersome. The idea here is to make things a little easier. The basic idea is the following:\r\n\r\n```ruby\r\n# holds some some simple configuration info based on some rets metadata\r\nmls_config = SomeMlsConfiguration.new\r\n\r\nproperty_client = Rets::PropertyClient.new(mls_config)\r\n\r\n# retrieve properties modified within the last 24 hours\r\nstart_at = Time.now - (3600 * 24)\r\nend_at = Time.now\r\nproperties = property_client.properties(start_at: start_at, end_at: end_at)\r\n\r\nproperties.each do |prop|\r\n  # retrieve images for this property\r\n  images = prop.images\r\n  \r\n  # retrieve open houses for this property\r\n  open_houses = prop.open_houses\r\nend\r\n```\r\n\r\nLet me know your thoughts!"},"comment":{"url":"https://api.github.com/repos/estately/rets/issues/comments/185952995","html_url":"https://github.com/estately/rets/pull/173#issuecomment-185952995","issue_url":"https://api.github.com/repos/estately/rets/issues/173","id":185952995,"user":{"login":"summera","id":2474416,"avatar_url":"https://avatars.githubusercontent.com/u/2474416?v=3","gravatar_id":"","url":"https://api.github.com/users/summera","html_url":"https://github.com/summera","followers_url":"https://api.github.com/users/summera/followers","following_url":"https://api.github.com/users/summera/following{/other_user}","gists_url":"https://api.github.com/users/summera/gists{/gist_id}","starred_url":"https://api.github.com/users/summera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/summera/subscriptions","organizations_url":"https://api.github.com/users/summera/orgs","repos_url":"https://api.github.com/users/summera/repos","events_url":"https://api.github.com/users/summera/events{/privacy}","received_events_url":"https://api.github.com/users/summera/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T22:27:48Z","updated_at":"2016-02-18T22:27:48Z","body":"@dougcole @hfaulds Just checking back in on this. Thoughts?"}}