lc-api 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lc-api/api.rb +1 -2
- data/lib/lc-api/resource/series.rb +1 -1
- data/lib/lc-api/resource.rb +3 -4
- metadata +1 -1
data/lib/lc-api/api.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module LcApi
|
2
2
|
class Series < Resource
|
3
|
-
ATTRIBUTES = %w[id description hashtag slug parts promo viewable start_date end_date]
|
3
|
+
ATTRIBUTES = %w[id title description hashtag slug parts promo viewable start_date end_date]
|
4
4
|
define_attribute_methods(ATTRIBUTES)
|
5
5
|
end
|
6
6
|
end
|
data/lib/lc-api/resource.rb
CHANGED
@@ -4,12 +4,10 @@ module LcApi
|
|
4
4
|
class Resource
|
5
5
|
class << self
|
6
6
|
|
7
|
-
def id(id
|
8
|
-
bool = options ? true : false
|
9
|
-
(options = {}) unless (options)
|
7
|
+
def id(id)
|
10
8
|
uri = member_name # ie 'message'
|
11
9
|
uri += "/#{id}" if id
|
12
|
-
parse_response(API.get(uri
|
10
|
+
parse_response(API.get(uri)) # method missing
|
13
11
|
end
|
14
12
|
|
15
13
|
def all
|
@@ -18,6 +16,7 @@ module LcApi
|
|
18
16
|
end
|
19
17
|
|
20
18
|
def parse_response(response, multiple=false)
|
19
|
+
#puts "RESPONSE IS: #{response.parsed_response}"
|
21
20
|
case response.code.to_i
|
22
21
|
when 404
|
23
22
|
raise LcApi::API::NotFound.new(response), "Resource was not found"
|