Class: Zeit::Resources::Department

Inherits:
Base
  • Object
show all
Defined in:
lib/zeit/resources/department.rb

Instance Attribute Summary

Attributes inherited from Base

#fields, #limit, #offset, #query

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Zeit::Resources::Base

Instance Method Details

#find(q, opts = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/zeit/resources/department.rb', line 4

def find(q, opts = {})
  opts[:q] = q
  @connection.get '/department' do |query|
    apply_params(query, opts)
  end
end

#get(id, opts = {}) ⇒ Object



11
12
13
14
15
# File 'lib/zeit/resources/department.rb', line 11

def get(id, opts = {})
  @connection.get "/department/#{id}" do |query|
    apply_params(query, opts)
  end
end