VikR
VikR

Reputation: 5142

AWS MTURK SDK: Extract Data from Hit Info?

I have successfully retrieved info on my HIT using the SDK:

        $hitInfo = $this->mturk->getHIT([
            'HITId' => $hit_id,
        ]);

I would like to access the Expiration field in $hitInfo. It seems to require the use a special object accessor function.

       $hitInfo->get('Expiration');

...doesn't work.

What is the correct way to access the Expiration field?

Upvotes: 1

Views: 28

Answers (1)

VikR
VikR

Reputation: 5142

Found it. :)

$HITdata = $hitInfo->get('HIT');
$newExpirationTime = $HITdata["Expiration"]->date;

Upvotes: 1

Related Questions