module Jobs

Public Instance Methods

jobStatus(appSecret, jobID, sync, userSecret, addresses) click to toggle source
# 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) click to toggle source
# 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