vidsy-data-api 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vidsy/data/api/challenge.rb +34 -0
- data/lib/vidsy/data/api/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cbbc4a384a084bc854cda652d3958322701d970
|
4
|
+
data.tar.gz: 9aab6bdd68d67a8ed39d3ce2dce5acc19cc20290
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af3dceeb0a4a308231b5b4023df030be0591b033474012563cf81e349f341b102ab6554613d7e25714532ecc00cf8e9da96b73f2525068a8a23ae3aa822983bc
|
7
|
+
data.tar.gz: c0f708e8652cb445c680b2d19cacfcfcecb71fc356346b00f5d832db8d3c3b3e61a2903aec791e0a7e4d44e332733a8be9e73a87e178e1859e1adb7d0cb1f049
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "vidsy/data/api/client"
|
2
|
+
require "vidsy/data/api/configuration"
|
3
|
+
|
4
|
+
module Vidsy
|
5
|
+
module Data
|
6
|
+
module API
|
7
|
+
class Challenge
|
8
|
+
def self.find(id)
|
9
|
+
new.find id
|
10
|
+
end
|
11
|
+
|
12
|
+
def find(id)
|
13
|
+
client.get("#{routes.challenge}/#{id}").first
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
attr_reader :id
|
19
|
+
|
20
|
+
def client
|
21
|
+
Vidsy::Data::API::Client.new
|
22
|
+
end
|
23
|
+
|
24
|
+
def configuration
|
25
|
+
Vidsy::Data::API::Configuration
|
26
|
+
end
|
27
|
+
|
28
|
+
def routes
|
29
|
+
configuration.routes
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidsy-data-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Revett
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- Gemfile
|
119
119
|
- lib/vidsy/data/api.rb
|
120
120
|
- lib/vidsy/data/api/brand.rb
|
121
|
+
- lib/vidsy/data/api/challenge.rb
|
121
122
|
- lib/vidsy/data/api/client.rb
|
122
123
|
- lib/vidsy/data/api/configuration.rb
|
123
124
|
- lib/vidsy/data/api/error/response.rb
|