{"id":2124,"date":"2022-08-14T14:17:57","date_gmt":"2022-08-14T13:17:57","guid":{"rendered":"https:\/\/mywindsock.com\/page\/?page_id=2124"},"modified":"2022-10-11T19:34:31","modified_gmt":"2022-10-11T18:34:31","slug":"widgets","status":"publish","type":"page","link":"https:\/\/mywindsock.com\/page\/api\/widgets\/","title":{"rendered":"Widgets"},"content":{"rendered":"\n<p>Our Widgets allows you to quickly embed myWindsock metrics for a course onto a web page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"222\" height=\"172\" src=\"https:\/\/mywindsock.com\/page\/wp-content\/uploads\/2022\/08\/image-1.png\" alt=\"\" class=\"wp-image-2125\"\/><\/figure>\n\n\n\n<h2>Quick Start<\/h2>\n\n\n\n<p>Ensure you have applied and have received an apikey, <a href=\"https:\/\/mywindsock.com\/page\/api\/\" data-type=\"page\" data-id=\"2109\">apply here<\/a>. <\/p>\n\n\n\n<p>CSS File<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;link href=\"https:\/\/mywindsock.com\/api\/widgets\/css\/metrics.css\" rel=\"stylesheet\" \/&gt;<\/code><\/pre>\n\n\n\n<p>Placement<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"tt-ctt-mws mws-metric\"  data-mws-source=\"<strong>REPLACE<\/strong>\" data-mws-metric=\"<strong>REPLACE<\/strong>\" data-mws-id=\"<strong>REPLACE<\/strong>\"&gt;&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p>JS Code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script type=\"text\/javascript\"&gt;\n    var mws_apikey='<strong>REPLACE WITH APIKEY<\/strong>';\n&lt;\/script&gt;\n&lt;script type='text\/javascript' src='https:\/\/mywindsock.com\/api\/widgets\/js\/load.js'&gt;&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h2>Parameters<\/h2>\n\n\n\n<p><strong>data-mws-source<\/strong><\/p>\n\n\n\n<p>Select the course data source. You have the following options:<\/p>\n\n\n\n<ul><li>strava_segment<\/li><li>strava_route<\/li><li>strava_activity<\/li><li>rwgps_route<\/li><li>komoot_route<\/li><li>upload<\/li><li>course<\/li><li>ctt<\/li><\/ul>\n\n\n\n<p><strong>data-mws-id<\/strong><\/p>\n\n\n\n<p>The unique course ID for the applicable data source. For example, Strava Segment would have the strava_segment data-mws-source and the data-mws-id is the numeric value within a Strava Segment URL https:\/\/strava.com\/segments\/<strong>1078016<\/strong>\/ <\/p>\n\n\n\n<p><strong>data-mws-metric<\/strong><\/p>\n\n\n\n<p>The data can be presented:<\/p>\n\n\n\n<ul><li>wimpact &#8211; Weather Impact <a href=\"https:\/\/mywindsock.com\/page\/help\/navigating-and-understanding-the-information\/metrics-explained\/wwatts\/\" data-type=\"page\" data-id=\"485\">learn more<\/a><\/li><li>feelslike &#8211; Feels Like Elevation<sup>TM<\/sup> <a href=\"https:\/\/mywindsock.com\/page\/help\/premium-features-explained\/if-headwinds-were-hills\/\" data-type=\"page\" data-id=\"694\">learn more<\/a><\/li><\/ul>\n\n\n\n<p><strong>data-mws-timestamp<\/strong><\/p>\n\n\n\n<p>Optional, a UTC timestamp for the start time of the analysis. If this is not provided the current time will be used.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Our Widgets allows you to quickly embed myWindsock metrics for a course onto a web page. Quick Start Ensure you have applied and have received an apikey, apply here. CSS File Placement JS Code Parameters data-mws-source Select the course data source. You have the following options: strava_segment strava_route strava_activity rwgps_route komoot_route upload course ctt data-mws-id &hellip; <a href=\"https:\/\/mywindsock.com\/page\/api\/widgets\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Widgets&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2109,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/pages\/2124"}],"collection":[{"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/comments?post=2124"}],"version-history":[{"count":6,"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/pages\/2124\/revisions"}],"predecessor-version":[{"id":2200,"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/pages\/2124\/revisions\/2200"}],"up":[{"embeddable":true,"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/pages\/2109"}],"wp:attachment":[{"href":"https:\/\/mywindsock.com\/page\/wp-json\/wp\/v2\/media?parent=2124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}