lib/pupil/lists.rb in pupil-0.6.2 vs lib/pupil/lists.rb in pupil-0.6.3
- old
+ new
@@ -1,22 +1,22 @@
class Pupil
# @return [Hash] lists
def lists(param={})
if param[:contains]
- response = self.get("/1/lists/memberships.json", param.reject{|p|p==:contains}.update(guess_parameter(param[:contains]) => param[:contains]))
+ response = self.get("/1.1/lists/memberships.json", param.reject{|p|p==:contains}.update(guess_parameter(param[:contains]) => param[:contains]))
response = response["lists"]
else
- response = self.get("/1/lists/all.json", param)
+ response = self.get("/1.1/lists/all.json", param)
end
return [] unless response
lists = Array.new
response.each do |list|
lists << List.new(list, @access_token)
end
return lists
end
def create_list(name, option={})
- response = self.post("/1/lists/create.json", {:name => name}.update(option))
+ response = self.post("/1.1/lists/create.json", {:name => name}.update(option))
return List.new(response, @access_token)
end
end
\ No newline at end of file