Module: Jobs
- Defined in:
- lib/dapi/products/Jobs.rb
Instance Method Summary collapse
- #jobStatus(appSecret, jobID, sync, userSecret, addresses) ⇒ Object
- #resumeJob(appSecret, userSecret, jobID, sync, userInputs, addresses) ⇒ Object
Instance Method Details
#jobStatus(appSecret, jobID, sync, userSecret, addresses) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/dapi/products/Jobs.rb', line 21 def jobStatus(appSecret, jobID, sync, userSecret, addresses) payload = { appSecret: appSecret, userSecret: userSecret, jobID: jobID, sync: sync, addresses: addresses } if userSecret == "" payload = { appSecret: appSecret, jobID: jobID, sync: sync, addresses: addresses } end headers = { "Content-Type": "application/json" } response = HTTParty.post( "https://api.dapi.co/v1/auth/job/status", {body: payload.to_json, headers: headers}) end |
#resumeJob(appSecret, userSecret, jobID, sync, userInputs, addresses) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dapi/products/Jobs.rb', line 5 def resumeJob(appSecret, userSecret, jobID, sync, userInputs, addresses) payload = { appSecret: appSecret, userSecret: userSecret, jobID: jobID, sync: sync, userInputs: userInputs, addresses: addresses } headers = { "Content-Type": "application/json" } response = HTTParty.post( "http://localhost:80/v1/job/resume", {body: payload.to_json, headers: headers} ) end |