Skip to content

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

@ilyazub

Description

@ilyazub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions