Closed edenlin18 closed 7 years ago
That definitely seems like an odd response, but I would need more information to help debug your issue. If you could show me the code you ran that got this error I might be able to offer more advice.
Closing this for now, if you want to discuss further @edenlin18, feel free to add more information and reopen.
Sorry to reply this late. was caught up with my work lately. I am not able to re-open this issue as it was closed by a repo collaborator.
The code I was using is as follows:
result = client.find :all, search_type: search_resource,
class: search_class,
query: search_query,
limit: search_limit
where
search_resource = 'OpenHouse'
search_class = 'OpenHouse'
search_query = '(ListingKeyNumeric=#some_numeric_val#),(OpenHouseStatus=ACT)'
limit = 0
Please let me know if I am using your library incorrectly. Thanks!
Unless I'm misunderstanding things, I believe your query needs to use select
like this:
search_resource = 'OpenHouse'
search_class = 'OpenHouse'
search_query = 'ListingKeyNumeric=#some_numeric_val#'
search_select = 'OpenHouseStatus=ACT'
search_limit = 0
result = client.find :all, search_type: search_resource, class: search_class, query: search_query, select: search_select, limit: search_limit
See client.rb
@nanosplit thanks for your comment.
I am not sure why I need to use select
in this case.
My intention is to get all fields of active open house.
select
seems to apply in cases where you only want subset of fields from the data that mls is returning.
Please correct me if I am wrong. Thanks in advance.
@edenlin18 sorry for the late reply, I never received a notice =\
Correct, select returns just that set of fields. Your query looked similar to our providers example for using select, so I just connected those dots.
Unfortunately I'm not sure how you're supposed to search based on multiple conditions like you're needing, we just pull all the data from our provider then handle the queries in the app.
Hi, I want to first thank you for providing this library. It makes querying mls data a lot easier!! I just want to know if this is a crmls specific behavior or I am using your library incorrectly. When I try to query all open house for a given property from CRMLS, I always get a HTTP exception, HTTP status: 401 (Invalid or missing session. Use the login URL to login to this RETS server.), which seems weird to me. I feel there should be no exception thrown in this case unless it is from CRMLS directly.
Any help is much appreciated!