Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a mapping of decoded ved type -> serp feature type #1

Open
ilyazub opened this issue Feb 24, 2023 · 0 comments
Open

Add a mapping of decoded ved type -> serp feature type #1

ilyazub opened this issue Feb 24, 2023 · 0 comments

Comments

@ilyazub
Copy link

ilyazub commented Feb 24, 2023

Thank you for the ved_decoder!

It'd be nice to have a mapping of decoded ved -> serp feature type. Wdyt about VedDecode#decoded_serp_feature?

VED_TYPES_TO_SERP_FEATURES = {
  22: :organic_results,
  39116: :organic_result_questions,
  # ...
}

# lib/ved_decoder.rb
module VedDecode
  # ...

  def decoded_serp_feature
    VED_TYPES_TO_SERP_FEATURES[type]
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant