Skip to content

Question: set up string collection params #8

@alexw668

Description

@alexw668

Hi,

I really like your gem for dealing with the MapQuest API calls. I am trying MapQuest::Services::Directions and have a need to set the avoids option. The API says it's a string collection, so I thought I could do this

map_quest = MapQuest.new "my key"
from = "1 Infinite Loop, Cupertino, CA"
to = "1 Hacker Way, Menlo Park, CA"
response = map_quest.directions.route(from, to, avoids:["Ferry","Approximate Seasonal Closure"])

but my request ends with an error message claiming that invalid value for parameter 'avoid' and valid options are: [toll road, unpaved, ferry, limited access, approximate seasonal closure, country border crossing]. How do I pass such a string collection to avoids option?

Thanks,
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions