ajones05 / seearound.me-ionic

0 stars 0 forks source link

API for recent searches #228

Open ajones05 opened 7 years ago

ajones05 commented 7 years ago

@yuriyua can you help with an API to track recent searches? Just the last 8 or 10 searches. This is being added to the search page on the mobile app, like this: search page

yuriyua commented 7 years ago

ok, I will do it

yuriyua commented 7 years ago

done https://www.seearound.me/admin/mobile-api/search-log/token/CDK57KHID93DSXICK2XTLF1THPXT5EVHTGM346MGFPXAMFM9GI5525ZIVXE2CAI8/submit

https://github.com/ajones05/seearound.me/wiki/Mobile-Api-Reference#-mobilesearch-log

ajones05 commented 7 years ago

@abdulhafeez for recent searches

abdulhafeez commented 7 years ago

@yuriyua I did not get any data on this so far. The response I get is following: {"status":"SUCCESS"}

There is no data. My guess is that it may be related to other issue I posted. It seems there is some error when you are putting recent searches in the database.

yuriyua commented 7 years ago

done https://www.seearound.me/admin/mobile-api/search-log/token/L8EPB76Y34HKRDRPIPTPFTKF4V5623QMA7CLEIIGM44EHV64L1S3TEIZBP5CRX13/submit

abdulhafeez commented 7 years ago

Thanks! it is fixed.

ajones05 commented 7 years ago

I tried searching. The first search stays under "Recent searches" but any new search terms are never added (so only the first search term continues to be visible)

abdulhafeez commented 7 years ago

@yuriyua This seems to be a server side issue.

yuriyua commented 7 years ago

I removed group query parameter. Could you test it now, please?

ajones05 commented 7 years ago

Something is still not right. Two things:

  1. The recent search terms seem to multiply img_5615

  2. If you scroll down, it ends up going into List view (it should just let you see one page of recent searches, with no duplicates. img_5616

abdulhafeez commented 7 years ago

I have fixed issue 2. @yuriyua Can you check for issue 1? I don't see anything wrong on my side.

yuriyua commented 7 years ago

@abdulhafeez yes, I will fix this issue tomorrow

ajones05 commented 7 years ago

A few issues now:

  1. I don't see any recent searches appear now.

  2. The Recent Searches bar moves everything down (it should just overlay and cover, not move) image

  3. After searching, the keyboard should disappear, but right now it stays up. img_5651

yuriyua commented 7 years ago

Should I remove all duplicates from the response or just neighbours duplicates?

Old response:

{
    "token": "4HS8KM3I5VR38HCLZI7FCC77C2ISKZIPGCY422M6XF96ZLRY71EIDLQQNBIAA51S"
}

{
    "status": "SUCCESS",
    "result": [
        "Lake",
        "Restaurant",
        "Restaurant",
        "Restaurant",
        "Restaurant",
        "Restaurant",
        "Restaurant",
        "Lake",
        "Lake",
        "Restaurant",
        "Restaurant",
        "Restaurant"
    ]
}

Remove neighbours duplicates:

{
    "token": "4HS8KM3I5VR38HCLZI7FCC77C2ISKZIPGCY422M6XF96ZLRY71EIDLQQNBIAA51S"
}

{
    "status": "SUCCESS",
    "result": [
        "Lake",
        "Restaurant",
        "Lake",
        "Restaurant"
    ]
}

Remove all duplicates:

{
    "token": "4HS8KM3I5VR38HCLZI7FCC77C2ISKZIPGCY422M6XF96ZLRY71EIDLQQNBIAA51S"
}

{
    "status": "SUCCESS",
    "result": [
        "Lake",
        "Restaurant"
    ]
}
ajones05 commented 7 years ago

Remove all duplicates (there's no reason to have any)

yuriyua commented 7 years ago

done

abdulhafeez commented 7 years ago
  1. The recent searches appear alright but there are still duplicates.
  2. Fixed.
  3. Fixed.
yuriyua commented 7 years ago

@abdulhafeez 1. The recent searches appear alright but there are still duplicates. Can you show me request/response example, please?

abdulhafeez commented 7 years ago

@yuriyua I tested just now and it seems it has been fixed. No more duplicates now.

yuriyua commented 7 years ago

Good. Let me know if I can any help you.

ajones05 commented 7 years ago

They seem to repeat after the end of the list. In this case, it should just be white space after the last three searches. But you see the same three keep repeating

image

abdulhafeez commented 7 years ago

The issue was on my side. Fixed.