Giter VIP home page Giter VIP logo

Comments (3)

juftin avatar juftin commented on July 17, 2024

🤔 I'm wondering if we can make this more general to all providers - I don't believe that we are passing through this type of data as campsite attributes, but I think we may be able to.

See here where we grab some extra metadata about the campsite:

for attribute in site_details["definedAttributes"]:
attribute_detail = attribute_details[
f"{attribute['attributeDefinitionId']}"
]
attribute_name = _fetch_nested_key(
attribute_detail, "localizedValues", 0, "displayName"
)
attribute_value = attribute.get("value")
attribute_values = []
# Attribute a multi-value enum
if not attribute_value:
attr_value = self._get_attr_val(attribute, attribute_detail)
if not attr_value:
continue
attribute_values.append(attr_value)
else:
attribute_values.append(f"{attribute_value}")
site_attributes[attribute_name] = ",".join(attribute_values)
site_details["site_attributes"] = site_attributes

There is a data object, AvailableCampsite, that allows for the capturing of extra metadata:

permitted_equipment: Optional[List[RecDotGovEquipment]]
campsite_attributes: Optional[List[RecDotGovAttribute]]

We're not currently doing anything with this data yet, but we do capture it in a couple different providers. There is an existing issue for it here: #86 and here: #63

from camply.

rpdids avatar rpdids commented on July 17, 2024

Yeah thinking a bit harder about it, no reason why it shouldn't be a feature for all providers. Will wind up being a bigger chunk of work obviously, but filters are so crucial when trying to find the right campsite and I think would make the tool that much more useful for users. I've been pretty busy with camping myself lately, but I'm hoping to spend some evenings peeking around

from camply.

acaloiaro avatar acaloiaro commented on July 17, 2024

I think this is a great request.

My best recollection of why I didn't implement filters originally is that they are instance-specific, e.g. Washington State Parks may have a filter called "has water" and BC Parks might have a filter called "Has water and electric", and there wasn't a clear way to turn a user filter/query of "wants water" into "has water" for Washing State Parks and "has water and electric" for BC Parks.

Of course, this is only from my memory, and the example I give above is perhaps not the best. But the point is, I think it may be a hard problem. Though perhaps not for a greater mind @juftin 😄

I don't believe there's any set of unified filter IDs that work across instances.

from camply.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.