Sha256: 206d55c2a8631972dbe3a633b3f05c257b5e2252409ba9cc27c79a761405d55d

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 Bytes

Contents

if(window.Resizing === undefined) { window.Resizing = {} }
if(window.Resizing.Rails === undefined) { window.Resizing.Rails = {} }

class VideoFetcher {
  constructor(self_url) {
    this.self_url = self_url
  }

  fetch() {
    return fetch(this.self_url, {method: 'GET', credentials: 'same-origin', headers: {'Content-Type': 'application/json'}})
    .then(response => response.json())
  }
}

window.Resizing.Rails.VideoFetcher = VideoFetcher

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
resizing-rails-0.4.1 app/assets/javascripts/resizing/rails/video_fetcher.js
resizing-rails-0.4.0 app/assets/javascripts/resizing/rails/video_fetcher.js
resizing-rails-0.3.0 app/assets/javascripts/resizing/rails/video_fetcher.js
resizing-rails-0.2.0 app/assets/javascripts/resizing/rails/video_fetcher.js
resizing-rails-0.1.0.pre2 app/assets/javascripts/resizing/rails/video_fetcher.js