{"id":18320892,"url":"https://github.com/bazaarvoice/bvsnippets","last_synced_at":"2025-04-05T22:32:07.709Z","repository":{"id":66754574,"uuid":"10057969","full_name":"bazaarvoice/BVSnippets","owner":"bazaarvoice","description":"Jquery plugin that injects BV snippets onto a page (i.e. a featured review, inline ratings, etc.)","archived":false,"fork":false,"pushed_at":"2015-12-10T20:44:02.000Z","size":91,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":34,"default_branch":"master","last_synced_at":"2023-04-14T14:40:45.214Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazaarvoice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-14T15:09:24.000Z","updated_at":"2016-06-06T19:42:29.000Z","dependencies_parsed_at":"2023-02-23T00:00:46.860Z","dependency_job_id":null,"html_url":"https://github.com/bazaarvoice/BVSnippets","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazaarvoice%2FBVSnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazaarvoice%2FBVSnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazaarvoice%2FBVSnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazaarvoice%2FBVSnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazaarvoice","download_url":"https://codeload.github.com/bazaarvoice/BVSnippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223221228,"owners_count":17108530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T18:17:45.955Z","updated_at":"2024-11-05T18:17:46.545Z","avatar_url":"https://github.com/bazaarvoice.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"BVSnippets\n==========\n\nJquery plugin that injects BV snippets onto a page (i.e. a featured review, inline ratings, etc.)  Must have a valid API key provided to use this library.\n\nExample Usage for Conversations 2013 Clients\n============================================\nThe first part in this example, 'BVFeaturedReviewC13' can be any valid jquery selector.  The featuredReviews function takes two parameters: an API key and an arguments collection.  API keys are specific to staging or production, be sure to specify 'staging: true' in the arguments object if you are using a staging key.\n```\n$(\".BVFeaturedReviewC13\").featuredReviews('305i5xcijnuk5ykdjltwco1q8', { staging: true });\n```\n\nExample Usage For Legacy PRR Clients\n=====================================\nIf you are using Bazaarvoice's legacy PRR platform be sure to add your BV hostname and displaycode as arguments.\n```\n$(\".BVFeaturedReview\").featuredReviews('72n07szwiwjspk7x6idcry4ch', {\n\tstaging: true,\n\tlegacy_hostname: 'http://reviews.myshco.com',\n\tlegacy_displaycode: '9344-en_us'\n});\n```\n\nExamples of Configuration Options\n=====================================\n```\n$(\".BVFeaturedReview\").featuredReviews('305i5xcijnuk5ykdjltwco1q8', {\n\tsort: 'LastModificationTime:desc',\n\tfilters: 'IsFeatured:true\u0026Filter=Rating:lte:4',\n\tstaging: false,\n\tlimit: 100,\n\tapiversion: '5.4',\n\tlegacy_hostname: false, //false indicates C13 client\n\tlegacy_displaycode: false, //false indicates C13 client\n\tabbreviate_text: 200\n});\n```\n\nDOM Syntax\n===================\n```\n\u003cdiv class=\"BVFeaturedReview\" data-id=\"1000001\"\u003e\u003c/div\u003e\n```\n\nThe class or ID is used as the selector, data-id equals the product ID as it appears in the externalId in the product feed.  This should have at least one featured review.\n\u003cb\u003eIMPORTANT\u003c/b\u003e\n`data-id` is a required attribute.\n\nOptional Parameters\n===================\n\u003cpre\u003esort - This may be any valid sort listed here: https://developer.bazaarvoice.com/docs/read/Home\nfilters - This may be any valid filter listed here: https://developer.bazaarvoice.com/docs/read/Home\nstaging - True indicates staging servers will be used, By default this is False and production servers are used.\nlimit - Defaults to 1, may be up to 100 per product.\nlegacy_hostname - This is used by legacy PRR/Conversations 1.0 and 2.0 clients.  Leave this blank if provisioned on Conversations 2013.\nlegacy_displaycode - This is used by legacy PRR/Conversations 1.0 and 2.0 clients.  Leave this blank if provisioned on Conversations 2013.\nabbreviate_text - Enables content abbreviation. If the main text is longer than this value (by character count) then the text will be truncated and appended with an ellipsis. Must be a numeric value.\n\u003c/pre\u003e\n\nNotes\n=====\nThe sort and filters parameters accept multiple parameters stringed together.  If using more than one, be sure to prepend the second with either `$sort=` or `\u0026filter=` or the query will fail.\n\nStyles\n=====\n\nThis widget has a pre-built theme with basic styles. It also has four pre-built layouts.\n\nThe pre-built theme defines the styles of the text, stars, image, button, and heading. It also displays the widget in a vertical layout.\nTo use the pre-built theme with basic styles, simply add the class `BVFeaturedReviewContainer` to the div:\n```\n\u003cdiv class=\"BVFeaturedReview\" data-id=\"1000001\"\u003e\u003c/div\u003e\n```\n\nThe other available layouts are the following:\n\n1. Vertical Layout.\n2. No Image Layout\n3. Horizontal Layout, Image Left Aligned\n4. Horizontal Layout, Image Right Aligned\n\nTo use one of the pre-built layouts add one of the following classes to the parent div containing the widget:\n\n\n1. Vertical Layout. You only need the class `BVFeaturedReview`. You don't need additional classes for the vertical layout:\n```\n\u003cdiv class=\"BVFeaturedReview\" data-id=\"1000001\"\u003e\u003c/div\u003e\n```\n\n2. No Image Layout. Add the class `BVFRCNoImage` to the parent div:\n```\n\u003cdiv class=\"clientRow BVFRCNoImage\"\u003e\n\t\u003cdiv class=\"BVFeaturedReviewContainer\" data-id=\"1000001\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n3. Horizontal Layout, Image Left Aligned. Add the class `BVFRCHorizontalLeft` to the parent div:\n```\n\u003cdiv class=\"clientRow BVFRCHorizontalLeft\"\u003e\n\t\u003cdiv class=\"BVFeaturedReviewContainer\" data-id=\"1000001\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n4. Horizontal Layout, Image Right Aligned. Add the class `BVFRCHorizontalRight` to the parent div:\n```\n\u003cdiv class=\"clientRow BVFRCHorizontalRight\"\u003e\n\t\u003cdiv class=\"BVFeaturedReviewContainer\" data-id=\"1000001\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazaarvoice%2Fbvsnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazaarvoice%2Fbvsnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazaarvoice%2Fbvsnippets/lists"}