lib/mrkt/concerns/crud_programs.rb in mrkt-0.9.0 vs lib/mrkt/concerns/crud_programs.rb in mrkt-0.10.0
- old
+ new
@@ -1,13 +1,14 @@
module Mrkt
module CrudPrograms
def browse_programs(offset: nil, max_return: nil, status: nil)
- params = {}
- params[:offset] = offset if offset
- params[:maxReturn] = max_return if max_return
- params[:status] = status if status
+ optional = {
+ offset: offset,
+ maxReturn: max_return,
+ status: status
+ }
- get('/rest/asset/v1/programs.json', params)
+ get('/rest/asset/v1/programs.json', {}, optional)
end
def get_program_by_id(id)
get("/rest/asset/v1/program/#{id}.json")
end