Class: FuturesPipeline::Client
- Inherits:
-
Object
- Object
- FuturesPipeline::Client
- Includes:
- Connection, Request
- Defined in:
- lib/futures_pipeline/client.rb
Instance Method Summary collapse
-
#career(onet_soc_code, options = {}) ⇒ Hashie::Mash
Get a single career using O*NET code.
-
#careers(options = {}) ⇒ Array<Hashie::Mash>
Get a list of all the available careers.
-
#search(moc, options = {}) ⇒ Hashie::Mash
Search for careers by MOC code.
Methods included from Request
Instance Method Details
#career(onet_soc_code, options = {}) ⇒ Hashie::Mash
Get a single career using O*NET code.
29 30 31 32 |
# File 'lib/futures_pipeline/client.rb', line 29 def career(onet_soc_code, ={}) api_safe_onet_soc_code = onet_soc_code.tr(".", "-") get("/api/v1/careers/#{api_safe_onet_soc_code}.json", ) end |
#careers(options = {}) ⇒ Array<Hashie::Mash>
Get a list of all the available careers. Returns an array of 50 careers per request. Use offset option to get more.
17 18 19 |
# File 'lib/futures_pipeline/client.rb', line 17 def careers(={}) get("/api/v1/careers.json", ) end |
#search(moc, options = {}) ⇒ Hashie::Mash
Search for careers by MOC code. Returns a list of careers related to the MOC.
41 42 43 |
# File 'lib/futures_pipeline/client.rb', line 41 def search(moc, ={}) get("/api/v1/careers/search.json?moc=#{moc}", ) end |