<commit_before><link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-ajax/iron-ajax.html">

<!--
`darksky-forecast`
Polymer web component for Dark Sky forecast API

@demo demo/index.html
-->

<dom-module id="darksky-forecast">
  <template>
    <iron-ajax
      id="iron_ajax"
      auto="[[auto]]"
      handle-as="json"
      loading="{{loading}}"
      url="[[_computeUrl(apiKey, latitude, longitude)]]"
      last-response="{{response}}">
    </iron-ajax>
  </template>

  <script>
    Polymer({

      is: 'darksky-forecast',

      properties: {

        /**
         * Dark Sky API key. (Required)
         *
         * Get this from https://darksky.net/dev/account
         *
         * It looks like this: '0c91dff60f9a0f4f3328d39ee828341a'
         */
        apiKey: String,

        /**
         * The latitude of a geolocation. (Required)
         *
         * e.g 37.8267
         */
        latitude: Number,

        /**
         * The longitude of a geolocation. (Required)
         *
         * e.g -122.4233
         */
        longitude: Number,

        auto: {
          type: Boolean,
          value: false
        },

        loading: {
          type: Boolean,
          notify: true,
          readOnly: true
        },

        response: {
          type: Object,<commit_msg>Add exclude property.<commit_after><link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-ajax/iron-ajax.html">

<!--
`darksky-forecast`
Polymer web component for Dark Sky forecast API

Example:

    <darksky-forecast
      auto
      api-key="0c91dff60f9a0f4f3328d39ee828341a"
      latitude="37.8267"
      longitude="-122.4233"
      exclude='["hourly","daily"]'>
    <darksky-forecast>

@demo demo/index.html
-->

<dom-module id="darksky-forecast">
  <template>
    <iron-ajax
      id="iron_ajax"
      auto="[[auto]]"
      handle-as="json"
      loading="{{loading}}"
      url="[[_computeUrl(apiKey, latitude, longitude)]]"
      last-response="{{rawResponse}}">
    </iron-ajax>
  </template>

  <script>
    Polymer({

      is: 'darksky-forecast',

      properties: {

        /**
         * Dark Sky API key. (Required)
         *
         * Get this from https://darksky.net/dev/account
         *
         * e.g api-key="0c91dff60f9a0f4f3328d39ee828341a"
         */
        apiKey: String,

        /**
         * The latitude of a geolocation. (Required)
         *
         * e.g latitude="37.8267"
         */
        latitude: String,

        /**
         * The longitude of a geolocation. (Required)
         *
         * e.g longitude="-122.4233"
         */
        longitude: String,

        /**
         * Exclude some number of data blocks from the API response. (Optional)
         *
         * Only following values can be used:
         *
         * currently | minutely | hourly | daily | alerts | flags
         *
         * e.g exclude='["hourly","daily"]'
         */
        exclude: Array,

        auto: {
          type: Boolean,
          value: false
        },

        loading: {
          type: Boolean,
          notify: true,
          readOnly: true
        },

        _rawResponse: {
          type: Object,
{'fraction_non_alphanumeric': 0.14019272614236866, 'fraction_numerical': 0.030774013055641904, 'mean_word_length': 1.657308009909166, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5272106', 'n_tokens_mistral': 1075, 'n_tokens_neox': 998, 'n_words': 207}