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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6972dca5b49f83aae940c4cfcb75e1000aa111bd
4
- data.tar.gz: 563fc5d7416c8de0090a03bb3877a0abc4075a50
3
+ metadata.gz: 8cbbc4a384a084bc854cda652d3958322701d970
4
+ data.tar.gz: 9aab6bdd68d67a8ed39d3ce2dce5acc19cc20290
5
5
  SHA512:
6
- metadata.gz: 8e6f2ab92cd0af1011f6e42199d04ac552503e9d34d041f34ef44f6422f86b0ef81e18424055ef1f07b910ea5039489964658178820035438bd9913230e04a01
7
- data.tar.gz: b0d1067982705f56ee2460a974618e5503e325eb0a1698e8f9aef089b7b5281dbfb8910fd8ae6323bf475bb9f04c910c969fb17d882c193740ede76b46f1021c
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
@@ -1,7 +1,7 @@
1
1
  module Vidsy
2
2
  module Data
3
3
  module API
4
- VERSION = "0.5.3"
4
+ VERSION = "0.6.0"
5
5
  end
6
6
  end
7
7
  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.5.3
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