amaranth 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/amaranth/request.rb +1 -1
- data/lib/amaranth/version.rb +1 -1
- data/lib/amaranth/video.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bac1af1abfd0668929232ee46dd33c5c6e02f688
|
4
|
+
data.tar.gz: 73706e49ac12f37398dc0eae5fc21972de32305a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c3cbed124b5ddaea373553bec70ba3d8ebcd0724036abb0f238421f6a59ee2783995e45210e3894981778120cee18826880432710c60fc22081eff51e4e3c1a
|
7
|
+
data.tar.gz: df4ddbdd1c0087c396bbc3d8511512809083031684ada8fc0cd46a625b2fa347a2374744ad352c5658eb2f9843897949a550ab222fecfa6d85547c39c5204eb8
|
data/lib/amaranth/request.rb
CHANGED
@@ -27,7 +27,7 @@ module Amaranth
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.request req, body = nil
|
30
|
-
Net::HTTP.start("
|
30
|
+
Net::HTTP.start("amara.org", use_ssl: true) do |http|
|
31
31
|
req["Content-Type"] = "application/json"
|
32
32
|
req["X-api-username"] = Amaranth.api_username
|
33
33
|
req["X-api-key"] = Amaranth.api_key
|
data/lib/amaranth/version.rb
CHANGED
data/lib/amaranth/video.rb
CHANGED
@@ -4,7 +4,7 @@ require "open-uri"
|
|
4
4
|
module Amaranth
|
5
5
|
class Video < Struct.new(:id, :title, :description, :duration, :primary_audio_language_code, :thumbnail, :team, :project, :all_urls, :languages)
|
6
6
|
def self.all team_slug: nil, project_slug: nil
|
7
|
-
url = "https://
|
7
|
+
url = "https://amara.org/api/videos/?limit=100"
|
8
8
|
url += "&team=#{team_slug}" if team_slug
|
9
9
|
url += "&project=#{project_slug}" if project_slug
|
10
10
|
fetch(url).map do |attributes|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amaranth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|